chrislit/abydos

View on GitHub

Showing 4,191 of 4,191 total issues

Wrong hanging indentation before block (add 4 spaces).
Open

            'rr',
Severity: Info
Found in abydos/stemmer/_lovins.py by pylint

TODO 'rr', ^ |

Merge this if statement with the enclosing one.
Open

            if src_ln[1:2] == tar_ln[1:2] and (
Severity: Major
Found in abydos/distance/_synoname.py by sonar-python

Merging collapsible if statements increases the code's readability.

Noncompliant Code Example

if condition1:
    if condition2:
        # ...

Compliant Solution

if condition1 and condition2:
    # ...

Refactor this function to reduce its Cognitive Complexity from 68 to the 15 allowed.
Open

    def sim(self, src: str, tar: str) -> float:
Severity: Critical
Found in abydos/distance/_strcmp95.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.
Open

    def sim(self, src: str, tar: str) -> float:

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Wrong hanging indentation before block (add 4 spaces).
Open

                self._tp == other.true_pos()
Severity: Info
Found in abydos/stats/_confusion_table.py by pylint

TODO self.tp == other.truepos() ^ |

Wrong hanging indentation before block (add 4 spaces).
Open

            'erens',
Severity: Info
Found in abydos/stemmer/_snowball_danish.py by pylint

TODO 'erens', ^ |

Wrong hanging indentation before block (add 4 spaces).
Open

            'pp',
Severity: Info
Found in abydos/stemmer/_lovins.py by pylint

TODO 'pp', ^ |

Refactor this function to reduce its Cognitive Complexity from 47 to the 15 allowed.
Open

    def sim(self, src: str, tar: str) -> float:
Severity: Critical
Found in abydos/distance/_jaro_winkler.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.
Open

    def sim(self, src: str, tar: str) -> float:
Severity: Critical
Found in abydos/distance/_vps.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

TODO found
Open

    # TODO(shoyer): remove when all methods are defined
Severity: Minor
Found in stubs/numpy/__init__.pyi by fixme

Unnecessary else after return
Open

    if len(nums) == 2:
Severity: Info
Found in abydos/stats/_mean.py by pylint

Used in order to highlight an unnecessary block of code following an if containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement.

Wrong hanging indentation before block (add 4 spaces).
Open

    tar_collection: Union[Sequence[str], Set[str]],
Severity: Info
Found in abydos/stats/_pairwise.py by pylint

TODO tar_collection: Union[Sequence[str], Set[str]], ^ |

Consider using enumerate instead of iterating with range and len
Open

    for i in range(len(collection)):
Severity: Info
Found in abydos/stats/_pairwise.py by pylint

Emitted when code that iterates with range and len is encountered. Such code can be simplified by using the enumerate builtin.

Wrong hanging indentation before block (add 4 spaces).
Open

                and self._tn == other[1]
Severity: Info
Found in abydos/stats/_confusion_table.py by pylint

TODO and self._tn == other[1] ^ |

Wrong hanging indentation before block (add 4 spaces).
Open

            'ered',
Severity: Info
Found in abydos/stemmer/_snowball_danish.py by pylint

TODO 'ered', ^ |

Wrong hanging indentation before block (add 4 spaces).
Open

            'erer',
Severity: Info
Found in abydos/stemmer/_snowball_danish.py by pylint

TODO 'erer', ^ |

Wrong hanging indentation before block (add 4 spaces).
Open

                word[:-1]
Severity: Info
Found in abydos/stemmer/_porter.py by pylint

TODO word[:-1] ^ |

Refactor this function to reduce its Cognitive Complexity from 88 to the 15 allowed.
Open

    def _synoname_word_approximation(
Severity: Critical
Found in abydos/distance/_synoname.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Merge this if statement with the enclosing one.
Open

            if src_fn and tar_fn:
Severity: Major
Found in abydos/distance/_synoname.py by sonar-python

Merging collapsible if statements increases the code's readability.

Noncompliant Code Example

if condition1:
    if condition2:
        # ...

Compliant Solution

if condition1 and condition2:
    # ...

Refactor this function to reduce its Cognitive Complexity from 34 to the 15 allowed.
Open

    def dist_abs(self, src: str, tar: str) -> float:
Severity: Critical
Found in abydos/distance/_typo.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Severity
Category
Status
Source
Language