ssokolow/quicktile

View on GitHub

Showing 44 of 198 total issues

Function toggle_state has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

def toggle_state(
Severity: Major
Found in quicktile/commands.py - About 1 hr to fix

    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`.
    Severity: Minor
    Found in quicktile/util.py - About 55 mins to fix

    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, [])):
    Severity: Minor
    Found in quicktile/wm.py - About 55 mins to fix

    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
    Severity: Minor
    Found in quicktile/gtkexcepthook.py - About 55 mins to fix

    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
    Severity: Major
    Found in quicktile/commands.py - About 50 mins to fix

      Function reposition has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def reposition(self,  # pylint: disable=too-many-arguments
      Severity: Minor
      Found in quicktile/wm.py - About 45 mins to fix

        Function __new__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __new__(cls, x: int = None, y: int = None,
        Severity: Minor
        Found in quicktile/util.py - About 45 mins to fix

          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__)
          Severity: Minor
          Found in docs/conf.py - About 45 mins to fix

          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`.
          Severity: Minor
          Found in quicktile/wm.py - About 45 mins to fix

          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
          Severity: Minor
          Found in quicktile/wm.py - About 45 mins to fix

            Function trigger_keyboard_action has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def trigger_keyboard_action(
            Severity: Minor
            Found in quicktile/commands.py - About 45 mins to fix

              Function toggle_desktop has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def toggle_desktop(
              Severity: Minor
              Found in quicktile/commands.py - About 35 mins to fix

                Function __call__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __call__(self,
                Severity: Minor
                Found in quicktile/layout.py - About 35 mins to fix

                  Function workspace_go has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def workspace_go(
                  Severity: Minor
                  Found in quicktile/commands.py - About 35 mins to fix

                    Function cycle_monitors_all has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def cycle_monitors_all(
                    Severity: Minor
                    Found in quicktile/commands.py - About 35 mins to fix

                      Function background_proc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def background_proc(argv, env: Dict[str, Union[bytes, str]], verbose=False,
                      Severity: Minor
                      Found in functional_harness/env_general.py - About 35 mins to fix

                        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]:
                        Severity: Minor
                        Found in quicktile/wm.py - About 35 mins to fix

                        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.
                        Severity: Minor
                        Found in quicktile/wm.py - About 35 mins to fix

                        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]:
                        Severity: Minor
                        Found in quicktile/keybinder.py - About 35 mins to fix

                        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:
                        Severity: Minor
                        Found in quicktile/gtkexcepthook.py - About 35 mins to fix

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language