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
1 answer

PyLint: No name 'new file' in module 'main_app'

I created a file (permissions.py) in the main app(main_app). Now I imported it to an actual app view (actual_app): from main_app.permissions import SomeClass Pylint is throwing errors: E0611: No name 'permissions' in module 'main_app'…
ACD
  • 1,431
  • 1
  • 8
  • 24
0
votes
1 answer

How to disable pylint error when checking bash scripts files

I have added some linux shell scripts to the python app, and this scripts will be invoked on virtual machines on azure. Then I have checked a project with linter. For other reasons I do not add shebang line to shell scripts files. How to force…
0
votes
1 answer

How to dynamically set pylint path using .pylintrc?

I am trying to set up linting for a Python project using pylint in Visual Studio Code. I am managing dependencies using conda and have pylint installed through there, but VSC defaults to putting the global reference to pylint as the path…
Jordan
  • 33
  • 2
  • 5
0
votes
1 answer

Is there a way to get the Pylint exit code when running from Python (instead of CLI)

When running Pylint from the CLI, I can get the exit code with echo $? However, I am running Pylint from Python using the epylint module (as described in the documentation). Unfortunately, the docs do not describe how to get the exit code when…
0
votes
1 answer

Configure pylint for modules within eggs. (VS code)

Project structure I have the following folder structure | |- src | |- mypackage | | |- __init__.py | | |- mymodule.py | |- utils.egg |- main.py in mymodule.py file I can import the egg adding it to the sys.path as import…
lsmor
  • 4,698
  • 17
  • 38
0
votes
0 answers

How to have the linter ignore ascii art

I'm using vscode and pylint and it's flagging my file header ascii art as a possible problem. Is there a way to ignore just the file docstring, ascii art, or something... Thanks.
fcimeson
  • 123
  • 1
  • 7
0
votes
1 answer

Linting in Visual Studio Code Python stymies real time error detection

I've used other editors (Spyder) where linting is real time, and it's incredibly useful to catch coding errors in real time. I'm not necessarily looking for real time, but even after I save, I have to wait 30 seconds or so. I've seen this issue…
David Miller
  • 512
  • 2
  • 4
  • 17
0
votes
2 answers

Specify string format arguments as logging function parameters (logging-not-lazy)

I have read all the other solutions for this error and modified my code accordingly, but the error still persists. What am I doing wrong here? This is my code: LOGGER.error( 'There are no frames to download in the chosen ' + 'time range: %s…
Jai Kotia
  • 166
  • 2
  • 16
0
votes
1 answer

Invalid syntax setting up DYNAMO_TABLES for flask_dynamo project

Following the documentation for flask_dynamo you are instructed to set up the table configuration as follows: # app.py from flask import Flask from flask_dynamo import Dynamo app = Flask(__name__) app.config['DYNAMO_TABLES'] = [ { …
JamesMatson
  • 2,522
  • 2
  • 37
  • 86
0
votes
1 answer

Failed installing pylint via cmd (Windows)

As the title says, I'm trying to install pylint with the below command: pip install pylint But I get the below exception: Exception: Traceback (most recent call last): File "C:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2482,…
Cypher236
  • 527
  • 1
  • 4
  • 13
0
votes
2 answers

How to get rid of "Duplicate key" in python using BeautifulSoup?

URL = {URL here} page = requests.get(URL, headers={header here}) soup = BeautifulSoup(page.content, 'html.parser') container = soup.findAll("div", attrs={"class": "data1", "class": "data2"})" Warning: Duplicate key 'class' in dictionary…
xqrdot
  • 13
  • 1
  • 2
0
votes
1 answer

pylint fails with "unable to import moto", python can import it

I'm trying to pylint my testsuite that uses moto module for AWS API mockup. This is my super simple testcase: import moto Unfortunately it fails pylint: ~/prj $ pylint test_moto.py ************* Module test_test test_moto.py:1:0: E0401: Unable to…
MLu
  • 1,218
  • 2
  • 15
  • 28
0
votes
1 answer

Which version of pylint can be used with python 2.6.6?

I have to use Python 2.6.6 on linux host and I am trying to use pylint. Available versions I have are 1.9.5 or 1.6.4. But when I am trying to use them I am getting following errors? % pylint --version Traceback (most recent call last): File…
Lidia
  • 415
  • 1
  • 4
  • 21
0
votes
1 answer

Pylint code checker keeps saying "Redefining name 'get_run_again' from outer scope (line 22) (redefined-outer-name)"? What does this mean

This is my main function and another function it keeps having a problem with def main(): """ Main algorithm to calculate monthly budget """ # To run again variable run_again = 'Y' # Expense variables, 0 to quit while…
0
votes
2 answers

Pylint custom checker rule is unknown in Sonar

Target: use custom pylint rules with SonarQube UI I created a custom rule for pylint for python selenium webdriver. To check if XPATH locator is used. #webdriver_locator_checker.py from pylint.interfaces import IRawChecker from pylint.checkers…
Lukasz
  • 152
  • 3
  • 16
1 2 3
99
100