From f6bad3ef6c76c995c64eb582d8ef10381bcf3de5 Mon Sep 17 00:00:00 2001 From: Carl Montanari Date: Fri, 9 Aug 2024 15:43:47 -0700 Subject: [PATCH] chore: remove pylama/pydocstyle, just use pylint --- .pylintrc | 5 +++-- Makefile | 2 +- noxfile.py | 6 +++--- pyproject.toml | 10 ---------- requirements-dev.txt | 2 -- scrapli_cfg/platform/base/base_platform.py | 2 +- 6 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.pylintrc b/.pylintrc index ea3c6c8..fb748a9 100644 --- a/.pylintrc +++ b/.pylintrc @@ -143,7 +143,7 @@ confidence=HIGH, # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". -disable=C0103,C0115,R0901,R0902,R0903,R0913,R0914,W1202,W1203 +disable=C0103,C0115,R0401,R0801,R0901,R0902,R0903,R0913,R0914,W1202,W1203 # C0103 = constant-name (a little too aggressive for some things that aren't "really" constants") # C0115 = class docstrings (init doc strings cover this already) # W1202 = use % formatting for logging (ignore, using f-strings) @@ -153,7 +153,8 @@ disable=C0103,C0115,R0901,R0902,R0903,R0913,R0914,W1202,W1203 # R0903 = too-few-public methods # R0913 = too-many-arguments # R0914 = too-many-local-variables - +# R0801 = similar-lines +# R0401 = cyclic-import (too many false positives, seems like this is a common complaint :p) # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where diff --git a/Makefile b/Makefile index 76d1e29..da1d587 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ lint: python -m isort . python -m black . - python -m pylama . + python -m pylint scrapli_cfg/ python -m pydocstyle . python -m mypy --strict scrapli_cfg/ diff --git a/noxfile.py b/noxfile.py index d65ba83..2521e78 100644 --- a/noxfile.py +++ b/noxfile.py @@ -194,9 +194,9 @@ def black(session): @nox.session(python=["3.11"]) -def pylama(session): +def pylint(session): """ - Nox run pylama + Nox run pylint Args: session: nox session @@ -209,7 +209,7 @@ def pylama(session): """ session.install(*_get_install_test_args()) - session.run("python", "-m", "pylama", ".") + session.run("python", "-m", "pylint", "scrapli_cfg/") @nox.session(python=["3.11"]) diff --git a/pyproject.toml b/pyproject.toml index 48f80d7..fc4cc61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,16 +114,6 @@ warn_unused_configs = true strict_optional = true -[tool.pylama] -linters = "mccabe,pycodestyle,pylint" -skip = ".nox/*,.private/*,build/*,docs/*,private/*,site/*,tests/*,venv/*" - -[tool.pylama.pycodestyle] -max_line_length = 100 - -[tool.pylama.pylint] -rcfile = ".pylintrc" - [tool.pydocstyle] match-dir = "^scrapli_cfg/*" ignore = "D101,D202,D203,D212,D400,D406,D407,D408,D409,D415" diff --git a/requirements-dev.txt b/requirements-dev.txt index f2954c2..d62afe6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,10 +3,8 @@ darglint>=1.8.1,<2.0.0 isort>=5.10.1,<6.0.0 mypy>=1.4.1,<2.0.0 nox==2024.4.15 -pycodestyle>=2.8.0,<3.0.0 pydocstyle>=6.1.1,<7.0.0 pyfakefs>=5.4.1,<6.0.0 -pylama>=8.4.0,<9.0.0 pylint>=3.0.0,<4.0.0 pytest-asyncio>=0.17.0,<1.0.0 pytest-cov>=3.0.0,<5.0.0 diff --git a/scrapli_cfg/platform/base/base_platform.py b/scrapli_cfg/platform/base/base_platform.py index 43846da..37a8087 100644 --- a/scrapli_cfg/platform/base/base_platform.py +++ b/scrapli_cfg/platform/base/base_platform.py @@ -162,7 +162,7 @@ def _prepare_ok(self) -> None: """ # ignoring type/complaints as `on_prepare` will always be set in the sync/async classes; # but is not set here since in one its a coroutine and the other not - _on_prepare = self.on_prepare # type: ignore # noqa + _on_prepare = self.on_prepare # type: ignore # pylint:disable=E1101 if _on_prepare is not None and self._prepared is False: raise PrepareNotCalled( "on_prepare callable provided, but prepare method not called. call prepare method "