mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-04 00:37:04 -08:00
feat(cli):improve anilist interfaces api
This commit is contained in:
13
fastanime/cli/utils/tools.py
Normal file
13
fastanime/cli/utils/tools.py
Normal file
@@ -0,0 +1,13 @@
|
||||
class QueryDict(dict):
|
||||
"""dot.notation access to dictionary attributes"""
|
||||
|
||||
def __getattr__(self, attr):
|
||||
try:
|
||||
return self.__getitem__(attr)
|
||||
except KeyError:
|
||||
raise AttributeError(
|
||||
"%r object has no attribute %r" % (self.__class__.__name__, attr)
|
||||
)
|
||||
|
||||
def __setattr__(self, attr, value):
|
||||
self.__setitem__(attr, value)
|
||||
Reference in New Issue
Block a user