Showing 6 of 12 total issues
File bulk.py
has 431 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from .utils import urlforversion
__all__ = ['JobRunnerMixin']
_segmentation_options = {
Function jobs_download
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
def jobs_download(self, job_id, fd,
segmentation=('valids', 'invalids',
'catchalls', 'unknowns'),
appends=(),
yes_no_representation='int',
- 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 jobs_create
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def jobs_create(self, input, from_url=False, filename=None,
Function raw_search
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def raw_search(self,
Function jobs_download
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def jobs_download(self, job_id, fd,
Function _check_response
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def _check_response(self, resp):
"""Checks a response for errors and throws if they any present"""
# first check that there were no errors on the wire
resp.raise_for_status()
- 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"