IlyaGusev/rnnmorph

View on GitHub

Showing 39 of 43 total issues

File model.py has 360 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Severity: Minor
Found in rnnmorph/model.py - About 4 hrs to fix

    Function __iter__ has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in rnnmorph/batch_generator.py - About 3 hrs 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 __get_lemma has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in rnnmorph/predictor.py - About 2 hrs 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 evaluate has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in rnnmorph/model.py - About 2 hrs 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 get_sample has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in rnnmorph/batch_generator.py - About 2 hrs 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 train has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in rnnmorph/train.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 convert_from_conllu has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in rnnmorph/data_preparation/converter.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 build has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in rnnmorph/model.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 get_char_model has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    Severity: Major
    Found in rnnmorph/char_embeddings_model.py - About 1 hr to fix

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

      Severity: Minor
      Found in rnnmorph/predictor.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 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      Severity: Major
      Found in rnnmorph/batch_generator.py - About 1 hr to fix

        Function __init__ has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

        Severity: Minor
        Found in rnnmorph/predictor.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 __build_vector has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

        Severity: Minor
        Found in rnnmorph/data_preparation/grammeme_vectorizer.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 build has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Severity: Minor
        Found in rnnmorph/model.py - About 1 hr to fix

          Function __init__ has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Severity: Minor
          Found in rnnmorph/config.py - About 1 hr to fix

            Function get_sample has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            Severity: Major
            Found in rnnmorph/batch_generator.py - About 1 hr to fix

              Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              Severity: Major
              Found in rnnmorph/predictor.py - About 1 hr to fix

                Function load_train has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                Severity: Minor
                Found in rnnmorph/model.py - About 55 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 shrink_w2v has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                Severity: Minor
                Found in rnnmorph/util/embeddings.py - About 55 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

                Avoid deeply nested control flow statements.
                Open

                Severity: Major
                Found in rnnmorph/batch_generator.py - About 45 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language