Showing 286 of 616 total issues
Function title
has 13 arguments (exceeds 7 allowed). Consider refactoring. Open
def title(
Function color_line
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
def color_line(self, line: str, line_ref: str | None = None) -> str:
"""Color line characters.
If line_ref is None, the whole line is colored.
If line_ref[i] is not blank, line[i] is colored.
- 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 16 (exceeds 10 allowed). Consider refactoring. Open
def __init__(self, fromurl, **kwargs) -> None:
"""Initializer.
:raises pywikibot.exceptions.ServerError: a server error
occurred while loading the site
- 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 _wbset_action
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
def _wbset_action(self, itemdef, action: str, action_data,
**kwargs) -> dict:
"""Execute wbset{action} on a Wikibase entity.
Supported actions are:
- 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 input_sections
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
def input_sections(variant: str,
sections: list[_ConfigSection],
skip: Callable | None = None,
force: bool = False,
default: str = 'n') -> list[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 _fetch
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
def _fetch(self, modules: set | frozenset) -> None:
"""Get paraminfo for multiple modules without initializing beforehand.
:param modules: API modules to load and which haven't been loaded yet.
"""
- 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 stream_output
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
def stream_output(self, text, targetStream=None) -> None:
"""Output text to a stream.
If a character can't be displayed in the encoding used by the user's
terminal, it will be replaced with a question mark or by a
- 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 allpages
has 13 arguments (exceeds 7 allowed). Consider refactoring. Open
def allpages(
Function parse
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
def parse(self) -> Iterator[XmlEntry]:
"""Generator using ElementTree iterparse function.
.. versionchanged:: 7.2
if a ParseError occurs it can be handled by the callable
- 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 main
has 36 lines of code (exceeds 30 allowed). Consider refactoring. Open
def main(*args: str) -> None:
"""Process command line arguments and invoke bot.
If args is an empty list, sys.argv is used.
Function __init__
has 12 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self, cat_title: str | None, list_title: str | None,
Function __init__
has 12 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 12 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self,
Function categorymembers
has 12 arguments (exceeds 7 allowed). Consider refactoring. Open
def categorymembers(
Function newpages
has 12 arguments (exceeds 7 allowed). Consider refactoring. Open
def newpages(
Function main
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def main(*args: str) -> None:
"""Process command line arguments and invoke bot.
If args is an empty list, sys.argv is used.
- 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 load_page
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def load_page(self) -> None:
"""Load the page to be archived and break it up into threads.
.. versionchanged:: 7.6
If `-keep` option is given run through all threads and set
- 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 main
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def main(*args: str) -> None:
"""Process command line arguments and invoke bot.
If args is an empty list, sys.argv is used.
- 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 __iter__
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def __iter__(self):
"""Iterator method."""
try:
for entry in self.parser:
if self.skipping:
- 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 purgepages
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def purgepages(self, flush=False):
"""Purge a bulk of page if rate limit exceeded.
.. versionadded:: 8.0
.. versionchanged:: 9.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"