Showing 4,191 of 4,191 total issues
Too many statements (65/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.
Too few public methods (1/2) Open
class SnowballDutch(_Snowball):
- Read upRead up
- Exclude checks
Used when class has too few public methods, so be sure it's really worth it.
Wrong hanging indentation before block (add 4 spaces). Open
self,
- Read upRead up
- Exclude checks
TODO self, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
self._var == 'Adams'
- Read upRead up
- Exclude checks
TODO self._var == 'Adams' ^ |
Method could be a function Open
def _cond_t(self, word: str, suffix_len: int) -> bool:
- Read upRead up
- Exclude checks
Used when a method doesn't use its bound instance, and so could be written as a function.
Method could be a function Open
def _cond_x(self, word: str, suffix_len: int) -> bool:
- Read upRead up
- Exclude checks
Used when a method doesn't use its bound instance, and so could be written as a function.
Wrong hanging indentation before block (add 4 spaces). Open
and word[i + 1] in self._vowels
- Read upRead up
- Exclude checks
TODO and word[i + 1] in self._vowels ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and word[-3] not in self._not_s_endings
- Read upRead up
- Exclude checks
TODO and word[-3] not in self.nots_endings ^ |
Consider using enumerate instead of iterating with range and len Open
for i in range(0, len(word)):
- 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
var: str = 'standard',
- Read upRead up
- Exclude checks
TODO var: str = 'standard', ^ |
Unnecessary else
after return
Open
if word.isdigit():
- 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.
Unnecessary else
after return
Open
if (
- 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.
Wrong hanging indentation before block (add 4 spaces). Open
'ism',
- Read upRead up
- Exclude checks
TODO 'ism', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'iti',
- Read upRead up
- Exclude checks
TODO 'iti', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'al',
- Read upRead up
- Exclude checks
TODO 'al', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
len(word[r2_start:]) >= 3
- Read upRead up
- Exclude checks
TODO len(word[r2_start:]) >= 3 ^ |
Consider using enumerate instead of iterating with range and len Open
for i in range(0, len(word)):
- 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
'heter',
- Read upRead up
- Exclude checks
TODO 'heter', ^ |
Method could be a function Open
def _cond_g(self, word: str, suffix_len: int) -> bool:
- Read upRead up
- Exclude checks
Used when a method doesn't use its bound instance, and so could be written as a function.
Method could be a function Open
def _cond_k(self, word: str, suffix_len: int) -> bool:
- Read upRead up
- Exclude checks
Used when a method doesn't use its bound instance, and so could be written as a function.