Showing 4,191 of 4,191 total issues
Wrong hanging indentation before block (add 4 spaces). Open
and self._fn == other[3]
- Read upRead up
- Exclude checks
TODO and self._fn == other[3] ^ |
Refactor this function to reduce its Cognitive Complexity from 20 to the 15 allowed. Open
def _isg_i(self, src: str, tar: str) -> float:
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 30 to the 15 allowed. Open
def _alignment_matrix(
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Wrong hanging indentation before block (add 4 spaces). Open
'ende',
- Read upRead up
- Exclude checks
TODO 'ende', ^ |
Refactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed. Open
def tokenize(self, string: str) -> 'QGrams':
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Wrong hanging indentation before block (add 4 spaces). Open
'erne',
- Read upRead up
- Exclude checks
TODO 'erne', ^ |
TODO found Open
type, # TODO: enumerate these when we add type hints for numpy scalars
- Exclude checks
TODO found Open
# TODO: add better annotations when ctypes is stubbed out
- Exclude checks
Wrong hanging indentation before block (add 4 spaces). Open
mean_func: Callable[[Sequence[float]], float] = hmean,
- Read upRead up
- Exclude checks
TODO mean_func: Callable[[Sequence[float]], float] = hmean, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'endes',
- Read upRead up
- Exclude checks
TODO 'endes', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and len(word) >= 2
- Read upRead up
- Exclude checks
TODO and len(word) >= 2 ^ |
Method "__init__" has 8 parameters, which is greater than the 7 authorized. Open
self,
alphabet: Optional[
Union[TCounter[str], Sequence[str], Set[str], int]
] = None,
tokenizer: Optional[_Tokenizer] = None,
- Read upRead up
- Exclude checks
A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.
Noncompliant Code Example
With a maximum number of 4 parameters:
def do_something(param1, param2, param3, param4, param5): ...
Compliant Solution
def do_something(param1, param2, param3, param4): ...
Refactor this function to reduce its Cognitive Complexity from 43 to the 15 allowed. Open
def corr(self, src: str, tar: str) -> float:
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed. Open
def dist_abs(self, src: str, tar: str) -> float:
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Merge this if statement with the enclosing one. Open
if (
- Read upRead up
- Exclude checks
Merging collapsible if
statements increases the code's readability.
Noncompliant Code Example
if condition1: if condition2: # ...
Compliant Solution
if condition1 and condition2: # ...
Wrong hanging indentation before block (add 4 spaces). Open
self,
- Read upRead up
- Exclude checks
TODO self, ^ |
Unnecessary elif
after return
Open
if not precision or not recall:
- 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
'heden',
- Read upRead up
- Exclude checks
TODO 'heden', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'ernes',
- Read upRead up
- Exclude checks
TODO 'ernes', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'eren',
- Read upRead up
- Exclude checks
TODO 'eren', ^ |