* Pin black version

* fix devcontainer
This commit is contained in:
Pascal Vizeli 2019-10-30 23:18:04 +01:00 committed by GitHub
parent 93f4c5e207
commit 380ca13be1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 15 deletions

View File

@ -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

View File

@ -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'

View File

@ -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."""

View File

@ -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

View File

@ -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