Showing 1,557 of 1,564 total issues
Unnecessary elif
after raise
Open
if key in self._mandatory_fields:
- Read upRead up
- Exclude checks
Used in order to highlight an unnecessary block of code following an if containing a raise statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a raise statement.
Line too long (116/100) Open
self._int_fields = ["FileCount", "ResourceCapacityUsed", "LogicalCapacityUsed", "ResourceCapacityAllocated"]
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Using type() instead of isinstance() for a typecheck. Open
if type(records[0]) == JobRecord:
- Read upRead up
- Exclude checks
The idiomatic way to perform an explicit typecheck in Python is to use isinstance(x, Y) rather than type(x) == Y, type(x) is Y. Though there are unusual situations where these give different results.
Wrong continued indentation (add 3 spaces). Open
"Site", "ValidFrom", "ValidUntil", "Processed"]
- Read upRead up
- Exclude checks
TODO
Site
, ValidFrom
, ValidUntil
, Processed
]
^ |
Unnecessary parens after 'not' keyword Open
if not (month_start <= latest_end <= month_end):
- Read upRead up
- Exclude checks
Used when a single item in parentheses follows an if, for, or other keyword.
Line too long (124/100) Open
"NodeCount", "StartTime", "EndTime", "InfrastructureDescription", "InfrastructureType", "MemoryReal",
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Too many instance attributes (9/7) Open
class JobRecord(Record):
- Read upRead up
- Exclude checks
Used when class has too many instance attributes, try to reduce this to get a simpler (and so easier to use) class.
Unnecessary parens after 'not' keyword Open
if not (month_start <= latest_end <= month_end):
- Read upRead up
- Exclude checks
Used when a single item in parentheses follows an if, for, or other keyword.
Too many instance attributes (9/7) Open
class Record(object):
- Read upRead up
- Exclude checks
Used when class has too many instance attributes, try to reduce this to get a simpler (and so easier to use) class.
Variable name l
doesn't conform to snake_case naming style Open
l = []
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Constant name log
doesn't conform to UPPER_CASE naming style Open
log = logging.getLogger(__name__)
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Too many statements (98/50) Open
def get_ur(self, withhold_dns=False):
- Read upRead up
- Exclude checks
Used when a function or method has too many statements. You should then split it in smaller functions / methods.
Wrong continued indentation (add 3 spaces). Open
"VO", "VOGroup", "VORole", "CE", "GlobalJobId", "LrmsId",
- Read upRead up
- Exclude checks
TODO
VO
, VOGroup
, VORole
, CE
, GlobalJobId
, LrmsId
,
^ |
Variable name vo
doesn't conform to snake_case naming style Open
vo = 'None'
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Line too long (108/100) Open
"MachineName", "Queue", "MemoryReal", "MemoryVirtual", "Processors", "NodeCount"]
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Line too long (139/100) Open
"CpuDuration", "Processors", "NodeCount", "StartTime", "EndTime", "InfrastructureDescription", "InfrastructureType",
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Unnecessary parens after 'not' keyword Open
if not (month_start <= earliest_end <= month_end):
- Read upRead up
- Exclude checks
Used when a single item in parentheses follows an if, for, or other keyword.
standard import from xml.dom.minidom import Document
should be placed before from future.builtins import str
Open
from xml.dom.minidom import Document
- Read upRead up
- Exclude checks
Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)
Wrong continued indentation (add 13 spaces). Open
" doesn't contain a float.")
- Read upRead up
- Exclude checks
TODO
doesn't contain a float.
)
^ |
Unable to import 'future.builtins' Open
from future.builtins import object, str, zip
- Read upRead up
- Exclude checks
Used when pylint has been unable to import a module.