Showing 708 of 708 total issues
Function __init__
has 34 lines of code (exceeds 30 allowed). Consider refactoring. Open
def __init__(self, photo_description, photo, filename) -> None:
"""Initializer."""
for module in (idlelib, tkinter):
if isinstance(module, ImportError):
raise module
Function __init__
has 12 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self, cat_title: str | None, list_title: str | None,
Function title
has 12 arguments (exceeds 7 allowed). Consider refactoring. Open
def title(
Function newpages
has 12 arguments (exceeds 7 allowed). Consider refactoring. Open
def newpages(
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 __init__
has 12 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self,
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 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 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"
Further reading
Function pagelanglinks
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def pagelanglinks(
self,
page: pywikibot.Page,
*,
total: int | None = 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 normalize
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def normalize(self) -> WbTime:
"""Normalizes the WbTime object to account for precision.
Normalization is needed because WbTime objects can have hidden
values that affect naive comparisons, such as an object set to
- 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 isDisambig
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def isDisambig(self) -> bool:
"""Return True if this is a disambiguation page, False otherwise.
By default, it uses the Disambiguator extension's result. The
identification relies on the presence of the ``__DISAMBIG__``
- 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 __getattr__
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def __getattr__(self, name: str):
"""Delegate undefined methods calls to the Family object.
.. versionchanged:: 9.0
Only delegate to public Family methods which have ``code`` as
- 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 change_base_dir
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def change_base_dir():
"""Create a new user directory."""
while True:
new_base = pywikibot.input('New user directory? ')
new_base = os.path.abspath(new_base)
- 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 _detect_win32_editor
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def _detect_win32_editor() -> str:
"""Detect the best Win32 editor."""
# Notepad is even worse than our Tkinter editor.
unusable_exes = ['notepad.exe',
'py.exe',
- 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 _ocr_callback
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def _ocr_callback(
self,
cmd_uri: str,
parser_func: Callable[[str], str] | None = None,
ocr_tool: str | None = 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 select
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def select(self,
query: str,
full_data: bool = False,
headers: dict[str, str] | None = None
) -> list[dict[str, str]] | 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 parsevalue
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def parsevalue(self, datatype: str, values: list[str],
options: dict[str, Any] | None = None,
language: str | None = None,
validate: bool = False) -> list[Any]:
"""
- 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"