Showing 118 of 249 total issues
Function __init__
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(self, client, keys, user):
self._client = client
self.keys = keys
"""
Function __init__
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(self, client, keys, index=None):
super(Movie, self).__init__(client, keys, index)
self.title = None
"""
Function get
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def get(self, media=None, id=None, start_at=None, end_at=None, store=None,
Function update
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def update(self, username, id, name=None, description=None, privacy=None, display_numbers=None,
Function create
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, username, name, description=None, privacy='private', display_numbers=False,
Function construct_map
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def construct_map(client, d=None, interfaces=None):
if d is None:
d = {}
if interfaces is None:
- 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 get
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get(self, username, media=None, id=None, start_at=None, end_at=None, store=None,
extended=None, page=None, per_page=None, **kwargs):
if not media and id:
raise ValueError('The "id" parameter also requires the "media" parameter to be defined')
- 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 synchronized
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def synchronized(f_lock, mode='full'):
if mode == 'full':
mode = ['acquire', 'release']
elif isinstance(mode, str):
mode = [mode]
- 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 _process
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _process(self):
while self._running:
# Ensure code hasn't expired yet
if self.has_expired():
self.emit('expired')
- 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 query
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def query(self, query, media=None, year=None, fields=None, extended=None, page=None, per_page=None, **kwargs):
Function get
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def get(self, media=None, rating=None, store=None, extended=None, flat=False, page=None, per_page=None, **kwargs):
Function get
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def get(self, media=None, sort=None, store=None, extended=None, flat=False,
Function map_item
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def map_item(cls, client, store, item, media, key=None, parent=None, append=False, **kwargs):
Function get
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def get(self, username, media=None, sort=None, store=None, extended=None,
Function get
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def get(self, username, media=None, rating=None, store=None, extended=None,
Function action
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def action(self, action, movie=None, show=None, episode=None, progress=0.0, **kwargs):
"""Perform scrobble action.
:param action: Action to perform (either :code:`start`, :code:`pause` or :code:`stop`)
:type action: :class:`~python:str`
- 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 update_attributes
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def update_attributes(obj, dictionary, keys):
if not dictionary:
return
for key in keys:
- 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 lookup
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def lookup(self, id, service=None, media=None, extended=None, page=None, per_page=None, **kwargs):
Function get
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def get(self, username, media=None, store=None, extended=None, page=None, per_page=None, **kwargs):
Function items
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def items(self, username, id, media=None, extended=None, page=None, per_page=None, **kwargs):