Skip to content

Commit

Permalink
fix: use old-school dict typing assignment for py 8
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed Oct 29, 2023
1 parent 890c3a5 commit 8168726
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions netsuite/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def account_slugified(self) -> str:
return self.account.lower().replace("_", "-")

@staticmethod
def _reorganize_auth_keys(raw: dict[str, t.Any]) -> dict[str, t.Any]:
def _reorganize_auth_keys(raw: t.Dict[str, t.Any]) -> t.Dict[str, t.Any]:
# we intentionally do not type `reorganized` here, mypy does not like union types with dict key assignment
# https://stackoverflow.com/questions/69824126/mypy-invalid-index-type-str-for-unionstr-dictstr-str-expected-type-u

reorganized: dict[t.Any, t.Any] = {"auth": {}}
reorganized: t.Dict[t.Any, t.Any] = {"auth": {}}

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

0 comments on commit 8168726

Please sign in to comment.