Skip to content

Commit

Permalink
Upgrade flake8 and dependencies, enable flake8-noqa (home-assistant#4…
Browse files Browse the repository at this point in the history
  • Loading branch information
scop authored Mar 27, 2021
1 parent 86212db commit 3cd52b6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ repos:
exclude_types: [csv, json]
exclude: ^tests/fixtures/
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
rev: 3.9.0
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings==1.5.0
# Temporarily every now and then for noqa cleanup; not done by
# default yet due to https://github.com/plinss/flake8-noqa/issues/1
# - flake8-noqa==1.1.0
- pydocstyle==5.1.1
- pycodestyle==2.7.0
- pyflakes==2.3.1
- flake8-docstrings==1.6.0
- pydocstyle==6.0.0
- flake8-comprehensions==3.4.0
- flake8-noqa==1.1.0
files: ^(homeassistant|script|tests)/.+\.py$
- repo: https://github.com/PyCQA/bandit
rev: 1.7.0
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/http/web_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class HomeAssistantTCPSite(web.BaseSite):

__slots__ = ("_host", "_port", "_reuse_address", "_reuse_port", "_hosturl")

def __init__(
def __init__( # noqa: D107
self,
runner: web.BaseRunner,
host: None | str | list[str],
Expand All @@ -34,7 +34,7 @@ def __init__(
backlog: int = 128,
reuse_address: bool | None = None,
reuse_port: bool | None = None,
) -> None: # noqa: D107
) -> None:
super().__init__(
runner,
shutdown_timeout=shutdown_timeout,
Expand Down
9 changes: 6 additions & 3 deletions requirements_test_pre_commit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ bandit==1.7.0
black==20.8b1
codespell==2.0.0
flake8-comprehensions==3.4.0
flake8-docstrings==1.5.0
flake8==3.8.4
flake8-docstrings==1.6.0
flake8-noqa==1.1.0
flake8==3.9.0
isort==5.7.0
pydocstyle==5.1.1
pycodestyle==2.7.0
pydocstyle==6.0.0
pyflakes==2.3.1
pyupgrade==2.11.0
yamllint==1.24.2
2 changes: 1 addition & 1 deletion tests/components/seventeentrack/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async def packages(
show_archived: bool = False,
tz: str = "UTC",
) -> list:
"""Packages mock."""
"""Packages mock.""" # noqa: D401
return self.__class__.package_list[:]

async def summary(self, show_archived: bool = False) -> dict:
Expand Down

0 comments on commit 3cd52b6

Please sign in to comment.