Showing 50 of 67 total issues
File style.py
has 1354 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
GUISCRCPY by srevinsaju
Get it on : https://github.com/srevinsaju/guiscrcpy
Licensed under GNU Public License
File launcher.py
has 1048 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python3
"""
GUISCRCPY by srevinsaju
Get it on : https://github.com/srevinsaju/guiscrcpy
File desktop_shortcut.py
has 443 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env/python\n
# flake8: noqa
def desktop_device_shortcut_svg():
a = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
Function check_existence
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
def check_existence(paths, filename="", directory=True, path=False):
for i in paths:
j = os.path.expanduser(i)
if os.path.exists(j): # directory exists
if directory and os.path.isdir(j):
- 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 scan_devices_update_list_view
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def scan_devices_update_list_view(self):
"""
Scan for new devices; and update the list view
:return:
"""
- 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 connect
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def connect(self):
try:
ip = self.listView.currentItem().text()
except AttributeError:
# The IP Address in the ListView has precedence over the IP address
- 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
File cli.py
has 309 lines of code (exceeds 250 allowed). Consider refactoring. Open
import os
import platform
import sys
import traceback
InterfaceGuiscrcpy
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class InterfaceGuiscrcpy(QMainWindow, Ui_MainWindow):
"""
Main class for guiscrcpy object.
All the processes to spawn to scrcpy are handled here
Function __init__
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
config_manager: InterfaceConfig,
adb: AndroidDebugBridge,
scrcpy: ScrcpyBridge,
- 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 start_act
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def start_act(self):
"""
Main brain of guiscrcpy; handles what to do when
:return:
"""
- 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 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(self, ux_wrapper=None, frame=False, always_on_top=True):
"""
Swipe UI
:param ux_wrapper: UXMapper type object
:param frame: bool
Function check_devices_status_and_select_first_if_only_one
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def check_devices_status_and_select_first_if_only_one(self, values_devices_list):
"""
Checks the devices in the Grid View, and then checks if any device
is available or offline accordingly display the error message. If
only one device was detected, automatically select the first device
- 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 complete
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def complete(self):
x = []
for i in self.checkboxes:
if i.isChecked():
box = self.checkboxes[i]
- 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 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(
self,
config_manager: InterfaceConfig,
adb: AndroidDebugBridge,
scrcpy: ScrcpyBridge,
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 create_desktop_shortcut_linux_os
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def create_desktop_shortcut_linux_os(self) -> bool:
"""
Creates a desktop shortcut for Linux OS
:return: bool
"""
- 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 build_user_interface
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_user_interface(self):
self.label = QtWidgets.QLabel(self)
self.drawing = False
self.widget = QtWidgets.QWidget(self)
self.widget.setGeometry(QtCore.QRect(0, 0, 351, 34))
Function validate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def validate(self):
# check scrcpy and adb are not None, else replace it with original
# values
if os.getenv("APPIMAGE") is not None:
# no need further configuration for adb, scrcpy and scrcpy_server
- 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 quit_window
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def quit_window(self):
for instance in self.parent.child_windows: # noqa
# We are checking for any more windows running before killing
# the main window. self.child_windows has the list of all
# objects spawned by the main window ui
- 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 quit_window
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def quit_window(self):
for instance in self.parent.child_windows: # noqa
# We are checking for any more windows running before killing
# the main window. self.child_windows has the list of all
# objects spawned by the main window ui
- 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"