File cli.py
has 309 lines of code (exceeds 250 allowed). Consider refactoring. Open
import os
import platform
import sys
import traceback
Function mapper
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def mapper(device_id=None, reset=False):
"""Run the guiscrcpy mapper"""
config_manager = InterfaceConfig()
config = config_manager.get_config()
mapper_cfg_path = os.path.join(
- 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 cli
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def cli(
ctx: Context,
hide_wm_frame: bool = True,
aot: bool = True,
theme: str = "Breeze",
- 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 cli
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def cli(
Function show_version
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def show_version(ctx, param, value): # noqa:
"""Prints the version of the utility"""
if not value or ctx.resilient_parsing:
return
click.echo(fc("{g}guiscrcpy {rst}v{v}", v=VERSION))
- 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"