New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOC Modul über SkodaConnect #762
Conversation
Co-authored-by: LKuemmel <76958050+LKuemmel@users.noreply.github.com>
Co-authored-by: LKuemmel <76958050+LKuemmel@users.noreply.github.com>
def _is_optional_of_dict(requested_type): | ||
# Optional[dict] is an alias for Union[dict, None] | ||
if typing.get_origin(requested_type) == Union: | ||
args = typing.get_args(requested_type) | ||
if len(args) == 2: | ||
return issubclass(args[0], dict) and issubclass(args[1], type(None)) | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nach der Anmerkung von Lutz kann das nun weg oder?
def _is_optional_of_dict(requested_type): | |
# Optional[dict] is an alias for Union[dict, None] | |
if typing.get_origin(requested_type) == Union: | |
args = typing.get_args(requested_type) | |
if len(args) == 2: | |
return issubclass(args[0], dict) and issubclass(args[1], type(None)) | |
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nein, hier ist etwas anderes gemeint. In der Konfiguration werden Refresh-Tokens gespeichert, soweit sie verfügbar ist. Damit diese Tokens wieder wieder gepasst werden können, ist diese Anpassung nötig.
Ich habe mal zum Verständnis einen Test hinzugefügt.
28718b5
to
ab0f9c4
Compare
Das SOC Modul nutzt die Bibliothek Skoda Connect.
Getestet habe ich mir meinem Skoda Enyaq, aber auch andere BEVs des Hersteller werden durch die Bibliothek unterstützt.
Im Dataclass_util wurde das Handling für Optional[dict] ergänzt, um in der SOC Modulkonfiguration optionale dict-Parameter zu ermöglichen.