Function iter_convert_texts_panflute_to_markdown
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def iter_convert_texts_panflute_to_markdown(
elems: Iterable[ListContainer],
extra_args: Optional[List[str]] = None,
seperator: str = np.random.randint(65, 91, size=256, dtype=np.uint8).view('S256')[0].decode(),
) -> Iterator[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 _find_type_origin
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _find_type_origin(type_hint: Any) -> Generator[Any, None, None]:
if isinstance(type_hint, _SpecialForm):
# case of Any, ClassVar, Final, Literal,
# NoReturn, Optional, or Union without parameters
yield 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"
Further reading
Function _find_type_origin
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _find_type_origin(type_hint: Any) -> Generator[Any, None, None]:
if isinstance(type_hint, _SpecialForm):
# case of Any, ClassVar, Final, Literal,
# NoReturn, Optional, or Union without parameters
yield 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"
Further reading
Function convert_texts
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert_texts(
Function get_yaml_dumper
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_yaml_dumper():
try:
from yamlloader.ordereddict.dumpers import CSafeDumper as Dumper
except ImportError:
try:
- 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"