Showing 7 of 7 total issues
Function get_rbr
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def get_rbr(source: BeautifulSoup) -> str:
"""Get the result of the shindan from the source.
Args:
----
- 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 shindan
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def shindan(
page_id: int,
shindan_name: str,
*,
wait: bool | None = 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 get_choices
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_choices(source: BeautifulSoup) -> dict[int, str]:
"""Get the choices from the shindan source.
Args:
----
- 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 get_result_by_ai
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_result_by_ai(
Function __get_result
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __get_result(
Function get_result_by_check
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_result_by_check(
Function get_user_inputs
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_user_inputs(
source: BeautifulSoup,
shindan_name: str,
) -> UserInputs:
"""Get user inputs from the shindan source.
- 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"