Function sim_type
has a Cognitive Complexity of 113 (exceeds 5 allowed). Consider refactoring. Open
def sim_type(
self,
src: Union[str, Tuple[str, str, str]],
tar: Union[str, Tuple[str, str, str]],
force_numeric: bool = False,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _synoname_word_approximation
has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring. Open
def _synoname_word_approximation(
self,
src_ln: str,
tar_ln: str,
src_fn: str = '',
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Cyclomatic complexity is too high in method _synoname_word_approximation. (73) Open
def _synoname_word_approximation(
self,
src_ln: str,
tar_ln: str,
src_fn: str = '',
- Read upRead up
- Exclude checks
Cyclomatic Complexity
Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.
Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:
Construct | Effect on CC | Reasoning |
---|---|---|
if | +1 | An if statement is a single decision. |
elif | +1 | The elif statement adds another decision. |
else | +0 | The else statement does not cause a new decision. The decision is at the if. |
for | +1 | There is a decision at the start of the loop. |
while | +1 | There is a decision at the while statement. |
except | +1 | Each except branch adds a new conditional path of execution. |
finally | +0 | The finally block is unconditionally executed. |
with | +1 | The with statement roughly corresponds to a try/except block (see PEP 343 for details). |
assert | +1 | The assert statement internally roughly equals a conditional statement. |
Comprehension | +1 | A list/set/dict comprehension of generator expression is equivalent to a for loop. |
Boolean Operator | +1 | Every boolean operator (and, or) adds a decision point. |
Cyclomatic complexity is too high in method sim_type. (73) Open
def sim_type(
self,
src: Union[str, Tuple[str, str, str]],
tar: Union[str, Tuple[str, str, str]],
force_numeric: bool = False,
- Read upRead up
- Exclude checks
Cyclomatic Complexity
Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.
Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:
Construct | Effect on CC | Reasoning |
---|---|---|
if | +1 | An if statement is a single decision. |
elif | +1 | The elif statement adds another decision. |
else | +0 | The else statement does not cause a new decision. The decision is at the if. |
for | +1 | There is a decision at the start of the loop. |
while | +1 | There is a decision at the while statement. |
except | +1 | Each except branch adds a new conditional path of execution. |
finally | +0 | The finally block is unconditionally executed. |
with | +1 | The with statement roughly corresponds to a try/except block (see PEP 343 for details). |
assert | +1 | The assert statement internally roughly equals a conditional statement. |
Comprehension | +1 | A list/set/dict comprehension of generator expression is equivalent to a for loop. |
Boolean Operator | +1 | Every boolean operator (and, or) adds a decision point. |
File _synoname.py
has 694 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright 2018-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Cyclomatic complexity is too high in class Synoname. (26) Open
class Synoname(_Distance):
"""Synoname.
Cf. :cite:`Getty:1991,Gross:1991`
- Read upRead up
- Exclude checks
Cyclomatic Complexity
Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.
Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:
Construct | Effect on CC | Reasoning |
---|---|---|
if | +1 | An if statement is a single decision. |
elif | +1 | The elif statement adds another decision. |
else | +0 | The else statement does not cause a new decision. The decision is at the if. |
for | +1 | There is a decision at the start of the loop. |
while | +1 | There is a decision at the while statement. |
except | +1 | Each except branch adds a new conditional path of execution. |
finally | +0 | The finally block is unconditionally executed. |
with | +1 | The with statement roughly corresponds to a try/except block (see PEP 343 for details). |
assert | +1 | The assert statement internally roughly equals a conditional statement. |
Comprehension | +1 | A list/set/dict comprehension of generator expression is equivalent to a for loop. |
Boolean Operator | +1 | Every boolean operator (and, or) adds a decision point. |
Function _synoname_word_approximation
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
def _synoname_word_approximation(
self,
src_ln: str,
tar_ln: str,
src_fn: str = '',
Function sim_type
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
def sim_type(
self,
src: Union[str, Tuple[str, str, str]],
tar: Union[str, Tuple[str, str, str]],
force_numeric: bool = False,
Consider simplifying this complex logical expression. Open
if (
(not src_len_fn and not tar_len_fn)
or (tar_fn and src_fn.startswith(tar_fn))
or (src_fn and tar_fn.startswith(src_fn))
) and not roman_conflict:
Consider simplifying this complex logical expression. Open
if matches > 1 or (
matches == 1
and src1_num_words == 1
and tar1_num_words == 1
and (tar_len_specials > 0 or src_len_specials > 0)
Consider simplifying this complex logical expression. Open
if matches > 1 or (
matches == 1
and src2_num_words == 1
and tar2_num_words == 1
and (tar_len_specials > 0 or src_len_specials > 0)
Function _synoname_word_approximation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _synoname_word_approximation(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
word_approx_min: float = 0.3,
char_approx_min: float = 0.73,
tests: Union[int, TIterable[str]] = 2 ** 12 - 1,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this function. Open
return 1
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['initials'])
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['inclusion'])
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['extension'])
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['no_match'])
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['no_first'])
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['char_approx'])
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['transposition'])
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['initials'])
Avoid too many return
statements within this function. Open
return w_ratio
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['substitution'])
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['confusions'])
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['punctuation'])
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['transposition'])
Avoid too many return
statements within this function. Open
return w_ratio
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['punctuation'])
Avoid too many return
statements within this function. Open
return _fmt_retval(self._match_type_dict['word_approx'])
Refactor this function to reduce its Cognitive Complexity from 88 to the 15 allowed. Open
def _synoname_word_approximation(
- 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 122 to the 15 allowed. Open
def sim_type(
- 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
Too many boolean expressions in if statement (6/5) Open
if matches > 1 or (
- Read upRead up
- Exclude checks
Used when an if statement contains too many boolean expressions.
Too many boolean expressions in if statement (7/5) Open
if (
- Read upRead up
- Exclude checks
Used when an if statement contains too many boolean expressions.
Unnecessary elif
after return
Open
if fn_equal and (self._lev.dist_abs(src_ln, tar_ln) == 1):
- 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 branches (38/12) Open
def sim_type(
- Read upRead up
- Exclude checks
Used when a function or method has too many branches, making it hard to follow.
Too many statements (105/50) Open
def sim_type(
- Read upRead up
- Exclude checks
Used when a function or method has too many statements. You should then split it in smaller functions / methods.
Method could be a function Open
def _synoname_strip_punct(self, word: str) -> str:
- Read upRead up
- Exclude checks
Used when a method doesn't use its bound instance, and so could be written as a function.
Too many branches (44/12) Open
def _synoname_word_approximation(
- Read upRead up
- Exclude checks
Used when a function or method has too many branches, making it hard to follow.
Unnecessary elif
after return
Open
if fn_equal and self._lev.dist_abs(src_ln, tar_ln) == 1:
- 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 arguments (6/5) Open
def _synoname_word_approximation(
- Read upRead up
- Exclude checks
Used when a function or method takes too many arguments.
Too many local variables (31/15) Open
def _synoname_word_approximation(
- Read upRead up
- Exclude checks
Used when a function or method has too many local variables.
Too many return statements (10/6) Open
def _synoname_word_approximation(
- Read upRead up
- Exclude checks
Used when a function or method has too many return statement, making it hard to follow.
Too many boolean expressions in if statement (6/5) Open
if matches > 1 or (
- Read upRead up
- Exclude checks
Used when an if statement contains too many boolean expressions.
Too many local variables (40/15) Open
def sim_type(
- Read upRead up
- Exclude checks
Used when a function or method has too many local variables.
Too many return statements (18/6) Open
def sim_type(
- Read upRead up
- Exclude checks
Used when a function or method has too many return statement, making it hard to follow.
Too many statements (84/50) Open
def _synoname_word_approximation(
- Read upRead up
- Exclude checks
Used when a function or method has too many statements. You should then split it in smaller functions / methods.
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: # ...
Merge this if statement with the enclosing one. Open
if (src_fn and src_fn in tar_fn) or (tar_fn and tar_fn in src_ln):
- 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: # ...
Merge this if statement with the enclosing one. Open
if src_fn == '' or tar_fn == '':
- 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: # ...
Merge this if statement with the enclosing one. Open
if src_fn and tar_fn:
- 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: # ...
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: # ...
Merge this if statement with the enclosing one. Open
if src_ln[1:2] == tar_ln[1:2] and (
- 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: # ...
Merge this if statement with the enclosing one. Open
if ca_ratio >= self._char_approx_min:
- 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: # ...
Correct one of the identical sub-expressions on both sides of operator "or". Open
or (
initial_diff
== self._lev.dist_abs(
src_initials_str, tar_initials_str,
)
- Read upRead up
- Exclude checks
Using the same value on either side of a binary operator is almost always a mistake. In the case of logical operators, it is either a copy/paste error and therefore a bug, or it is simply wasted code, and should be simplified. In the case of bitwise operators and most binary mathematical operators, having the same value on both sides of an operator yields predictable results, and should be simplified.
This rule ignores *
, +
, and =
.
Noncompliant Code Example
if a == a: # Noncompliant work() if a != a: # Noncompliant work() if a == b and a == b: # Noncompliant work() if a == b or a == b: # Noncompliant work() j = 5 / 5 # Noncompliant k = 5 - 5 # Noncompliant
Exceptions
The following are ignored:
- The expression
1 << 1
See
- CERT, MSC12-C. - Detect and remove code that has no effect or is never executed
- CERT, MSC12-CPP. - Detect and remove code that has no effect
- {rule:python:S1656} - Implements a check on
=
.
Either merge this branch with the identical one on line "701" or change one of the implementations. Open
return _fmt_retval(self._match_type_dict['transposition'])
- Read upRead up
- Exclude checks
Having two branches in the same if
structure with the same implementation is at best duplicate code, and at worst a coding error. If
the same logic is truly needed for both instances, then they should be combined.
Noncompliant Code Example
if 0 <= a < 10: do_the_thing() elif 10 <= a < 20: do_the_other_thing() elif 20 <= a < 50: do_the_thing() # Noncompliant; duplicates first condition else: do_the_rest() b = 4 if a > 12 else 4
Compliant Solution
if (0 <= a < 10) or (20 <= a < 50): do_the_thing() elif 10 <= a < 20: do_the_other_thing() else: do_the_rest() b = 4
or
if 0 <= a < 10: do_the_thing() elif 10 <= a < 20: do_the_other_thing() elif 20 <= a < 50: do_the_third_thing() else: do_the_rest() b = 8 if a > 12 else 4
Either merge this branch with the identical one on line "694" or change one of the implementations. Open
return _fmt_retval(self._match_type_dict['substitution'])
- Read upRead up
- Exclude checks
Having two branches in the same if
structure with the same implementation is at best duplicate code, and at worst a coding error. If
the same logic is truly needed for both instances, then they should be combined.
Noncompliant Code Example
if 0 <= a < 10: do_the_thing() elif 10 <= a < 20: do_the_other_thing() elif 20 <= a < 50: do_the_thing() # Noncompliant; duplicates first condition else: do_the_rest() b = 4 if a > 12 else 4
Compliant Solution
if (0 <= a < 10) or (20 <= a < 50): do_the_thing() elif 10 <= a < 20: do_the_other_thing() else: do_the_rest() b = 4
or
if 0 <= a < 10: do_the_thing() elif 10 <= a < 20: do_the_other_thing() elif 20 <= a < 50: do_the_third_thing() else: do_the_rest() b = 8 if a > 12 else 4
Access to a protected member _synoname_special_table of a client class Open
and self._stc._synoname_special_table[s_pos][1] # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _cost of a client class Open
self._lev._cost = (1, 99, 99, 99) # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _mode of a client class Open
self._lev._mode = 'lev' # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
self._stc._synoname_special_table[s_pos][ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
self._stc._synoname_special_table[ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _mode of a client class Open
self._lev._mode = 'osa' # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Unused variable 'approx_c_result' Open
approx_c_result, ca_ratio = _approx_c()
- Read upRead up
- Exclude checks
Used when a variable is defined but not used.
Access to a protected member _synoname_special_table of a client class Open
+ self._stc._synoname_special_table[s_pos][1] # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
self._stc._synoname_special_table[s_pos][ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
self._stc._synoname_special_table[ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
+ self._stc._synoname_special_table[s_pos][1] # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _cost of a client class Open
self._lev._cost = (99, 99, 99, 1) # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
+ self._stc._synoname_special_table[ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
self._stc._synoname_special_table[s_pos][ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _cost of a client class Open
self._lev._cost = (1, 1, 99, 99) # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
self._stc._synoname_special_table[s_pos][ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
self._stc._synoname_special_table[ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
and self._stc._synoname_special_table[s_pos][1] # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _cost of a client class Open
self._lev._cost = (99, 99, 1, 99) # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _mode of a client class Open
self._lev._mode = 'lev' # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
+ self._stc._synoname_special_table[ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
self._stc._synoname_special_table[ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
self._stc._synoname_special_table[ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _synoname_special_table of a client class Open
self._stc._synoname_special_table[ # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _mode of a client class Open
self._lev._mode = 'lev' # noqa: SF01
- Read upRead up
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Wrong hanging indentation before block (add 4 spaces). Open
and self._stc._synoname_special_table[s_pos][1] # noqa: SF01
- Read upRead up
- Exclude checks
TODO and self.stc.synonamespecialtable[s_pos][1] # noqa: SF01 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and tar_len_specials == 0
- Read upRead up
- Exclude checks
TODO and tarlenspecials == 0 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and tar1_num_words == 1
- Read upRead up
- Exclude checks
TODO and tar1numwords == 1 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'known as the ',
- Read upRead up
- Exclude checks
TODO 'known as the ', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
(not src_len_fn and not tar_len_fn)
- Read upRead up
- Exclude checks
TODO (not srclenfn and not tarlenfn) ^ |
Wrong hanging indentation before block (add 4 spaces). Open
src_ln: str,
- Read upRead up
- Exclude checks
TODO src_ln: str, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
in full_src2
- Read upRead up
- Exclude checks
TODO in full_src2 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
matches == 1
- Read upRead up
- Exclude checks
TODO matches == 1 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
ret_name: bool = False,
- Read upRead up
- Exclude checks
TODO ret_name: bool = False, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'known as the ',
- Read upRead up
- Exclude checks
TODO 'known as the ', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
src_fn: str = '',
- Read upRead up
- Exclude checks
TODO src_fn: str = '', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
or (
- Read upRead up
- Exclude checks
TODO or ( ^ |
Wrong hanging indentation before block (add 4 spaces). Open
List[Tuple[int, str]], features['src_specials']
- Read upRead up
- Exclude checks
TODO List[Tuple[int, str]], features['src_specials'] ^ |
Wrong hanging indentation before block (add 4 spaces). Open
src1_num_words < 2
- Read upRead up
- Exclude checks
TODO src1numwords < 2 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and tar1_words[0] == src1_words[0]
- Read upRead up
- Exclude checks
TODO and tar1words[0] == src1words[0] ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and src1_num_words == 1
- Read upRead up
- Exclude checks
TODO and src1numwords == 1 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and (tar_len_specials > 0 or src_len_specials > 0)
- Read upRead up
- Exclude checks
TODO and (tarlenspecials > 0 or srclenspecials > 0) ^ |
Wrong hanging indentation before block (add 4 spaces). Open
tar: Union[str, Tuple[str, str, str]],
- Read upRead up
- Exclude checks
TODO tar: Union[str, Tuple[str, str, str]], ^ |
Wrong hanging indentation before block (add 4 spaces). Open
tar: Union[str, Tuple[str, str, str]],
- Read upRead up
- Exclude checks
TODO tar: Union[str, Tuple[str, str, str]], ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'roman_conflict' in features and features['roman_conflict']
- Read upRead up
- Exclude checks
TODO 'romanconflict' in features and features['romanconflict'] ^ |
Wrong hanging indentation before block (add 4 spaces). Open
List[Tuple[int, str]], features['tar_specials']
- Read upRead up
- Exclude checks
TODO List[Tuple[int, str]], features['tar_specials'] ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and src2_num_words < 2
- Read upRead up
- Exclude checks
TODO and src2numwords < 2 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
matches == 1
- Read upRead up
- Exclude checks
TODO matches == 1 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and src2_num_words == 1
- Read upRead up
- Exclude checks
TODO and src2numwords == 1 ^ |
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
'with ',
- Read upRead up
- Exclude checks
TODO 'with ', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
s_type == 'X'
- Read upRead up
- Exclude checks
TODO s_type == 'X' ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'with ',
- Read upRead up
- Exclude checks
TODO 'with ', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'with the ',
- Read upRead up
- Exclude checks
TODO 'with the ', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
== ' '.join((tar_fn, tar_ln)).strip()
- Read upRead up
- Exclude checks
TODO == ' '.join((tarfn, tarln)).strip() ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and src1_num_words == 1
- Read upRead up
- Exclude checks
TODO and src1numwords == 1 ^ |
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
src: Union[str, Tuple[str, str, str]],
- Read upRead up
- Exclude checks
TODO src: Union[str, Tuple[str, str, str]], ^ |
Wrong hanging indentation before block (add 4 spaces). Open
in full_tar2
- Read upRead up
- Exclude checks
TODO in full_tar2 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and (tar_len_specials > 0 or src_len_specials > 0)
- Read upRead up
- Exclude checks
TODO and (tarlenspecials > 0 or srclenspecials > 0) ^ |
Wrong hanging indentation before block (add 4 spaces). Open
word_approx_min: float = 0.3,
- Read upRead up
- Exclude checks
TODO wordapproxmin: float = 0.3, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'of the ',
- Read upRead up
- Exclude checks
TODO 'of the ', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'of the ',
- Read upRead up
- Exclude checks
TODO 'of the ', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'of ',
- Read upRead up
- Exclude checks
TODO 'of ', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
src_ln.startswith(tar_ln) or tar_ln.startswith(src_ln)
- Read upRead up
- Exclude checks
TODO srcln.startswith(tarln) or tarln.startswith(srcln) ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and src2_num_words == 1
- Read upRead up
- Exclude checks
TODO and src2numwords == 1 ^ |
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
features: Optional[
- Read upRead up
- Exclude checks
TODO features: Optional[ ^ |
Wrong hanging indentation before block (add 4 spaces). Open
tar1_num_words == 1
- Read upRead up
- Exclude checks
TODO tar1numwords == 1 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and tar2_num_words == 1
- Read upRead up
- Exclude checks
TODO and tar2numwords == 1 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
src: Union[str, Tuple[str, str, str]],
- Read upRead up
- Exclude checks
TODO src: Union[str, Tuple[str, str, str]], ^ |
Wrong hanging indentation before block (add 4 spaces). Open
tar_fn: str = '',
- Read upRead up
- Exclude checks
TODO tar_fn: str = '', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
tar2_num_words == 1
- Read upRead up
- Exclude checks
TODO tar2numwords == 1 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'of ',
- Read upRead up
- Exclude checks
TODO 'of ', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
'with the ',
- Read upRead up
- Exclude checks
TODO 'with the ', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
' '.join((src_fn, src_ln)).strip()
- Read upRead up
- Exclude checks
TODO ' '.join((srcfn, srcln)).strip() ^ |
Wrong hanging indentation before block (add 4 spaces). Open
tar_ln: str,
- Read upRead up
- Exclude checks
TODO tar_ln: str, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
List[Tuple[int, str]], features['src_specials']
- Read upRead up
- Exclude checks
TODO List[Tuple[int, str]], features['src_specials'] ^ |
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
or (tar_fn and src_fn.startswith(tar_fn))
- Read upRead up
- Exclude checks
TODO or (tarfn and srcfn.startswith(tar_fn)) ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and src_len_specials == 0
- Read upRead up
- Exclude checks
TODO and srclenspecials == 0 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
tests: Union[int, TIterable[str]] = 2 ** 12 - 1,
- Read upRead up
- Exclude checks
TODO tests: Union[int, TIterable[str]] = 2 ** 12 - 1, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
force_numeric: bool = False,
- Read upRead up
- Exclude checks
TODO force_numeric: bool = False, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
or (src_fn and tar_fn.startswith(src_fn))
- Read upRead up
- Exclude checks
TODO or (srcfn and tarfn.startswith(src_fn)) ^ |
Wrong hanging indentation before block (add 4 spaces). Open
List[Tuple[int, str]], features['tar_specials']
- Read upRead up
- Exclude checks
TODO List[Tuple[int, str]], features['tar_specials'] ^ |
Wrong hanging indentation before block (add 4 spaces). Open
s_type == 'X'
- Read upRead up
- Exclude checks
TODO s_type == 'X' ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and self._stc._synoname_special_table[s_pos][1] # noqa: SF01
- Read upRead up
- Exclude checks
TODO and self.stc.synonamespecialtable[s_pos][1] # noqa: SF01 ^ |
Wrong hanging indentation before block (add 4 spaces). Open
and tar2_words[0] == src2_words[0]
- Read upRead up
- Exclude checks
TODO and tar2words[0] == src2words[0] ^ |
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
char_approx_min: float = 0.73,
- Read upRead up
- Exclude checks
TODO charapproxmin: float = 0.73, ^ |