Skip to content

Commit

Permalink
chore: remove pylama/pydocstyle, just use pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
carlmontanari committed Aug 9, 2024
1 parent 1479e82 commit cc484ab
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 23 deletions.
6 changes: 4 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ignore=CVS

# Add files or directories matching the regex patterns to the ignore-list. The
# regex matches against paths and can be in Posix or Windows format.
ignore-paths=
ignore-paths = ".nox/*,.private/*,build/*,docs/*,private/*,scrapli/transport/plugins/system/ptyprocess.py,site/*,tests/*,venv/*"

# Files or directories matching the regex patterns are skipped. The regex
# matches against base names, not paths. The default value ignores Emacs file
Expand Down Expand Up @@ -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)
Expand All @@ -153,6 +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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ help:
lint: ## Run linters
python -m isort .
python -m black .
python -m pylama .
python -m pylint scrapli/
python -m pydocstyle .
python -m mypy --strict scrapli/

Expand Down
7 changes: 3 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,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
Expand All @@ -208,7 +208,7 @@ def pylama(session):
"""
session.install(*_get_install_test_args())
session.run("python", "-m", "pylama", ".")
session.run("python", "-m", "pylint", "scrapli/")


@nox.session(python=["3.11"])
Expand Down Expand Up @@ -249,7 +249,6 @@ def mypy(session):
session.install(".")
session.install(f"mypy{DEV_REQUIREMENTS['mypy']}")
session.install(f"types-paramiko{DEV_REQUIREMENTS['types-paramiko']}")
session.install(f"types-pkg-resources{DEV_REQUIREMENTS['types-pkg-resources']}")
session.run("python", "-m", "mypy", "--strict", "scrapli/")


Expand Down
10 changes: 0 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,6 @@ strict_optional = true
module = "scrapli.transport.plugins.system.ptyprocess"
ignore_errors = true

[tool.pylama]
linters = "mccabe,pycodestyle,pylint"
skip = ".nox/*,.private/*,build/*,docs/*,private/*,scrapli/transport/plugins/system/ptyprocess.py,site/*,tests/*,venv/*"

[tool.pylama.pycodestyle]
max_line_length = 100

[tool.pylama.pylint]
rcfile = ".pylintrc"

[tool.pydocstyle]
match-dir = "^scrapli/*"
ignore = "D101,D202,D203,D212,D400,D406,D407,D408,D409,D415"
Expand Down
5 changes: 1 addition & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ 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
pytest>=7.0.0,<8.0.0
scrapli-cfg==2023.7.30
scrapli-replay==2023.7.30
toml>=0.10.2,<1.0.0
types-paramiko>=2.8.6,<4.0.0
types-pkg-resources>=0.1.3,<1.0.0
types-paramiko>=2.8.6,<4.0.0
2 changes: 1 addition & 1 deletion scrapli/channel/base_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def _join_and_compile(channel_outputs: Optional[List[bytes]]) -> Pattern[bytes]:

return regex_channel_outputs_pattern

def _ssh_message_handler(self, output: bytes) -> None: # noqa: C901
def _ssh_message_handler(self, output: bytes) -> None: # pylint:disable=too-many-branches
"""
Parse EOF messages from _pty_authenticate and create log/stack exception message
Expand Down
2 changes: 1 addition & 1 deletion scrapli/driver/base/base_driver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""scrapli.driver.base.base_driver""" # noqa: C0302
"""scrapli.driver.base.base_driver""" # pylint:disable=too-many-lines

import importlib
from dataclasses import fields
Expand Down

0 comments on commit cc484ab

Please sign in to comment.