Upgrade flake8 and dependencies, enable flake8-noqa (#48393)

* Upgrade flake8 to 3.9.0

https://flake8.pycqa.org/en/latest/release-notes/3.9.0.html

* Upgrade pydocstyle to 6.0.0

https://www.pydocstyle.org/en/latest/release_notes.html#september-13th-2020
https://www.pydocstyle.org/en/latest/release_notes.html#march-18th-2021

* Upgrade flake8-docstrings to 1.6.0, enable flake8-noqa

https://gitlab.com/pycqa/flake8-docstrings/-/blob/1.6.0/HISTORY.rst
https://github.com/plinss/flake8-noqa/issues/1

* Upgrade/pin pyflakes to 2.3.1

https://github.com/PyCQA/pyflakes/blob/2.3.1/NEWS.rst

* Pin pycodestyle to 2.7.0
This commit is contained in:
Ville Skyttä 2021-03-27 11:22:11 +02:00 committed by GitHub
parent 86212db71d
commit 3cd52b695d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 12 deletions

View File

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

View File

@ -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],
@ -34,7 +34,7 @@ class HomeAssistantTCPSite(web.BaseSite):
backlog: int = 128,
reuse_address: bool | None = None,
reuse_port: bool | None = None,
) -> None: # noqa: D107
) -> None:
super().__init__(
runner,
shutdown_timeout=shutdown_timeout,

View File

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

View File

@ -106,7 +106,7 @@ class ProfileMock:
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: