Skip to content

Commit

Permalink
fix: make log level optional
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed Oct 29, 2023
1 parent 6095fb3 commit 5110138
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions netsuite/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import configparser
import os
import typing as t
from typing import Dict, Union
from typing import Dict

from pydantic import BaseModel

Expand All @@ -20,7 +20,8 @@ class TokenAuth(BaseModel):
class Config(BaseModel):
account: str
auth: TokenAuth
log_level: str
log_level: t.Optional[str]

# TODO: Support OAuth2
# auth: Union[OAuth2, TokenAuth]

Expand All @@ -31,7 +32,7 @@ def account_slugified(self) -> str:

@staticmethod
def _reorganize_auth_keys(raw: Dict[str, t.Any]) -> Dict[str, t.Any]:
reorganized: Dict[str, Union[str, Dict[str, str]]] = {"auth": {}}
reorganized: Dict[str, t.Union[str, Dict[str, str]]] = {"auth": {}}

for key, val in raw.items():
if key in TokenAuth.__fields__:
Expand Down

0 comments on commit 5110138

Please sign in to comment.