chrislit/abydos

View on GitHub
abydos/corpus/_unigram_corpus.py

Summary

Maintainability
A
0 mins
Test Coverage

Unnecessary else after return
Open

        if term in self.corpus:
Severity: Info
Found in abydos/corpus/_unigram_corpus.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.

Unused argument 'args'
Open

def _dd_default(*args: Any) -> Tuple[int, int]:
Severity: Minor
Found in abydos/corpus/_unigram_corpus.py by pylint

Used when a function or method argument is not used.

Unused variable 'count'
Open

            count, term_doc_count = self.corpus[term]
Severity: Minor
Found in abydos/corpus/_unigram_corpus.py by pylint

Used when a variable is defined but not used.

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

        corpus_text: str = '',
Severity: Info
Found in abydos/corpus/_unigram_corpus.py by pylint

TODO corpus_text: str = '', ^ |

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

        word_tokenizer: Optional[_Tokenizer] = None,
Severity: Info
Found in abydos/corpus/_unigram_corpus.py by pylint

TODO wordtokenizer: Optional[Tokenizer] = None, ^ |

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

        self,
Severity: Info
Found in abydos/corpus/_unigram_corpus.py by pylint

TODO self, ^ |

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

        word_transform: Optional[Callable[[str], str]] = None,
Severity: Info
Found in abydos/corpus/_unigram_corpus.py by pylint

TODO word_transform: Optional[Callable[[str], str]] = None, ^ |

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

        documents: int = 0,
Severity: Info
Found in abydos/corpus/_unigram_corpus.py by pylint

TODO documents: int = 0, ^ |

Variable name n doesn't conform to snake_case naming style
Open

                n = tokens[tok] * count
Severity: Info
Found in abydos/corpus/_unigram_corpus.py by pylint

Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

There are no issues that match your filters.

Category
Status