Showing 4,191 of 4,191 total issues
Too few public methods (1/2) Open
class SnowballNorwegian(_Snowball):
- Read upRead up
- Exclude checks
Used when class has too few public methods, so be sure it's really worth it.
Parameters differ from overridden 'encode_alpha' method Open
def encode_alpha(self, lname: str) -> str:
- Read upRead up
- Exclude checks
Used when a method has a different number of arguments than in the implemented interface or in an overridden method.
Too many lines in module (1026/1000) Open
# Copyright 2014-2020 by Christopher C. Little.
- Read upRead up
- Exclude checks
Used when a module has too many lines, reducing its readability.
Consider using enumerate instead of iterating with range and len Open
for i in range(len(alt_array)):
- Read upRead up
- Exclude checks
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
word: str, src: str, tar: str, post: Optional[Set[str]] = None
- Read upRead up
- Exclude checks
TODO word: str, src: str, tar: str, post: Optional[Set[str]] = None ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'aste',
- Read upRead up
- Exclude checks
TODO 'aste', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'ets',
- Read upRead up
- Exclude checks
TODO 'ets', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'erunt',
- Read upRead up
- Exclude checks
TODO 'erunt', ^ |
Unnecessary else
after return
Open
if word[:-3] in self._keep_que or word == 'que':
- Read upRead up
- Exclude checks
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.
Too many statements (85/50) Open
def stem(self, word: str) -> str:
- Read upRead up
- Exclude checks
Used when a function or method has too many statements. You should then split it in smaller functions / methods.
Wrong hanging indentation before block (add 4 spaces). Open
data_path: Optional[str] = None,
- Read upRead up
- Exclude checks
TODO data_path: Optional[str] = None, ^ |
Else clause on loop without a break statement Open
else:
- Read upRead up
- Exclude checks
Loops should only have an else clause if they can exit early with a break statement, otherwise the statements under else should be on the same scope as the loop itself.
Argument name n
doesn't conform to snake_case naming style Open
def _ncr(n: float, r: float) -> float:
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Argument name r
doesn't conform to snake_case naming style Open
def _ncr(n: float, r: float) -> float:
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Too many branches (15/12) Open
def encode(self, fname: str) -> str:
- Read upRead up
- Exclude checks
Used when a function or method has too many branches, making it hard to follow.
Wrong hanging indentation before block (add 4 spaces). Open
concat: bool,
- Read upRead up
- Exclude checks
TODO concat: bool, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
final_rules2: Tuple[Any, ...],
- Read upRead up
- Exclude checks
TODO final_rules2: Tuple[Any, ...], ^ |
Wrong hanging indentation before block (add 4 spaces). Open
language_arg: int = 0,
- Read upRead up
- Exclude checks
TODO language_arg: int = 0, ^ |
Too many local variables (20/15) Open
def _apply_final_rules(
- Read upRead up
- Exclude checks
Used when a function or method has too many local variables.
Wrong hanging indentation before block (add 4 spaces). Open
word: str, src: str, tar: str, pre: Optional[Set[str]] = None
- Read upRead up
- Exclude checks
TODO word: str, src: str, tar: str, pre: Optional[Set[str]] = None ^ |