Showing 30 of 113 total issues
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return Leg.BEWTEEN
Avoid too many return
statements within this function. Open
return
Function add_ranking_place
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def add_ranking_place(items: list, field: str):
"""
Adds 'place' to all items according to their order.
If the value of the specified field on any given item matches the value on the field of the previous item,
then the item gets the same place as its predecessor.
- 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 scrape_association
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def scrape_association(url: str, options):
html = http.get_text(url)
dom = parsing.html_dom(html)
abbreviation = parsing.parse_association_abbreviation(url)
- 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 create_or_update_team
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_or_update_team(name, short_name, league, club, bhv_id, logger: logging.Logger = logging.getLogger()):
team = Team.objects.filter(bhv_id=bhv_id).first()
if team is None:
team = Team.objects.create(name=name, short_name=short_name, league=league, club=club, bhv_id=bhv_id)
logger.info("CREATED Team: %s", team)
- 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 scrape_sports_hall
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def scrape_sports_hall(game_row, processed: set[int] | None = None) -> SportsHall | None:
if processed is None:
processed = set()
if len(game_row[3]) != 1:
- 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"