Showing 4,191 of 4,191 total issues
Consider using enumerate instead of iterating with range and len Open
for k in range(len(phonetic_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
'untur',
- Read upRead up
- Exclude checks
TODO 'untur', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'unt',
- Read upRead up
- Exclude checks
TODO 'unt', ^ |
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
match_mode: str = 'approx',
- Read upRead up
- Exclude checks
TODO match_mode: str = 'approx', ^ |
Too many branches (16/12) Open
def _apply_final_rules(
- Read upRead up
- Exclude checks
Used when a function or method has too many branches, making it hard to follow.
Consider merging these comparisons with in
to alternate not in ('', '[0]')
Open
if alternate != '' and alternate != '[0]':
- Read upRead up
- Exclude checks
To check if a variable is equal to one of many values,combine the values into a tuple and check if the variable is contained in
it instead of checking for equality against each of the values.This is faster and less verbose.
Unnecessary elif
after return
Open
if attrib == uninitialized or strip:
- 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
'aren',
- Read upRead up
- Exclude checks
TODO 'aren', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
or (word[-2:] == 'st' and word[-3] in self._st_ending)
- Read upRead up
- Exclude checks
TODO or (word[-2:] == 'st' and word[-3] in self.stending) ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and len(word[r2_start:]) >= 2
- Read upRead up
- Exclude checks
TODO and len(word[r2_start:]) >= 2 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
abydos_data, os.W_OK
- Read upRead up
- Exclude checks
TODO abydosdata, os.WOK ^ |
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, phonetic: str, target: str, language_arg: int
- Read upRead up
- Exclude checks
TODO self, phonetic: str, target: str, language_arg: int ^ |
Wrong hanging indentation before block (add 4 spaces). Open
len(word) > 2
- Read upRead up
- Exclude checks
TODO len(word) > 2 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and word[-2] in self._s_endings
- Read upRead up
- Exclude checks
TODO and word[-2] in self.sendings ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and len(word) >= 6
- Read upRead up
- Exclude checks
TODO and len(word) >= 6 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
path: Optional[str] = None,
- Read upRead up
- Exclude checks
TODO path: Optional[str] = None, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
url: Optional[str] = None,
- Read upRead up
- Exclude checks
TODO url: Optional[str] = None, ^ |
Variable name ix
doesn't conform to snake_case naming style Open
with urllib.request.urlopen(url) as ix: # noqa: S310
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).