Showing 351 of 351 total issues
Function collect_additional_context
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def collect_additional_context(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function collect_additional_context
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def collect_additional_context(
Avoid deeply nested control flow statements. Open
Open
with new_option._unfrozen():
new_option.text_parse_mode = self.defaults.text_parse_mode
new_val.append(new_option)
Function check_update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def check_update(self, update: object) -> Optional[Union[bool, object]]:
"""Determines whether an update should be passed to this handler's :attr:`callback`.
Args:
update (:class:`telegram.Update` | :obj:`object`): Incoming update.
- 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 a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(
self,
obj: Union[IO[bytes], bytes, str],
filename: Optional[str] = None,
attach: bool = False,
- 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 collect_additional_context
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def collect_additional_context(
Avoid deeply nested control flow statements. Open
Open
if merged:
return merged
return True
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Avoid deeply nested control flow statements. Open
Open
if raw:
continue
effective_name = effective_name[:-4]
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function autodoc_skip_member
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def autodoc_skip_member(app, what, name, obj, skip, options):
Function autodoc_process_docstring
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def autodoc_process_docstring(
Consider simplifying this complex logical expression. Open
Open
if message := (
self.message
or self.edited_message
or self.channel_post
or self.edited_channel_post
Consider simplifying this complex logical expression. Open
Open
if isinstance(val, DefaultValue):
data[key] = self.defaults.api_defaults.get(key, val.value)
# 2)
elif isinstance(val, datetime):
Function _parse_html
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _parse_html(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(