sipa/model/pycroft/api.py

Summary

Maintainability
B
5 hrs
Test Coverage

PycroftApi has 23 functions (exceeds 20 allowed). Consider refactoring.
Open

class PycroftApi:
    def __init__(self, endpoint: str, api_key: str):
        if not endpoint.endswith("/"):
            raise InvalidConfiguration("API endpoint must end with a '/'")
        self._endpoint = endpoint
Severity: Minor
Found in sipa/model/pycroft/api.py - About 2 hrs to fix

    Function member_request has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def member_request(self, email: str, login: str, password: str,
    Severity: Major
    Found in sipa/model/pycroft/api.py - About 1 hr to fix

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

          def change_mac(self, user_id, password, interface_id, new_mac, host_name):
      Severity: Minor
      Found in sipa/model/pycroft/api.py - About 35 mins to fix

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

            def match_person(self, first_name: str, last_name: str, birthdate: date, tenant_number: int,
        Severity: Minor
        Found in sipa/model/pycroft/api.py - About 35 mins to fix

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

              def activate_network_access(self, user_id, password, mac, birthdate, host_name):
          Severity: Minor
          Found in sipa/model/pycroft/api.py - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status