Skip to content

Commit

Permalink
[fix] linting
Browse files Browse the repository at this point in the history
  • Loading branch information
grindsa committed Jan 2, 2025
1 parent deb8cd1 commit 14e334e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
3 changes: 1 addition & 2 deletions dkb_robo/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@


BASE_URL = 'https://banking.dkb.de/api'
# log_format = 'dkb_robo - %(message)s'
# logging.basicConfig(format='authentication - %(message)s')


logger = logging.getLogger(__name__)

Expand Down
18 changes: 10 additions & 8 deletions dkb_robo/standingorder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""" Module for handling dkb standing orders """
from typing import Dict, List, Optional
from typing import Dict, List, Optional, Union
from dataclasses import dataclass, field
import logging
import requests
Expand All @@ -22,31 +22,33 @@ class CreditorAccount:
@dataclass
class DebtorAccount:
""" class for a single debitor account """
# pylint: disable=C0103
iban: Optional[str] = None
accountId: Optional[str] = None # pylint: disable=C0103 # NOSONAR
accountId: Optional[str] = None


@filter_unexpected_fields
@dataclass
class Recurrence:
""" class for frequency account """
# pylint: disable=C0103
frm: Optional[str] = None
frequency: Optional[str] = None
holidayExecutionStrategy: Optional[str] = None # pylint: disable=C0103 # NOSONAR
nextExecutionAt: Optional[str] = None # pylint: disable=C0103 # NOSONAR
holidayExecutionStrategy: Optional[str] = None
nextExecutionAt: Optional[str] = None
until: Optional[str] = None


@filter_unexpected_fields
@dataclass
class StandingOrderItem:
""" class for a single standing order """
amount: Optional[Amount] = None
creditor: Optional[CreditorAccount] = None
debtor: Optional[DebtorAccount] = None
amount: Optional[Dict] = None
creditor: Optional[Union[Dict, str]] = None
debtor: Optional[Union[Dict, str]] = None
description: Optional[str] = None
messages: List[str] = field(default_factory=list)
recurrence: Optional[Recurrence] = None
recurrence: Optional[Union[Dict, str]] = None
status: Optional[str] = None

def __post_init__(self):
Expand Down
6 changes: 3 additions & 3 deletions dkb_robo/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path
import random
from string import digits, ascii_letters
from typing import List, Tuple
from typing import List, Tuple, Optional
from datetime import datetime, timezone
from dataclasses import dataclass, fields, asdict
import time
Expand All @@ -27,8 +27,8 @@ def get_dateformat():
class Amount:
""" Amount data class, roughly based on the JSON API response. """
# pylint: disable=c0103
value: float = None
currencyCode: str = None
value: Optional[float] = None
currencyCode: Optional[str] = None

def __post_init__(self):
# convert value to float
Expand Down

0 comments on commit 14e334e

Please sign in to comment.