Skip to content

Commit

Permalink
Fix all pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
iMicknl committed Jan 7, 2024
1 parent 8a3b7e4 commit effe5be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions sagemcom_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
)
from .models import Device, DeviceInfo, PortMapping

# pylint: disable=too-many-instance-attributes
class SagemcomClient:
"""Client to communicate with the Sagemcom API."""

Expand Down Expand Up @@ -211,6 +212,7 @@ async def __api_request_async(self, actions, priority=False):

# Error in one of the actions
if error["description"] == XMO_REQUEST_ACTION_ERR:
# pylint:disable=fixme
# TODO How to support multiple actions + error handling?
actions = result["reply"]["actions"]
for action in actions:
Expand Down
3 changes: 1 addition & 2 deletions sagemcom_api/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class MaximumSessionCountException(Exception):
"""Raised when the maximum session count is reached."""


# Exceptions provided by this library
# TODO Validate our own errors
# Broad exceptions provided by this library
class BadRequestException(Exception):
"""TODO."""

Expand Down
7 changes: 5 additions & 2 deletions sagemcom_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Device:
ipv6_addresses: Optional[List] = None
device_type_association: Optional[Any] = None

# pylint:disable=fixme
# TODO Remove extra kwargs before init
def __init__(self, **kwargs):
"""Override to accept more args than specified."""
Expand Down Expand Up @@ -99,15 +100,16 @@ class DeviceInfo:
reboot_status: Optional[float] = None
reset_status: Optional[float] = None
update_status: Optional[float] = None
SNMP: Optional[bool] = None
SNMP: Optional[bool] = None # pylint: disable=invalid-name
first_connection: Optional[bool] = None
build_date: Optional[str] = None
spec_version: Optional[str] = None
CLID: Optional[str] = None
CLID: Optional[str] = None # pylint: disable=invalid-name
flush_device_log: Optional[bool] = None
locations: Optional[str] = None
api_version: Optional[str] = None

# pylint:disable=fixme
# TODO Remove extra kwargs before init
def __init__(self, **kwargs):
"""Override to accept more args than specified."""
Expand Down Expand Up @@ -147,6 +149,7 @@ class PortMapping:
target: Optional[str] = None
lease_start: Optional[str] = None # Date?

# pylint:disable=fixme
# TODO Remove extra kwargs before init
def __init__(self, **kwargs):
"""Override to accept more args than specified."""
Expand Down

0 comments on commit effe5be

Please sign in to comment.