Questions tagged [pylintrc]

90 questions
1
vote
1 answer

Relative import 'six.moves.urllib', should be 'six.moves'

I am facing this situation in pylint 1.9.3 My code exp.py contains only this line from six.moves.urllib import parse as urllib when i run pylint exp.py then im getting this error [W0403(relative-import), ] Relative import 'six.moves.urllib',…
user3398900
  • 795
  • 2
  • 13
  • 31
1
vote
1 answer

Issue with max-line-length with pylint

I've got this setting in my .pylintrc # Maximum number of characters on a single line. max-line-length=78 But error about line greater than 78 chars in vim is not reporting. Pylint is however working as it reports other errors like "trailing…
Raoul Debaze
  • 466
  • 1
  • 8
  • 24
1
vote
1 answer

Is it possible to partially disable a pylint rule based on its message?

Some rules are used in more than a single situation. In particular, the rule C0326 is employed in at least 2 situations: def func() : pass gives the message C0326:No space allowed before : def func(param:int): pass gives the message…
drakenation
  • 382
  • 3
  • 15
1
vote
1 answer

Break build on Travis if pylint doesn't have an specific rate

I currently have a project that I'm using pylint and pytest. I use Travis to validate my build, and also run pylint to verify the code quality. But I wanted to do something different and not finding anywhere about how I should proceed. I want my…
porthunt
  • 484
  • 1
  • 5
  • 12
0
votes
1 answer

Can Pylint be configured to color Fixme warnings differently?

I would like my fixme messages to be blue, instead of purple, to differentiate them from other purple messages. Does Pylint even have colorization options? I can't find any. I see these things called "formatters", but that sounds more complex than…
ClioCJS
  • 64
  • 3
  • 11
0
votes
0 answers

Running Pylint Analysis on Remote Repos

I want to set up a GitLab CI Pipeline to perform static code analysis on a number of GitLab project repos, each containing several Python scripts. So far the proof of concept that I've set up and run, works perfectly by analysing and generating a…
hitman126
  • 699
  • 1
  • 12
  • 43
0
votes
1 answer

Pylint warning typing final

I was using pylint --list-msgs and one of the warnings I got was this one: :using-final-decorator-in-unsupported-version (W2602): *typing.final is not supported by all versions included in the py-version setting* Used when the py-version set by the…
Matheus
  • 3
  • 1
0
votes
0 answers

Specify directory to check in pylintrc

Is there a way to add a directory inside pylintrc file the same way that wyou would specify a directory at CLI? Goal is not to have to type pylint --recursive=y and just type pylint I only see ways to exclude directories in pylintrc…
kravb
  • 417
  • 4
  • 16
0
votes
1 answer

Why does pylint raises this error: Parsing failed: 'cannot assign to expression here. Maybe you meant '==' instead of '='?

While solving some exercises from the "Impractical Python Projects" book I've encountered this error: myconfig.pylintrc:6:1: E0001: Parsing failed: 'cannot assign to expression here. Maybe you meant '==' instead of '='? (, line 6)'…
Sigmatest
  • 121
  • 1
  • 9
0
votes
0 answers

Databricks and Pylint Integration

Is there any way to integrate Databricks and pylint for liniting pyspark/python code? If not, are there any alternatives for the same ?
aps08
  • 26
  • 1
  • 2
0
votes
1 answer

Pylint nested pylintrc : Specify a configuration file

Goal I want to use pylint without specifying the file path (just run pylint instead of pylint --rcfile=linter/.pylintrc), as I want to save all linter related files in a subfolder linter/. I thought of adding a .pylintrc file at the root folder only…
Sylvain
  • 679
  • 9
  • 13
0
votes
1 answer

VSCode Python Linting .pylintrc in repository vs workspace root

I am trying to get pylint with vscode to respect .pylintrc placed in a repository. I had a look into the documentation of both pylint and vscode python extension. It doesn't seem possible. Folder structure: Workspace-Root - Repository A …
Daniel Bişar
  • 2,663
  • 7
  • 32
  • 54
0
votes
1 answer

How to add a custom-made "good-name" like "ax" to pylintrc settings in visual studio code?

In order to avoid dealing with warnings raised as a result of using the variable ax in plotting routines, I would like to add this to the list of good-name variables in my python. In Linux, which is the best platform by the way, this is easy to do.…
Roosha
  • 89
  • 3
  • 10
0
votes
1 answer

Pylint, how to disable rule with condition

I don't want to disable the rule for entire project, but for a known scenario. Like: class A: def __init__(self, creator: Callback[[],B]) Most of time I use x = A(lamda: Bx()) y = A(lamda: By()) But it always trigger unnecessary-lambda, but I…
DIG
  • 1
  • 1
0
votes
1 answer

Can't pylint detect unresolved attribute reference?

We've been bit multiple times that pylint did not catch a simple unresolved attribute reference error. I looked at pylint code but could not immediately find it. IDE like PyCharm can detect it, so it must be possible to detect it in pylint. We are…
leopoodle
  • 2,110
  • 7
  • 24
  • 36