Questions tagged [pylint]

Pylint is a Python source code analyzer looking for bugs and signs of poor quality.

Pylint is a Python tool that checks if a module satisfies a coding standard.

1691 questions
0
votes
0 answers

PIP fails installing pylint

I have been using spyder for last three years, and just moved on to Visual Studio Code. VSC is recommending me to install pylint, but my cmd outputs this. C:\WINDOWS\system32>pip install pylint ERROR: Exception: Traceback (most recent call…
0
votes
1 answer

VS Code Pylint no member error fix doesn't work

I've entered "python.linting.pylintArgs": ["--generated-members"] In VS code settings.json to fix 'Pylint no member error' and now pylint doesn't even work... Did I do something wrong? Is there any other solution?
0
votes
1 answer

VSCode can't find (some) pylint modules

This was a very simple user error that has nothing to do with importing modules for pylint. However, since it appears to me like others could fall for that mistake, I'm leaving that question online. Maybe it'll help someone else. I'm using Visual…
JC_CL
  • 2,346
  • 6
  • 23
  • 36
0
votes
0 answers

Pylint is unable to work correctly when the root folder has __init__.py (E0401: Unable to import)

This is my folder structure: ProjectX/ ├── __init__.py ├── PackageY/ │ ├── __init__.py(has import statement - `from PackageY.SubPkgZ.mod1 import mod1fn1`) │ ├── SubPkgZ │ │ ├── mod1.py (contains 2 functions: mod1fn1 and mod1fn2) │ …
variable
  • 8,262
  • 9
  • 95
  • 215
0
votes
1 answer

Undefined Variable 'os' pylint(undefined-variable) [57,18]

I am stuck here and dont know why this error is occuring.enter image description here
Susan Sujakhu
  • 41
  • 1
  • 1
0
votes
1 answer

Pylint-Django: AttributeError: 'Subscript' object has no attribute 'name'

It's been a while I've been experiencing an issue when running Pylint with pylint_django. I include the error traceback and details on my environment. I think I've found a solution and submitted a push request, but I publish the question here in…
Uyric
  • 646
  • 7
  • 17
0
votes
1 answer

Importing matplotlib module into a pipenv environment - vscode

Just starting to learn matplotlib and I'm getting an error when importing the module. I'm using a pipenv environment inside of vscode. I think pylint might be pointing to my global Python installation rather than my pipenv environment. If I install…
j4yman
  • 81
  • 7
0
votes
0 answers

Python 3.8.0 always get either linting warning or ModuleNotFoundError from imports in the same directory

I have the following setup: animals - __init__.py - main.py - pets.py * class Dog If I do from pets import Dog from main.py, I get a linter warning on the latest versions of pylint, flake8, and bandit. Intellisense recommends I do from…
Kai Arakawa
  • 193
  • 1
  • 1
  • 14
0
votes
1 answer

GitHub Actions // PowerShell // recursive file search applying pylint

I'm looking for a PowerShell version of the following Linux command for CI with GitHub actions: find . -name "*.py" -not -path "./exclude_dir/*" | xargs pylint here is where I'm now: get-childitem -path $pwd -include *.py -recurse -name at the…
Alexey Abramov
  • 435
  • 1
  • 3
  • 16
0
votes
2 answers

Pylint marking code as an error that works

I've been using python to interact with Tor and Stem. And on line controller.signal(Signal.NEWNYM) in the code it's always marking Signal with the error Instance of 'Enum' has no 'NEWNYM' memberpylint(no-member) I have no idea why its doing this.…
0
votes
0 answers

Problem with calling methods in Youtube Client API

For some reason, my resource "youtube_client" doesnt recognize the method "videos()". What could be some possible reasons for this error message? I imported the needed youtube libraries. Upon request here is a fuller view of the problem. You can see…
Jane
  • 23
  • 6
0
votes
0 answers

Instance of relationship has no append member pylint : VS Code

Pylint is throwing an error on a member that works when I run the code. How to remove this error? The following code shows on which line the error is coming. Class User(db.Model): # ... following = db.relationship( ... #Some…
Shivansh Jagga
  • 1,541
  • 1
  • 15
  • 24
0
votes
1 answer

Pylint Error with Python Turtle even though code executes properly

import turtle class Polygon: def __init__(self,sides,name,size=100,color='black',line_thickness=3): self.sides=sides self.name=name self.size=size self.color=color self.line_thickness=line_thickness …
0
votes
1 answer

Why can't VSCode Python linter resolve import of file in the same directory?

Take the following folder structure. sidebar-update __init__.py index.py results.py When importing a given function in index.py from results.py with the statement from results import getResultsTable VSCode produces the following…
Joao Pereira
  • 573
  • 4
  • 16
0
votes
1 answer

Why does pylint object to protected member on a deepcopy?

In the following code, pylint is fine with clone updating _generation but not with it calling _prime_me. [Access to protected member _prime_me of a client class (protected-access).] Why? Is there a way of calling a 'private' method on a copy which…