Showing 1,557 of 1,564 total issues
standard import from datetime import datetime
should be placed before from future.builtins import str
Open
from datetime import datetime
- Read upRead up
- Exclude checks
Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)
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)
Variable name UR_OPEN
doesn't conform to snake_case naming style Open
UR_OPEN = ('<sr:StorageUsageRecords xmlns:sr="http://eu-emi.eu/namespaces/2011/02/storagerecord">')
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Variable name rc
doesn't conform to snake_case naming style Open
rc = self._record_content
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Wrong continued indentation (add 6 spaces). Open
"GlobalUserName", "FQAN", "VO", "VOGroup", "VORole", "WallDuration",
- Read upRead up
- Exclude checks
TODO
GlobalUserName
, FQAN
, VO
, VOGroup
, VORole
, WallDuration
,
^ |
Wrong continued indentation (add 4 spaces). Open
"VOGroup", "VORole", "WallDuration", "CpuDuration", "Processors",
- Read upRead up
- Exclude checks
TODO
VOGroup
, VORole
, WallDuration
, CpuDuration
, Processors
,
^ |
Too many statements (107/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.
Too many branches (13/12) Open
def _check_fields(self):
- Read upRead up
- Exclude checks
Used when a function or method has too many branches, making it hard to follow.
Too many statements (71/50) Open
def get_ur(self):
- Read upRead up
- Exclude checks
Used when a function or method has too many statements. You should then split it in smaller functions / methods.
Missing class docstring Open
class InvalidRecordException(Exception):
- Read upRead up
- Exclude checks
Used when a class has no docstring.Even an empty class must have a docstring.
Unnecessary else
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.
Too many instance attributes (8/7) Open
class CloudSummaryRecord(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.
Wrong continued indentation (remove 6 spaces). Open
"StorageMedia", "StorageClass", "FileCount", "DirectoryPath",
- Read upRead up
- Exclude checks
TODO
StorageMedia
, StorageClass
, FileCount
, DirectoryPath
,
| ^
Wrong continued indentation (remove 6 spaces). Open
"LocalUser", "LocalGroup", "UserIdentity",
- Read upRead up
- Exclude checks
TODO
LocalUser
, LocalGroup
, UserIdentity
,
| ^
Argument name ur
doesn't conform to snake_case naming style Open
def unload_latest(self, table_name, ur=False):
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
standard import import os
should be placed before from future import standard_library
Open
import os
- Read upRead up
- Exclude checks
Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)
Unnecessary parens after 'if' keyword Open
if (int(rc['Month']) == 12):
- Read upRead up
- Exclude checks
Used when a single item in parentheses follows an if, for, or other keyword.
Too many local variables (22/15) Open
def get_ur(self):
- Read upRead up
- Exclude checks
Used when a function or method has too many local variables.
Wrong continued indentation (add 6 spaces). Open
"ServiceLevel"]
- Read upRead up
- Exclude checks
TODO
ServiceLevel
]
^ |
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...).