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] <support@github.com>

* 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 <pvizeli@syshack.ch>
This commit is contained in:
dependabot[bot] 2021-07-01 18:07:15 +02:00 committed by GitHub
parent 3057df3181
commit cd07bde307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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