You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run pylint foo without the .pylintrc in the directory in which I invoke the command, I get output like this, towards the end of the stdout:
==etf_screener.scrapers.direxion.transforms:4
==etf_screener.scrapers.ishares.transforms:6
from etf_screener.transforms import (
Codecs as VanillaCodecs,
Fields as VanillaFields,
DEFAULT_DATE,
) (duplicate-code)
etf_screener/scrapers/amundi/api.py:1:0: R0801: Similar lines in 2 files
==etf_screener.scrapers.amundi.etl:27
==etf_screener.scrapers.direxion.etl:31
except KeyError as e:
log.error(
red(f"changed response format. check the raw response: {response}")
)
raise e (duplicate-code)
------------------------------------------------------------------
Your code has been rated at 4.19/10 (previous run: 4.19/10, +0.00)
However, when I use the configurations at the end of this question, name a file like .pylintrc and put it in my project's root, and invoke pylint foo again, I no longer get an output like in the first code snippet. I am sure I am missing some config here.
redacted output with .pylintrc in the root dir:
************* Module etf_screener.scrapers.xtrackers_us.etl
etf_screener/scrapers/xtrackers_us/etl.py:42:0: C0301: Line too long (195/120) (line-too-long)
etf_screener/scrapers/xtrackers_us/etl.py:6:0: W0404: Reimport 'datetime' (imported line 4) (reimported)
etf_screener/scrapers/xtrackers_us/etl.py:4:0: C0411: standard import "from datetime import datetime as dt" should be placed before "from pandas.tseries.offsets import BDay" (wrong-import-order)
etf_screener/scrapers/xtrackers_us/etl.py:5:0: C0411: standard import "from collections import namedtuple" should be placed before "from pandas.tseries.offsets import BDay" (wrong-import-order)
etf_screener/scrapers/xtrackers_us/etl.py:6:0: C0411: standard import "from datetime import datetime" should be placed before "from pandas.tseries.offsets import BDay" (wrong-import-order)
etf_screener/scrapers/xtrackers_us/etl.py:10:0: C0411: standard import "import logging" should be placed before "from pandas.tseries.offsets import BDay" (wrong-import-order)
etf_screener/scrapers/xtrackers_us/etl.py:11:0: C0411: standard import "import re" should be placed before "from pandas.tseries.offsets import BDay" (wrong-import-order)
etf_screener/scrapers/xtrackers_us/etl.py:12:0: C0411: standard import "import os" should be placed before "from pandas.tseries.offsets import BDay" (wrong-import-order)
etf_screener/scrapers/xtrackers_us/etl.py:6:0: C0412: Imports from package datetime are not grouped (ungrouped-imports)
etf_screener/scrapers/ubs/etl.py:14:0: C0301: Line too long (161/120) (line-too-long)
etf_screener/scrapers/ubs/etl.py:2:0: C0411: standard import "from typing import Generator, ClassVar" should be placed before "from pandas.tseries.offsets import BDay" (wrong-import-order)
etf_screener/scrapers/ubs/etl.py:3:0: C0411: standard import "from datetime import datetime as dt" should be placed before "from pandas.tseries.offsets import BDay" (wrong-import-order)
etf_screener/scrapers/ishares/api.py:19:0: R0903: Too few public methods (0/2) (too-few-public-methods)
.pylintrc
[MASTER]
# automatically detects number of available processors to speed up pylint
jobs=0
# Pickle collected data for later comparisons.
persistent=yes
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
[MESSAGES CONTROL]
disable=E0401,
C0111,
C0330
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format=text
[REPORTS]
# Python expression which should return a score less than or equal to 10. You
# have access to the variables 'error', 'warning', 'refactor', and 'convention'
# which contain the number of messages in each category, as well as 'statement'
# which is the total number of statements analyzed. This score is used by the
# global evaluation report (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details.
#msg-template=
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format=colorized
# Tells whether to display a full report or only the messages.
reports=yes
# Activate the evaluation score.
score=yes
[LOGGING]
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style=new
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules=logging
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=LF
# Maximum number of characters on a single line.
max-line-length=120
[BASIC]
# Good variable names which should always be accepted, separated by a comma.
good-names=i,
j,
k,
n,
df,
db,
v,
e,
f,
T,
r
The text was updated successfully, but these errors were encountered:
Got similar issue but i do not even get the score. It seems that jobs=0 is the issue, setting it to 1 makes it work. So is there an issue with the auto detect on jobs?
Question
When I run
pylint foo
without the.pylintrc
in the directory in which I invoke the command, I get output like this, towards the end of thestdout
:However, when I use the configurations at the end of this question, name a file like
.pylintrc
and put it in my project's root, and invokepylint foo
again, I no longer get an output like in the first code snippet. I am sure I am missing some config here.redacted output with
.pylintrc
in the root dir:.pylintrc
The text was updated successfully, but these errors were encountered: