Questions tagged [pylint]
Pylint is a Python source code analyzer looking for bugs and signs of poor quality.
pylint
1,764
questions
-6
votes
0
answers
38
views
Why Does VSCode Show 'Pylint Logging Disabled' Despite Having Pylint Extensions Installed? [closed]
I'm having trouble with Pylint in VSCode. Every time I launch VSCode, I receive a message indicating that Pylint logging is disabled. However, I have all the necessary Pylint extensions installed, and ...
0
votes
0
answers
14
views
PyLint doesn't recognize Poetry environment: E0401: import-error
My VSCode doesn't recognize modules and libraries imported in Python scripts, and shouts Unable to import ### PylintE0401:import-error at every single module import statement.
The Python scripts run ...
1
vote
1
answer
47
views
Non-iterable value used in iterating context in Pydantic validator
I have a Pydantic DTO that looks like this:
from pydantic import AfterValidator, model_validator, BaseModel
class Bid(BaseModel):
start_block: Annotated[DateTime, AfterValidator(block_validator)]...
0
votes
0
answers
12
views
VS Code workspaces settings for array value not merged properly
I have my user settings for pylint as
"pylint.args": [
"--disable=missing-class-docstring",
"--disable=missing-function-docstring",
"--disable=missing-...
1
vote
0
answers
37
views
Check for key in dictionary without magic value comparison [duplicate]
I'm using pydantic in a project to check file formatting for an object, as well as pylint for linting. Whenever I read a file with an invalid format, I want to raise an exception with a descriptive ...
0
votes
0
answers
44
views
1 out of many calls to overridden django `Model.save()` generates a pylint `unexpected-keyword-arg` error - how do I satisfy it?
I implemented and have been using this model (super)class I created for years, and it is completely stable on an active site. I just made a small minor tweak to some completely unrelated portion of ...
-4
votes
1
answer
48
views
What is a **Process completed with exit code 12.** pylint error? [closed]
I've been testing GitHub Actions on a project of mine here. It is a simple pylint formatting checker job.
However, it keeps on failing. Now, I'm not sure if all possible formatting errors need to be ...
0
votes
1
answer
30
views
Set multiple styles for pylint naming-styles
Is there a way to set mutltiple types of styles for a *-naming-style, just like you can set multiple bad names which the default .pylintrc uses?
For example:
method-naming-style=camelCase,
...
2
votes
0
answers
26
views
Pyreverse inserting linebreaks for too long UML Diagrams
The PyReverse generated diagram shows a very large class. I think this issue primarily arises because there are no line breaks in the methods block (see the bottom row):
How can I insert line breaks ...
0
votes
1
answer
39
views
pylint: missing module docstring. These are the same
I'm using pylint, and it says that there is an issue with my import statement. I follow the link in the preview:
Unable to import 'aws_cdk'PylintE0401:import-error
Import "aws_cdk" could not ...
0
votes
1
answer
199
views
How to prevent Pylance and pylint in vscode from analyzing python files not in current workspace?
I have a python project. When I want to reuse some old code, I drag and drop files from other folders into vscode. but the moment those files open, I am getting hundreds of errors saying all sorts of ...
0
votes
0
answers
41
views
pylint invalid-name warning for override methods
I have a Python (3.12.3) script that uses PyQt6 to make a simple GUI. pylint returns the following warning:
C0103: Method name "paintEvent" doesn't conform to snake_case naming style (...
0
votes
0
answers
13
views
Pylint does not work in VB Code when editing a module in the virtualenv
I have a file in a module in a virtualenv directory, that I wish to edit in VS Code. If I tell Code to use the virtualenv in which the module resides, it will not show pylint suggestions. If I tell ...
1
vote
0
answers
38
views
How to report `redefined-argument-from-local` as error in ruff?
In order to avoid making another bug due to override the function arguments in a for-loop, I find that there is a lint rule redefined-argument-from-local can detect this error. I try to enable this ...
0
votes
0
answers
18
views
Pylint warnings with attrs
I keep getting warnings from pylint while trying to iterate over an attribute in a class that uses the attrs package.
from typing import List
from attrs import define, Factory
@define
class MyClass:
...