Skip to content

Commit

Permalink
🐛 Fix config typing error on lower version of Python
Browse files Browse the repository at this point in the history
  • Loading branch information
mnixry committed Apr 23, 2024
1 parent 6bf63c1 commit 4a53355
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hibiapi/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ def get(self) -> Any: ...
@overload
def get(self, template: type[_T]) -> _T: ...

def get(self, template: type[_T] | None = None) -> Any | _T: # type: ignore
def get(self, template: Optional[type[_T]] = None): # type: ignore
object_ = super().get()
if template is not None:
return parse_obj_as(template, object_)
return object_

def get_optional(self, template: type[_T]) -> _T | None:
def get_optional(self, template: type[_T]) -> Optional[_T]:
try:
return self.get(template)
except Exception:
Expand Down

0 comments on commit 4a53355

Please sign in to comment.