Showing 4 of 4 total issues
Proxy
has 94 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Proxy(with_metaclass(_ProxyMetaType)):
"""
A proxy implementation in pure Python, using slots. You can subclass this to add
local methods or attributes, or enable __dict__.
Proxy
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Proxy(with_metaclass(_ProxyMetaType)):
__factory__ = None
def __init__(self, factory):
self.__dict__['__factory__'] = factory
File slots.py
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import operator
from .compat import string_types
from .compat import with_metaclass
from .utils import await_
Function exec_in_env
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
def exec_in_env():
env_path = base_path / '.tox' / 'bootstrap'
if sys.platform == 'win32':
bin_path = env_path / 'Scripts'
else:
- 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"