removed trailing spaces
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
from typing import Type, get_type_hints, TypeVar
|
||||
import functools
|
||||
from typing import Type, get_type_hints, TypeVar
|
||||
|
||||
|
||||
def typechecked(func):
|
||||
@functools.wraps(func)
|
||||
@ -11,6 +12,7 @@ def typechecked(func):
|
||||
return func(*args, **kwargs)
|
||||
return typechecked_call
|
||||
|
||||
|
||||
def property_maker(cls, name, type_name):
|
||||
storage_name = '_' + name
|
||||
|
||||
@ -25,7 +27,10 @@ def property_maker(cls, name, type_name):
|
||||
|
||||
return prop
|
||||
|
||||
class Snippet(dict):
|
||||
|
||||
|
||||
class Snippet:
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self._properties = []
|
||||
self.set_properties(**kwargs)
|
||||
@ -64,6 +69,7 @@ class Snippet(dict):
|
||||
return cls.from_dict(response)
|
||||
|
||||
|
||||
|
||||
class Basesnippet(Snippet):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
@ -98,7 +104,11 @@ class Paragraph(Basesnippet):
|
||||
self.snippetType = "paragraph"
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
tmp = Snippet(id=str, textcontent=str, defaultOrder=int)
|
||||
print(tmp.id)
|
||||
tmp.id = 2
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user