From cd07bde30701590534c36dde35368192241c5839 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jul 2021 18:07:15 +0200 Subject: [PATCH] Bump pylint from 2.8.3 to 2.9.1 (#2988) * Bump pylint from 2.8.3 to 2.9.1 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.8.3 to 2.9.1. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Changelog](https://github.com/PyCQA/pylint/blob/main/ChangeLog) - [Commits](https://github.com/PyCQA/pylint/compare/v2.8.3...v2.9.1) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update pylintrc * Update base.py * Update base.py * Fix black * fix helper Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pascal Vizeli --- .devcontainer/devcontainer.json | 4 ++-- pylintrc | 3 +++ requirements_tests.txt | 2 +- supervisor/resolution/checks/base.py | 2 +- supervisor/resolution/evaluations/base.py | 2 +- tox.ini | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 72216aa15..b5629a19e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "appPort": "9123:8123", "postCreateCommand": "pre-commit install", "runArgs": ["-e", "GIT_EDITOR=code --wait", "--privileged"], - "containerEnv": {"NVM_DIR":"/usr/local/share/nvm"}, + "containerEnv": { "NVM_DIR": "/usr/local/share/nvm" }, "extensions": [ "ms-python.python", "ms-python.vscode-pylance", @@ -22,7 +22,7 @@ "python.linting.pylintEnabled": true, "python.linting.enabled": true, "python.formatting.provider": "black", - "python.formatting.blackArgs": ["--target-version", "py38"], + "python.formatting.blackArgs": ["--target-version", "py39"], "python.formatting.blackPath": "/usr/local/bin/black", "python.linting.banditPath": "/usr/local/bin/bandit", "python.linting.flake8Path": "/usr/local/bin/flake8", diff --git a/pylintrc b/pylintrc index 3c3e6b39d..c0cee4347 100644 --- a/pylintrc +++ b/pylintrc @@ -4,6 +4,9 @@ jobs=2 good-names=id,i,j,k,ex,Run,_,fp,T +extension-pkg-whitelist= + ciso8601 + # Reasons disabled: # format - handled by black # locally-disabled - it spams too much diff --git a/requirements_tests.txt b/requirements_tests.txt index 7604b9974..26ccf4ac1 100644 --- a/requirements_tests.txt +++ b/requirements_tests.txt @@ -5,7 +5,7 @@ flake8-docstrings==1.6.0 flake8==3.9.2 pre-commit==2.13.0 pydocstyle==6.1.1 -pylint==2.8.3 +pylint==2.9.1 pytest-aiohttp==0.3.0 pytest-asyncio==0.12.0 # NB!: Versions over 0.12.0 breaks pytest-aiohttp (https://github.com/aio-libs/pytest-aiohttp/issues/16) pytest-cov==2.12.1 diff --git a/supervisor/resolution/checks/base.py b/supervisor/resolution/checks/base.py index 30a6cf560..4e2a8c7ba 100644 --- a/supervisor/resolution/checks/base.py +++ b/supervisor/resolution/checks/base.py @@ -49,7 +49,7 @@ class CheckBase(ABC, CoreSysAttributes): @property def slug(self) -> str: """Return the check slug.""" - return self.__class__.__module__.split(".")[-1] + return self.__class__.__module__.rsplit(".", maxsplit=1)[-1] @abstractmethod async def run_check(self) -> None: diff --git a/supervisor/resolution/evaluations/base.py b/supervisor/resolution/evaluations/base.py index eab5d3d6a..93f4bc268 100644 --- a/supervisor/resolution/evaluations/base.py +++ b/supervisor/resolution/evaluations/base.py @@ -46,7 +46,7 @@ class EvaluateBase(ABC, CoreSysAttributes): @property def slug(self) -> str: """Return the check slug.""" - return self.__class__.__module__.split(".")[-1] + return self.__class__.__module__.rsplit(".", maxsplit=1)[-1] @property @abstractproperty diff --git a/tox.ini b/tox.ini index 3ff0c7fdb..f2ae14333 100644 --- a/tox.ini +++ b/tox.ini @@ -21,4 +21,4 @@ commands = [testenv:black] basepython = python3 commands = - black --target-version py38 --check supervisor tests setup.py + black --target-version py39 --check supervisor tests setup.py