Skip to content

Commit 9ee01f8

Browse files
committed
Remove pylint
Pylint is useful but quite slow. Ruff covers most of the pylint checks, but finishes in an instant.
1 parent 631d502 commit 9ee01f8

File tree

12 files changed

+0
-57
lines changed

12 files changed

+0
-57
lines changed

.github/workflows/on-push.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
pip install .[test]
30-
- name: Lint with Pylint
31-
run: pylint --score=n not_my_board tests
3230
- name: Check format with Black
3331
run: black --check --quiet not_my_board tests doc
3432
- name: Check import statement order with isort

not_my_board/_agent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ def _filter_places(import_description, places):
255255
return candidates
256256

257257

258-
# pylint: disable=too-many-locals
259258
def _create_tunnel_descriptions(import_description, place, matching):
260259
place_name = import_description.name
261260
proxy = (place.host, place.port)

not_my_board/_auth/_login.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ def __init__(self, path_str=None):
9797
self._path = path
9898

9999
async def _context_stack(self, stack):
100-
# pylint: disable-next=consider-using-with # false positive
101100
self._f = stack.enter_context(self._path.open("r+"))
102101
await stack.enter_async_context(util.flock(self._f))
103102
content = self._f.read()

not_my_board/_http.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ def _is_proxy_disabled_host(host, patterns):
437437
return False
438438

439439

440-
# pylint: disable=protected-access
441440
# remove, if Python version < 3.11 is no longer supported
442441
async def _start_tls(writer, url):
443442
if hasattr(writer, "start_tls"):

not_my_board/_hub.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ async def asgi_app(scope, receive, send):
3737
# before handing over to asgineer
3838
await _handle_lifespan(scope, receive, send)
3939
else:
40-
# to_asgi() decorator adds extra arguments
41-
# pylint: disable-next=too-many-function-args
4240
await _handle_request(scope, receive, send)
4341

4442

@@ -114,7 +112,6 @@ async def require_role_wrapper(*args, **kwargs):
114112

115113

116114
class Hub:
117-
# pylint: disable=too-many-locals
118115
def __init__(self, config=None, http_client=None):
119116
self._places = {}
120117
self._exporters = {}

not_my_board/_jsonrpc/_protocol.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ def hidden(func):
217217
keep it public for local users, otherwise just use a leading underscore in
218218
the method name.
219219
"""
220-
# pylint: disable=protected-access
221220
func._jsonrpc_hidden = True
222221
return func
223222

not_my_board/_usbip.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,6 @@ def __class_getitem__(cls, key):
371371
return Annotated[bytes, StructStr(f"{key}s")]
372372

373373

374-
# pylint: disable=W0212,E1101
375-
# - accessing protected member of cls, e.g. cls._struct
376-
# - 'serializable' has no '_struct' member
377374
def serializable(cls):
378375
cls = dataclasses.dataclass(cls)
379376

@@ -414,8 +411,6 @@ async def from_reader(cls, reader):
414411
f"Expected {field.name}={field.default}, got={value}"
415412
)
416413

417-
# pylint: disable=E1120
418-
# No value for argument 'cls': false positive
419414
return cls(*init_values)
420415

421416
cls.__bytes__ = __bytes__
@@ -424,7 +419,6 @@ async def from_reader(cls, reader):
424419
return cls
425420

426421

427-
# pylint: disable=invalid-field-call
428422
def no_init(default):
429423
return dataclasses.field(default=default, init=False)
430424

@@ -502,7 +496,6 @@ async def _open_read_pipe(*args, **kwargs):
502496
yield reader
503497

504498

505-
# pylint: disable=import-outside-toplevel
506499
async def _main():
507500
import argparse
508501

not_my_board/_util/_matching.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pylint: disable=invalid-name
21
# ruff: noqa: N803
32
# ruff: noqa: N806
43
import collections

not_my_board/cli/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
TOKEN_STORE_PATH = "/var/lib/not-my-board/auth_tokens.json" # noqa: S105
2424

2525

26-
# pylint: disable=too-many-statements
2726
# ruff: noqa: PLR0915
2827
def main():
2928
parser = argparse.ArgumentParser(description="Setup, manage and use a board farm")

pyproject.toml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ test = [
5252
"codespell",
5353
"isort",
5454
"mypy",
55-
"pylint",
56-
"pylint-pytest",
5755
"pytest",
5856
"pytest-asyncio ~= 0.21.2",
5957
"pytest-cov",
@@ -76,40 +74,6 @@ addopts = ["--quiet"]
7674
testpaths = ["tests"]
7775
asyncio_mode = "auto"
7876

79-
[tool.pylint.MASTER]
80-
load-plugins = "pylint_pytest"
81-
82-
[tool.pylint."MESSAGES CONTROL"]
83-
disable = [
84-
"attribute-defined-outside-init",
85-
"broad-exception-caught",
86-
"contextmanager-generator-missing-cleanup",
87-
"fixme",
88-
"missing-class-docstring",
89-
"missing-function-docstring",
90-
"missing-module-docstring",
91-
"no-else-raise",
92-
"no-else-return",
93-
"too-few-public-methods",
94-
"too-many-arguments",
95-
"too-many-instance-attributes",
96-
"unspecified-encoding",
97-
]
98-
# allow short names
99-
variable-rgx = "^_{,2}[a-z][a-z0-9_]{,30}$"
100-
argument-rgx = "^_{,2}[a-z][a-z0-9_]{,30}$"
101-
attr-rgx = "^_{,2}[a-z][a-z0-9_]{,30}$"
102-
# allow any length for functions (e.g. test function names can be quite
103-
# long)
104-
function-rgx = "^_{,2}[a-z][a-z0-9_]*$"
105-
# pylint doesn't support lazy_import()
106-
generated-members = [
107-
"websockets",
108-
"pydantic",
109-
"ImportRequest",
110-
"ImportReply",
111-
]
112-
11377
[tool.isort]
11478
profile = "black"
11579

tests/test_hub.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ def allowed_ips(self):
5858
return self._allowed_ips
5959

6060

61-
# pylint: disable=redefined-outer-name
6261
@contextlib.asynccontextmanager
6362
async def register_exporter(hub, ip=DEFAULT_EXPORTER_IP):
6463
rpc1, rpc2 = fake_rpc_pair()
@@ -82,7 +81,6 @@ async def test_register_exporter(hub):
8281
assert len(places["places"]) == 0
8382

8483

85-
# pylint: disable=redefined-outer-name
8684
@contextlib.asynccontextmanager
8785
async def register_agent(hub, ip=DEFAULT_AGENT_IP):
8886
rpc1, rpc2 = fake_rpc_pair()

tests/test_jsonrpc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ async def test_either_args_or_kwargs(fakes):
309309

310310
async def test_prevent_hidden_function_call(fakes):
311311
with pytest.raises(AttributeError) as execinfo:
312-
# pylint: disable=protected-access
313312
await fakes.channel._hidden()
314313
assert "invalid attribute" in str(execinfo.value)
315314

0 commit comments

Comments
 (0)