Skip to content

Commit b26aa69

Browse files
committed
Revert "some fix"
This reverts commit f48fb59.
1 parent f48fb59 commit b26aa69

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

stubgen/converters.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,6 @@ def append_records(
311311

312312
return df
313313

314-
NODE_GENERIC_METHODS = {
315-
'get_node': 'T',
316-
'get_node_or_null': 'T | None',
317-
'get_parent': 'T',
318-
}
319314

320315
OPERATORS_TABLE = {
321316
"<": "__lt__",

stubgen/map.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def default(gdt_expr: str) -> typing.Any: ...
348348
right_type = operator.right_type
349349
if right_type:
350350
right_type = converters.convert_type_name(right_type)
351-
351+
352352
right_type_is_alias = right_type in list(
353353
converters.ALIAS_CLASS_DATA.loc[:, "cls_name"]
354354
)
@@ -423,18 +423,9 @@ def default(gdt_expr: str) -> typing.Any: ...
423423

424424
# ------Method
425425
method_name = converters.convert_keyword_name(method.name)
426-
generic_expr = ''
427-
428-
if class_name == 'Node':
429-
ret_t_override = converters.NODE_GENERIC_METHODS.get(method_name)
430-
if ret_t_override is not None:
431-
ret_t = ret_t_override
432-
generic_expr = f"[T: Node]"
433-
434426
writer.writefmt(
435-
"def {0}{1}({2}) -> {3}: ...",
427+
"def {0}({1}) -> {2}: ...",
436428
method_name,
437-
generic_expr,
438429
", ".join(arg_expr),
439430
ret_t,
440431
)
@@ -505,7 +496,7 @@ def gen_init_pyi_writer(gdt_all_in_one: GodotInOne, pyi_writer: Writer) -> Write
505496
from .header import *
506497
507498
508-
def load[T: classes.Resource](path: str) -> T: ...
499+
def load(path: str): ...
509500
"""
510501
)
511502

0 commit comments

Comments
 (0)