abydos/distance/_fellegi_sunter.py
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function sim_score
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def sim_score(self, src: str, tar: str) -> float:
"""Return the Fellegi-Sunter similarity of two strings.
Parameters
----------
- 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
Wrong hanging indentation before block (add 4 spaces). Open
Open
self,
- Read upRead up
- Exclude checks
TODO self, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
Open
**kwargs: Any
- Read upRead up
- Exclude checks
TODO **kwargs: Any ^ |
Wrong hanging indentation before block (add 4 spaces). Open
Open
tokenizer: Optional[_Tokenizer] = None,
- Read upRead up
- Exclude checks
TODO tokenizer: Optional[_Tokenizer] = None, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
Open
simplified: bool = False,
- Read upRead up
- Exclude checks
TODO simplified: bool = False, ^ |
Wrong hanging indentation before block (add 4 spaces). Open
Open
intersection_type: str = 'crisp',
- Read upRead up
- Exclude checks
TODO intersection_type: str = 'crisp', ^ |
Wrong hanging indentation before block (add 4 spaces). Open
Open
mismatch_factor: float = 0.5,
- Read upRead up
- Exclude checks
TODO mismatch_factor: float = 0.5, ^ |