chrislit/abydos

View on GitHub

Showing 383 of 4,191 total issues

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

    def __init__(
Severity: Minor
Found in abydos/distance/_minkowski.py - About 35 mins to fix

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

        def __init__(
    Severity: Minor
    Found in abydos/distance/_gini_ii.py - About 35 mins to fix

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

          def __init__(
      Severity: Minor
      Found in abydos/distance/_gower_legendre.py - About 35 mins to fix

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

            def __init__(
        Severity: Minor
        Found in abydos/distance/_azzoo.py - About 35 mins to fix

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

              def __init__(
          Severity: Minor
          Found in abydos/distance/_phonetic_edit_distance.py - About 35 mins to fix

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

                def __init__(
            Severity: Minor
            Found in abydos/distance/_meta_levenshtein.py - About 35 mins to fix

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

                  def __init__(
              Severity: Minor
              Found in abydos/distance/_goodman_kruskal_tau_b.py - About 35 mins to fix

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

                    def __init__(
                Severity: Minor
                Found in abydos/distance/_fellegi_sunter.py - About 35 mins to fix

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

                      def __init__(
                  Severity: Minor
                  Found in abydos/distance/_levenshtein.py - About 35 mins to fix

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

                        def __init__(
                    Severity: Minor
                    Found in abydos/distance/_yjhhr.py - About 35 mins to fix

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

                          def _cond_n(self, word: str, suffix_len: int) -> bool:
                              """Return Lovins' condition N.
                      
                              Parameters
                              ----------
                      Severity: Minor
                      Found in abydos/stemmer/_lovins.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 stem has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def stem(self, word: str) -> str:
                              """Return the S-stemmed form of a word.
                      
                              Parameters
                              ----------
                      Severity: Minor
                      Found in abydos/stemmer/_s_stemmer.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 encode has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def encode(self, word: str) -> str:
                              """Return the phonemic representation of a word.
                      
                              Parameters
                              ----------
                      Severity: Minor
                      Found in abydos/phonetic/_ainsworth.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 encode has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def encode(self, word: str) -> str:
                              """Return the SoundD code.
                      
                              Parameters
                              ----------
                      Severity: Minor
                      Found in abydos/phonetic/_sound_d.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 encode has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def encode(self, word: str) -> str:
                              """Return the Parmar-Kumbharana encoding of a word.
                      
                              Parameters
                              ----------
                      Severity: Minor
                      Found in abydos/phonetic/_parmar_kumbharana.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 _m_degree has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def _m_degree(self, term: str) -> int:
                              """Return Porter helper function _m_degree value.
                      
                              m-degree is equal to the number of V to C transitions
                      
                      
                      Severity: Minor
                      Found in abydos/stemmer/_porter.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 heronian_mean has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def heronian_mean(nums: Sequence[float]) -> float:
                          r"""Return Heronian mean.
                      
                          The Heronian mean is:
                      
                      
                      Severity: Minor
                      Found in abydos/stats/_mean.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 encode has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def encode(self, word: str) -> str:
                              """Return the PHONIC code for a word.
                      
                              Parameters
                              ----------
                      Severity: Minor
                      Found in abydos/phonetic/_phonic.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 fingerprint has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def fingerprint(self, word: str) -> str:
                              """Return the omission key.
                      
                              Parameters
                              ----------
                      Severity: Minor
                      Found in abydos/fingerprint/_omission_key.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 __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def __init__(
                              self,
                              word_approx_min: float = 0.3,
                              char_approx_min: float = 0.73,
                              tests: Union[int, TIterable[str]] = 2 ** 12 - 1,
                      Severity: Minor
                      Found in abydos/distance/_synoname.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