Showing 31 of 31 total issues
File mixins.py
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
from __future__ import annotations
import dataclasses
import logging
from abc import ABC, abstractmethod
Function _find_raw
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def _find_raw(
self,
specification: Optional[Specification],
*,
entity_dao_class: Optional[EntityDao] = 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 find
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def find(
self,
specification: Optional[Specification] = None,
*,
offset: int = 0,
- 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 find
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def find(
self,
specification: Optional[Specification] = None,
*,
offset: int = 0,
- 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 asdict
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def asdict(self, *, skip_types=None, use_timezone_z=False):
if skip_types is None:
skip_types = []
field_names = set(
f.name for f in fields(self) if f.name not in self.calculated_fields()
- 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 find_one
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def find_one(self, specification: Specification) -> EntityType:
_filter = FirestoreSpecificationBuilder.build(specification)
collection: Union[BaseCollectionReference, BaseQuery] = self.collection
if _filter:
if isinstance(_filter, list):
- 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 __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __get_direct_related_data
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def __get_direct_related_data(self, entity: EntityType):
direct_data = {}
related_data = {}
def field_name(field):
- 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 find_filter
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def find_filter(
Function _find_raw
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _find_raw(
Function __update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __update(
self, entity: EntityType, entity_dao_class: EntityDao, *, upsert=False
) -> EntityType:
"""Recursive function"""
with self:
- 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_compound_entities
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __update_compound_entities(self, entity, entity_dao_class, list_fields):
for field in list_fields:
item_dao_class = get_type_hints(entity_dao_class)[field].__args__[0]
# check for new items
- 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 setup_mongo_connection
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def setup_mongo_connection(
Function find
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find(
Function find
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find(
Function find
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find(
Function find
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find(
Function find
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find(
Function find
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find(
Function find
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def find(