Cielquan/formelsammlung

View on GitHub

Showing 9 of 9 total issues

Function _remove_module_docstring has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

def _remove_module_docstring(  # pylint: disable=R0913
Severity: Major
Found in docs/source/conf.py - About 1 hr to fix

    Function _get_config_value has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def _get_config_value(section: str, key: str) -> str:  # noqa: CCR001
        """Extract a config value from pyproject.toml file.
    
        :return: config value
        """
    Severity: Minor
    Found in prep_release.py - About 1 hr to fix

    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_built_docs has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def _find_built_docs(app_root: str, steps_up_the_tree: int = 3) -> Path:
            """Find built sphinx html docs.
    
            :param app_root: Root directory of the app.
            :param steps_up_the_tree: Amount of steps to go up the file tree, defaults to 3
    Severity: Minor
    Found in src/formelsammlung/flask_sphinx_docs.py - About 1 hr to fix

    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 env_exe_runner has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    def env_exe_runner(
        venv_runner: List[str],
        envs: List[str],
        tool: str,
        tool_args: Optional[List[str]] = None,
    Severity: Minor
    Found in src/formelsammlung/env_exe_runner.py - About 1 hr to fix

    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 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(
    Severity: Major
    Found in src/formelsammlung/envvar.py - About 1 hr to fix

      Function getenv_typed has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def getenv_typed(
      Severity: Minor
      Found in src/formelsammlung/envvar.py - About 45 mins to fix

        Function get_venv_tmp_dir has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        def get_venv_tmp_dir(
            venv_path: Union[str, Path],
            search_tmp_dirs: Optional[Tuple[str]] = None,
            create_if_missing: bool = False,
            create_dir_name: Optional[str] = None,
        Severity: Minor
        Found in src/formelsammlung/venv_utils.py - About 35 mins to fix

        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 _set_config_value has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        def _set_config_value(section: str, key: str, value: str) -> None:
            """Set a config value in pyproject.toml file."""
            with open("pyproject.toml", encoding="utf8") as pyproject_file:
                pyproject = pyproject_file.read().split("\n")
        
        
        Severity: Minor
        Found in prep_release.py - About 35 mins to fix

        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 getenv_typed has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            def getenv_typed(
                self,
                var_name: str,
                default: Any = None,  # noqa: ANN401
                rv_type: Optional[type] = None,
        Severity: Minor
        Found in src/formelsammlung/envvar.py - About 35 mins to fix

        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

        Severity
        Category
        Status
        Source
        Language