parent
93f4c5e207
commit
380ca13be1
|
@ -36,7 +36,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
# Install Python dependencies from requirements.txt if it exists
|
||||
COPY requirements.txt requirements_tests.txt ./
|
||||
RUN pip3 install -r requirements.txt -r requirements_tests.txt \
|
||||
&& pip3 install black tox \
|
||||
&& pip3 install tox \
|
||||
&& rm -f requirements.txt requirements_tests.txt
|
||||
|
||||
# Set the default shell to bash instead of sh
|
||||
|
|
|
@ -42,18 +42,6 @@ stages:
|
|||
displayName: 'Install Tox'
|
||||
- script: tox
|
||||
displayName: 'Run Tox'
|
||||
- job: 'Black'
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
displayName: 'Use Python $(python.version)'
|
||||
inputs:
|
||||
versionSpec: '3.7'
|
||||
- script: pip install black
|
||||
displayName: 'Install black'
|
||||
- script: black --target-version py37 --check hassio tests
|
||||
displayName: 'Run Black'
|
||||
- job: 'JQ'
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
|
|
|
@ -134,7 +134,7 @@ def secure_path(tar: tarfile.TarFile) -> Generator[tarfile.TarInfo, None, None]:
|
|||
|
||||
|
||||
def exclude_filter(
|
||||
exclude_list: List[str]
|
||||
exclude_list: List[str],
|
||||
) -> Callable[[tarfile.TarInfo], Optional[tarfile.TarInfo]]:
|
||||
"""Create callable filter function to check TarInfo for add."""
|
||||
|
||||
|
|
|
@ -3,3 +3,4 @@ pylint==2.4.3
|
|||
pytest==5.2.2
|
||||
pytest-timeout==1.3.3
|
||||
pytest-aiohttp==0.3.0
|
||||
black==19.10b0
|
||||
|
|
7
tox.ini
7
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = lint, tests
|
||||
envlist = lint, tests, black
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
|
@ -17,3 +17,8 @@ commands =
|
|||
basepython = python3
|
||||
commands =
|
||||
pytest --timeout=10 tests
|
||||
|
||||
[testenv:black]
|
||||
basepython = python3
|
||||
commands =
|
||||
black --target-version py37 --check hassio tests setup.py
|
||||
|
|
Loading…
Reference in New Issue