Skip to content

Commit 4e59fa9

Browse files
author
Paolo Tranquilli
committed
Codegen: remove unneeded code
1 parent f7afcd0 commit 4e59fa9

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

misc/codegen/lib/schemadefs.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,6 @@ def __getitem__(self, item):
211211
_ClassDecorator = _Callable[[type], type]
212212

213213

214-
def _annotate(**kwargs) -> _ClassDecorator:
215-
def f(cls: type) -> type:
216-
for k, v in kwargs.items():
217-
setattr(cls, f"_{k}", v)
218-
return cls
219-
220-
return f
221-
222-
223214
boolean = "boolean"
224215
int = "int"
225216
string = "string"
@@ -298,10 +289,6 @@ def decorator(cls: type) -> _PropertyAnnotation:
298289
for a in dir(cls):
299290
if a.startswith(_schema.inheritable_pragma_prefix):
300291
setattr(annotated_cls, a, getattr(cls, a))
301-
for a, v in cls.__dict__.items():
302-
# transfer annotations
303-
if a.startswith("_") and not a.startswith("__") and a != "_pragmas":
304-
setattr(annotated_cls, a, v)
305292
for p, a in cls.__annotations__.items():
306293
if p in annotated_cls.__annotations__:
307294
annotated_cls.__annotations__[p] |= a

0 commit comments

Comments
 (0)