Skip to content

Commit eb56002

Browse files
committed
fix: applying @RobPasMue's suggestions
1 parent a5473b3 commit eb56002

File tree

3 files changed

+11
-21
lines changed

3 files changed

+11
-21
lines changed

src/pyconverter/xml2py/ast_tree.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2689,14 +2689,6 @@ def __init__(
26892689
if "VAL1" in self._initial_arguments:
26902690
print(self._initial_arguments)
26912691

2692-
# def fix_initial_arguments(self, initial_arguments: List) -> None:
2693-
# """Fix the initial arguments."""
2694-
# # All arguments are present, need to add the missing ones
2695-
# _, start_iter = get_iter_values(ellipsis_args[0])
2696-
# _, end_iter = get_iter_values(ellipsis_args[-1])
2697-
# for i in range(start_iter, end_iter + 1):
2698-
# complete_args.append(f"{name_without_iter}{i}")
2699-
27002692
@property
27012693
def py_arg_name(self) -> str:
27022694
"""Python-compatible term."""

src/pyconverter/xml2py/custom_functions.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,16 @@ def get_docstring_lists(
4040
4141
Returns
4242
-------
43-
List[str]
44-
List containing the docstring ``Parameters`` section.
45-
List[str]
46-
List containing the docstring ``Returns`` section.
47-
List[str]
48-
List containing the docstring ``Notes`` section.
49-
List[str]
50-
List containing the docstring ``Examples`` section.
51-
List[str]
52-
List containing the source code.
53-
List[str]
54-
List containing the library import section.
43+
Tuple[List[str], List[str], List[str], List[str], List[str], List[str], List[str]]
44+
Tuple containing lists of strings for different sections of the Python file.
45+
The order of the lists is as follows:
46+
- Arguments list
47+
- Parameters section
48+
- Returns section
49+
- Notes section
50+
- Examples section
51+
- Source code
52+
- Library import section
5553
"""
5654
lines = None
5755
with open(filename, "r", encoding="utf-8") as pyfile:

src/pyconverter/xml2py/writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def write_source(
380380
structured: bool = True,
381381
check_structure_map: bool = False,
382382
check_files: bool = True,
383-
) -> dict | None:
383+
) -> dict:
384384
"""Write out XML commands as Python source files.
385385
386386
Parameters

0 commit comments

Comments
 (0)