pylint
pylint copied to clipboard
It's not just a linter that annoys you!
### Bug description Beginning with attrs 21.1.0, the recommended way to use attrs is through `import attrs` and using `attrs.define`/`attrs.frozen`, not `import attr` and `attr.s` or `attr.attrs`. Pylint does understand...
### Bug description ```python """ Test pytorch linalg module with pylint """ import torch def my_qr_decomposition(tensor: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]: """ My QR """ tensor_q, tensor_r = torch.linalg.qr(tensor) return tensor_q,...
### Bug description In the following example, on line 20, Pylint complains that "Instance of 'Base' has no 'child_field' member". The correct inferred type of variable `ex` is `Child`, not...
### Bug description `pylint` gives a `E0712` `catching-non-exception` error on macOS Sonoma, but not on Linux. Create the following file `example.py`: ```python """Example file to show pylint error""" import cv2...
### Bug description ```python # pylint: disable=missing-module-docstring class Simple[T]: def __init__(self, value: T): self.value = value ``` ### Configuration _No response_ ### Command used ```shell python3.12 -m pylint a.py ```...
### Bug description pytorch nn.Module class, model_state_dict=model.state_dict(), assignmentPylintE1137:unsupported-assignment-operation ```python import torch import torch.nn as nn class Test(nn.Module): def __init__( self, embed_dim=3, ) -> None: super().__init__() self.embedding = torch.nn.Embedding(100, embed_dim) def...
This --ignore-patterns is not working: https://github.com/pylint-dev/pylint/blob/420f2ae8d46a6ea90f39d9b3c59869f3200571a8/tests/primer/packages_to_prime.json#L38 Evidence: https://github.com/pylint-dev/pylint/pull/9281#issuecomment-1839563461
I wrote a simple mock module (below) to show the problem. The code executes fine with Python 3.10. However, `pylint` throws an exception (log below) when parsing it. I updated...
### Current problem In order to "quickly find" the correct pylint message, one needs to use _some search_ (readthedocs, google), or manually search a (very long list) ### Desired solution...