pylint Questions

1

I have used pyreverse to create class diagrams from python codes. By default, it shows both the member variables and methods. But usually, I only want to see methods. If -k option is used, then it...
Rori asked 25/8, 2018 at 2:6

10

How do I disable these error messages from popping up in the problems box in vs code
Hackler asked 31/8, 2018 at 23:1

11

Solved

I am running pylint on an opencv project and I am getting many pylint errors in VS code about members not being present. Example code: import cv2 cv2.imshow(....) Errors obtained: However ,...
Hast asked 30/5, 2018 at 19:30

2

Solved

I have a python project that is using pylint and unittest. Unittest has me using methods called setUp() which pylint doesn't like. Specifically: C0103: 57,4:<class>.setUp: Invalid name "setU...
Incogitable asked 5/11, 2012 at 15:45

2

Solved

I have this code in (many) of my Python files for a project. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import uni...
Allot asked 23/3, 2015 at 9:9

4

For my setup, I have Pylint ==3.0.0a4 and VSCode Version: 1.67.2. In my VSCode settings.json, I have "editor.formatOnSave": true, "python.linting.enabled": true, "python.li...
Unopened asked 30/5, 2022 at 19:21

1

Solved

I have placed all python project sources in a single folder. Running the following pylint only seems to be looking and analyzing for duplicates within each source file and not across all which is w...

8

Solved

I have a very simple code here import torch l = torch.nn.Linear(2,5) v = torch.FloatTensor([1, 2]) print(l(v)) under torch.FloatTensor, pylint in visual studio code claims that 'Module torch ha...
Typecast asked 2/7, 2019 at 1:59

5

Solved

I have a project with that structure: ├── .git ├── .gitignore ├── README.md ├── requirements.txt └── src Pylint by default running from project root and I have error on all my imports, because s...
Seep asked 3/11, 2017 at 9:25

5

Solved

Here is a simple example of click usage that causes pylint error: @click.command() @click.option('--option', is_flag=True) def foo(option): click.echo(option) foo() foo receives no arguments s...

8

Solved

I'm using Sublime Text 3 With Pylinter to run pylint on my files. However, on the same machine, I work on files for both python 2, and python 3 projects (the code is executed on one of several rem...
Organography asked 14/4, 2014 at 5:33

18

Solved

Pylint throws errors that some of the files are missing docstrings. I try and add docstrings to each class, method and function, but it seems that Pylint also checks that files should have a docstr...
Marigolde asked 24/10, 2011 at 14:51

17

I have find . -iname "*.py" -exec pylint -E {} ;\ and FILES=$(find . -iname "*.py") pylint -E $FILES If I understand correctly, the first command will run pylint for each of the Python files...
Amerigo asked 26/4, 2016 at 18:34

8

I am using tox for my project. Here is my tox.ini file: [tox] envlist = py27, lint, coverage skipsdist = True [testenv:py27] deps = -rrequirements.txt commands = python -m unittest discover -s...
Newland asked 4/12, 2017 at 22:5

3

Solved

I would like to ignore a specific line in static code analysis. For Flake8, I'd use the syntax # noqa: F401. For pylint, I'd use the syntax # pylint: disable=unused-import. As I am working on a cod...
Ridglea asked 29/7, 2022 at 11:25

1

I followed these instructions on how to get pylint to import my files correctly using an init-hook. However, when I run the terminal command pylint server.py --rcfile=../.pylintrc I get TypeError: ...
Pinko asked 23/8, 2020 at 8:20

35

I'm running PyLint from inside Wing IDE on Windows. I have a sub-directory (package) in my project and inside the package I import a module from the top level, ie. __init__.py myapp.py one.py subd...
Infelicitous asked 14/12, 2009 at 7:22

6

Solved

The say module brings string interpolation to Python, like this: import say def f(a): return say.fmt("The value of 'a' is {a}") However, PyLint complains that the variable 'a' is never used. T...
Sanatorium asked 17/2, 2016 at 22:43

1

Questuion in pydantic doc,pydantic ^2.0.0 not support like this a:Optional[str],but rather support a:Optional[str] = Field(default=None) however,pylint check my code raise warning[E1101(no-member)...
Fiedler asked 8/8, 2023 at 15:10

7

I split up my class constructor by letting it call multiple functions, like this: class Wizard: def __init__(self, argv): self.parse_arguments(argv) self.wave_wand() # declaration omitted def...
Malenamalet asked 10/10, 2013 at 0:4

4

My project structure looks like this: project/ app/ main.py venv/ .pylintrc .pre-commit-config.yaml When I am trying to edit project/app/main.py and it fails with Unable to import 'psycopg2' ...
Fanciful asked 15/4, 2020 at 20:46

6

Solved

The Summary I have a python import that works when run from the VS Code terminal, but that VS Code's editor is giving warnings about. Also, "Go to Definition" doesn't work. The Problem I ...
Damnable asked 13/12, 2020 at 0:51

7

Solved

I recently switched to Visual Studio Code and I have to say I love it so far. I'm working on a Python project, which includes the pip packages pylint and autopep8 and I configured VSCode to format...
Furze asked 28/8, 2018 at 13:16

2

I have a piece of Python code: def func1(): a=set() b = ','.join(map(str, list(a))) return b, [] def func2(): d = 1 e = 2 return func1() + (d, e,) def main(): a,b,c,d = func2() if __name...
Embolism asked 16/1, 2015 at 8:46

2

Solved

In a typical pylint run, we get the following output: Global evaluation ----------------- Your code has been rated at 9.50/10 (previous run: 8.50/10) Duplication ----------- +-------------------...
Refill asked 24/8, 2014 at 19:11

© 2022 - 2025 — McMap. All rights reserved.