From bdbadc86218622e56a192eccf3a83542804d7f8d Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 12 Mar 2024 22:29:42 +0300 Subject: Delete dictify. This module is redundant since dataclasses already provides the asdict method. * gn_auth/auth/dictify.py: Delete. Signed-off-by: Munyoki Kilyungi --- gn_auth/auth/dictify.py | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 gn_auth/auth/dictify.py (limited to 'gn_auth/auth') 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() -- cgit v1.2.3