Showing 8 of 20 total issues
File field.py
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""
crython/field
~~~~~~~~~~~~~
Contains functionality for representing an individual field within an expression.
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, second, minute, hour, day, month, weekday, year, reboot=False, logger=None):
Function run
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def run(self):
"""
Background function that processes all registered jobs and invokes them based on their context and expression.
"""
self.logger.info('{0} started'.format(self.name))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function from_number
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def from_number(cls, value, name, min, max, specials, *args, **kwargs):
Function from_iterable
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def from_iterable(cls, value, name, min, max, specials, *args, **kwargs):
Function from_str
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def from_str(cls, value, name, min, max, specials, *args, **kwargs):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, value, name, min, max, specials):
Function _expression_str_to_dict
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _expression_str_to_dict(expression, expression_field_count=FIELD_COUNT, field_names=field.NAMES,