hthiery/python-fritzhome

View on GitHub

Showing 5 of 19 total issues

Fritzhome has 57 functions (exceeds 30 allowed). Consider refactoring.
Open

class Fritzhome(object):
"""Fritzhome object to communicate with the device."""
 
_sid = None
_session = None
Severity: Major
Found in pyfritzhome/fritzhome.py - About 6 hrs to fix

    File fritzhome.py has 410 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """The main fritzhome handling class."""
    # -*- coding: utf-8 -*-
     
    from __future__ import print_function
     
     
    Severity: Minor
    Found in pyfritzhome/fritzhome.py - About 5 hrs to fix

      Function list_all has a Cognitive Complexity of 28 (exceeds 13 allowed). Consider refactoring.
      Open

      def list_all(fritz, args):
      """Command that prints all device information."""
      devices = fritz.get_devices()
       
      for device in devices:
      Severity: Minor
      Found in pyfritzhome/cli.py - About 2 hrs to fix

      File cli.py has 265 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      #!/usr/bin/env python
      """A simple CLI tool."""
      # -*- coding: utf-8 -*-
       
      from __future__ import print_function
      Severity: Minor
      Found in pyfritzhome/cli.py - About 2 hrs to fix

        Function main has 74 lines of code (exceeds 45 allowed). Consider refactoring.
        Open

        def main(args=None):
        """Enter the main function of the CLI tool."""
        parser = argparse.ArgumentParser(description="Fritz!Box Smarthome CLI tool.")
        parser.add_argument(
        "-v", action="store_true", dest="verbose", help="be more verbose"
        Severity: Major
        Found in pyfritzhome/cli.py - About 2 hrs to fix
          Severity
          Category
          Status
          Source
          Language