os3/fs/file.py
Function readlines
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def readlines(self, n=None, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True,
Function readline
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def readline(self, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None,
Function read
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def read(self, n=None, mode=None, buffering=-1, encoding=None, errors=None, newline=None, closefd=True,
Function write
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def write(self, data, mode=None, buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None):
Function _get_open
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _get_open(self, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None):
Function open
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def open(self, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None):
Function readlines
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def readlines(self, n=None, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True,
opener=None, breaklines=True):
if n is not None and not isinstance(n, int):
mode = n
n = 0
- 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"