mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-28 03:26:32 +00:00
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
|
# Install Python dependencies from requirements.txt if it exists
|
||||||
COPY requirements.txt requirements_tests.txt ./
|
COPY requirements.txt requirements_tests.txt ./
|
||||||
RUN pip3 install -r requirements.txt -r 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
|
&& rm -f requirements.txt requirements_tests.txt
|
||||||
|
|
||||||
# Set the default shell to bash instead of sh
|
# Set the default shell to bash instead of sh
|
||||||
|
@ -42,18 +42,6 @@ stages:
|
|||||||
displayName: 'Install Tox'
|
displayName: 'Install Tox'
|
||||||
- script: tox
|
- script: tox
|
||||||
displayName: 'Run 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'
|
- job: 'JQ'
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-latest'
|
vmImage: 'ubuntu-latest'
|
||||||
|
@ -134,7 +134,7 @@ def secure_path(tar: tarfile.TarFile) -> Generator[tarfile.TarInfo, None, None]:
|
|||||||
|
|
||||||
|
|
||||||
def exclude_filter(
|
def exclude_filter(
|
||||||
exclude_list: List[str]
|
exclude_list: List[str],
|
||||||
) -> Callable[[tarfile.TarInfo], Optional[tarfile.TarInfo]]:
|
) -> Callable[[tarfile.TarInfo], Optional[tarfile.TarInfo]]:
|
||||||
"""Create callable filter function to check TarInfo for add."""
|
"""Create callable filter function to check TarInfo for add."""
|
||||||
|
|
||||||
|
@ -3,3 +3,4 @@ pylint==2.4.3
|
|||||||
pytest==5.2.2
|
pytest==5.2.2
|
||||||
pytest-timeout==1.3.3
|
pytest-timeout==1.3.3
|
||||||
pytest-aiohttp==0.3.0
|
pytest-aiohttp==0.3.0
|
||||||
|
black==19.10b0
|
||||||
|
7
tox.ini
7
tox.ini
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = lint, tests
|
envlist = lint, tests, black
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
@ -17,3 +17,8 @@ commands =
|
|||||||
basepython = python3
|
basepython = python3
|
||||||
commands =
|
commands =
|
||||||
pytest --timeout=10 tests
|
pytest --timeout=10 tests
|
||||||
|
|
||||||
|
[testenv:black]
|
||||||
|
basepython = python3
|
||||||
|
commands =
|
||||||
|
black --target-version py37 --check hassio tests setup.py
|
||||||
|
Loading…
x
Reference in New Issue
Block a user