Showing 4,191 of 4,191 total issues
Too many statements (52/50) Open
def __init__(
- Read upRead up
- Exclude checks
Used when a function or method has too many statements. You should then split it in smaller functions / methods.
Do not use len(SEQUENCE)
without comparison to determine if a sequence is empty Open
if not len(self._soft_intersection_precalc):
- Read upRead up
- Exclude checks
Used when Pylint detects that len(sequence) is being used without explicit comparison inside a condition to determine if a sequence is empty. Instead of coercing the length to a boolean, either rely on the fact that empty sequences are false or compare the length against a scalar.
Do not use len(SEQUENCE)
without comparison to determine if a sequence is empty Open
if not len(self._soft_intersection_precalc):
- Read upRead up
- Exclude checks
Used when Pylint detects that len(sequence) is being used without explicit comparison inside a condition to determine if a sequence is empty. Instead of coercing the length to a boolean, either rely on the fact that empty sequences are false or compare the length against a scalar.
Unnecessary elif
after return
Open
if self.params['alphabet'] is None:
- 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.
String statement has no effect Open
"""
- Read upRead up
- Exclude checks
Used when a string is used as a statement (which of course has no effect). This is a particular case of W0104 with its own message so you can easily disable it if you're using those strings as documentation, instead of comments.
Wrong hanging indentation before block (add 4 spaces). Open
tokenizer: Optional[_Tokenizer] = None,
- Read upRead up
- Exclude checks
TODO tokenizer: Optional[_Tokenizer] = None, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
src: str,
- Read upRead up
- Exclude checks
TODO src: str, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
**kwargs: Any
- Read upRead up
- Exclude checks
TODO **kwargs: Any ^ |
Unnecessary parens after 'not' keyword Open
if not (col_covered[col] | row_covered[row]):
- Read upRead up
- Exclude checks
Used when a single item in parentheses follows an if, for, or other keyword.
Do not use len(SEQUENCE)
without comparison to determine if a sequence is empty Open
if not len(self._soft_intersection_precalc):
- Read upRead up
- Exclude checks
Used when Pylint detects that len(sequence) is being used without explicit comparison inside a condition to determine if a sequence is empty. Instead of coercing the length to a boolean, either rely on the fact that empty sequences are false or compare the length against a scalar.
Too many nested blocks (6/5) Open
while step < 4:
- Read upRead up
- Exclude checks
Used when a function or a method has too many nested blocks. This makes the code less understandable and maintainable.
Variable name n
doesn't conform to snake_case naming style Open
n = self._population_unique_card()
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Wrong hanging indentation before block (add 4 spaces). Open
self,
- Read upRead up
- Exclude checks
TODO self, ^ |
Variable name b
doesn't conform to snake_case naming style Open
b = self._src_only_card()
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Wrong hanging indentation before block (add 4 spaces). Open
match_cost: float = 1,
- Read upRead up
- Exclude checks
TODO match_cost: float = 1, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
**kwargs: Any
- Read upRead up
- Exclude checks
TODO **kwargs: Any ^ |
Wrong hanging indentation before block (add 4 spaces). Open
tokenizer: Optional[_Tokenizer] = None,
- Read upRead up
- Exclude checks
TODO tokenizer: Optional[_Tokenizer] = None, ^ |
Variable name d
doesn't conform to snake_case naming style Open
d = self._total_complement_card()
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Wrong hanging indentation before block (add 4 spaces). Open
tokenizer: Optional[_Tokenizer] = None,
- Read upRead up
- Exclude checks
TODO tokenizer: Optional[_Tokenizer] = None, ^ |
Parameters differ from overridden 'dist_abs' method Open
def dist_abs(self, src: str, tar: str, normalized: bool = False) -> float:
- 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.