Showing 44 of 198 total issues
Function toggle_state
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def toggle_state(
Function _update
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _update(self):
"""Check input values and regenerate internal caches
This is internal code shared by :meth:`set_monitors` and
:meth:`set_panels`.
- 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 _gather_struts
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _gather_struts(self):
"""Gather all toplevel _NET_WM_STRUT/_NET_WM_STRUT_PARTIAL values"""
struts = []
for wid in [self.x_root.id] + list(self.get_property(
self.x_root.id, '_NET_CLIENT_LIST', Xatom.WINDOW, [])):
- 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 lookup
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def lookup(name: str,
frame: FrameType,
local_vars: Dict[str, Any]
) -> Tuple[Scope, Any]:
"""Find the value for a given name in the given frame
- 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 cycle_monitors
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def cycle_monitors(winman: WindowManager, # pylint: disable=too-many-arguments
Function reposition
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def reposition(self, # pylint: disable=too-many-arguments
Function __new__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __new__(cls, x: int = None, y: int = None,
Function format_annotation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def format_annotation(annotation, *args, **kwargs):
"""Wrapper to override lookup for certain autodoc cross-references"""
if inspect.isclass(annotation):
full_name = '{}.{}'.format(
annotation.__module__, annotation.__qualname__)
- 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 update_geometry_cache
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def update_geometry_cache(self):
"""Update the internal cache of monitor & panel shapes by querying
them from the desktop, either using ``_GTK_WORKAREAS_D0`` or by
running and processing them into a
:class:`quicktile.util.UsableRegion`.
- 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 set_property
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def set_property(self, # pylint: disable=too-many-arguments
Function trigger_keyboard_action
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def trigger_keyboard_action(
Function toggle_desktop
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def toggle_desktop(
Function __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(self,
Function workspace_go
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def workspace_go(
Function cycle_monitors_all
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def cycle_monitors_all(
Function background_proc
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def background_proc(argv, env: Dict[str, Union[bytes, str]], verbose=False,
Function get_workspace
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_workspace(self,
window: Wnck.Window = None,
direction: Union[Wnck.MotionDirection, int] = None,
wrap_around: bool = True,
) -> Optional[Wnck.Workspace]:
- 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 persist_maximization
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def persist_maximization(win: Wnck.Window, keep_maximize: bool = True):
"""Context manager to persist maximization state after a call to
:any:`WindowManager.reposition`.
:param win: The window to operate on.
- 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 init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def init(modmask: Optional[str],
mappings: Dict[str, str],
commands: CommandRegistry,
winman: WindowManager,
) -> Optional[KeyBinder]:
- 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 analyse
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def analyse(exctyp: Type[BaseException],
value: BaseException,
tracebk: TracebackType,
context_lines: int = 3,
) -> StringIO:
- 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"