diff options
author | Munyoki Kilyungi | 2024-03-12 22:29:42 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2024-03-13 15:34:57 +0300 |
commit | bdbadc86218622e56a192eccf3a83542804d7f8d (patch) | |
tree | 8a6d44a64fa60ba54d437b2336276e135271d573 | |
parent | 76b114a454d5ade92147ab83dd0abd817b9d0ff9 (diff) | |
download | gn-auth-bdbadc86218622e56a192eccf3a83542804d7f8d.tar.gz |
Delete dictify.
This module is redundant since dataclasses already provides the asdict
method.
* gn_auth/auth/dictify.py: Delete.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r-- | gn_auth/auth/dictify.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/gn_auth/auth/dictify.py b/gn_auth/auth/dictify.py deleted file mode 100644 index f9337f6..0000000 --- a/gn_auth/auth/dictify.py +++ /dev/null @@ -1,12 +0,0 @@ -"""Module for dictifying objects""" - -from typing import Any, Protocol - -class Dictifiable(Protocol):# pylint: disable=[too-few-public-methods] - """Type annotation for generic object with a `dictify` method.""" - def dictify(self): - """Convert the object to a dict""" - -def dictify(obj: Dictifiable) -> dict[str, Any]: - """Turn `obj` to a dict representation.""" - return obj.dictify() |