Showing 118 of 249 total issues
Function shows
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def shows(self, id=None, start_at=None, end_at=None, store=None, **kwargs):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get(self, media, collection=None, start_date=None, days=None, **kwargs):
Function movies
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def movies(self, id=None, start_at=None, end_at=None, store=None, **kwargs):
Function seasons
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def seasons(self, id=None, start_at=None, end_at=None, store=None, **kwargs):
Function episode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def episode(cls, client, store, item, append=False, **kwargs):
Function season_episode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def season_episode(cls, client, season, episode_num, item=None, **kwargs):
Function _construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _construct(cls, client, keys, info=None, index=None, **kwargs):
Function get
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get(self, page):
request = self.request.copy()
# Build query parameters
query = self.query.copy()
- 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
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def update(self, username, id, name=None, description=None, privacy=None, display_numbers=None,
allow_comments=None, return_type='object', **kwargs):
data = {
'name': name,
'description': description,
- 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 start
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def start(self, daemon=None):
if self._active or self._thread:
raise Exception('Poller already started')
# Construct thread process wrapper
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
def get(self, media=None, store=None, params=None, query=None, flat=False, **kwargs):
if not params:
params = []
params.insert(0, media)
- 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 transform_headers
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def transform_headers(self):
headers = self.kwargs.get('headers') or {}
headers['Content-Type'] = 'application/json'
headers['trakt-api-version'] = '2'
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
def get(self, username, media=None, store=None, extended=None, page=None, per_page=None, **kwargs):
if not media or media not in ['shows', 'movies']:
raise ValueError('The "media" have to be one of ["shows", "media"]')
- 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
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _update(self, info=None, **kwargs):
if not info:
return
super(SeasonProgress, self)._update(info, **kwargs)
- 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 off
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def off(self, event=None, func=None):
self.__log('off(event: %s, func: %s)', repr(event), repr(func))
self.__ensure_constructed()
- 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
Avoid too many return
statements within this function. Open
return User._construct(client, keys, item, **kwargs)
Avoid too many return
statements within this function. Open
return Person._construct(client, keys, item, **kwargs)
Avoid too many return
statements within this function. Open
return items
Avoid too many return
statements within this function. Open
return data
Avoid too many return
statements within this function. Open
return Comment._construct(client, keys, item, **kwargs)