diff --git a/codemaker/Module_codemaker.mk b/codemaker/Module_codemaker.mk index 495400366539..33df554c3d48 100644 --- a/codemaker/Module_codemaker.mk +++ b/codemaker/Module_codemaker.mk @@ -23,4 +23,8 @@ $(eval $(call gb_Module_add_targets,codemaker,\ )) endif +$(eval $(call gb_Module_add_check_targets,codemaker,\ + PythonTest_codemaker_python \ +)) + # vim:set noet sw=4 ts=4: diff --git a/codemaker/PythonTest_codemaker_python.mk b/codemaker/PythonTest_codemaker_python.mk new file mode 100644 index 000000000000..be453aa5eedf --- /dev/null +++ b/codemaker/PythonTest_codemaker_python.mk @@ -0,0 +1,17 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_PythonTest_PythonTest,codemaker_python)) +$(eval $(call gb_PythonTest_add_modules,codemaker_python,$(SRCDIR)/codemaker/tests/pythonmaker,\ + test_pythonmaker \ +)) + +$(call gb_PythonTest_get_target,codemaker_python): $(call gb_Executable_get_target,pythonmaker) + +# vim: set noet sw=4 ts=4: diff --git a/codemaker/tests/pythonmaker/README.md b/codemaker/tests/pythonmaker/README.md new file mode 100644 index 000000000000..19ba0b183ac3 --- /dev/null +++ b/codemaker/tests/pythonmaker/README.md @@ -0,0 +1,71 @@ +# Pythonmaker Test Suite + +This directory contains the integration test suite for the `pythonmaker` tool. The purpose of this suite is to ensure that `pythonmaker` correctly generates Python stub files (`.pyi`) from UNO IDL definitions. It verifies the syntactic correctness of the output and protects against future regressions. + +The test is automatically executed as part of the `make check` command for the `codemaker` module. + +## Testing Philosophy + +The test suite follows a "Golden File" testing methodology. This is a standard and robust approach for testing compilers and code generators. The process is as follows: + +1. **Source IDL:** A comprehensive test IDL file (`idl/pythontypes.idl`) serves as the single source of truth for all UNO constructs that `pythonmaker` is expected to handle. +2. **Generate Output:** During the test run, this IDL is compiled into an `.rdb` file, and `pythonmaker` is executed to generate a complete set of `.pyi` stubs in a temporary directory. +3. **Compare Against "Golden" Files:** The newly generated stubs are recursively compared against a set of manually verified, correct "golden" stub files located in the `expected_pyi_stubs/` directory. +4. **Pass/Fail:** The test passes only if the generated output is an exact match to the golden files. Any difference—missing files, extra files, or content mismatches—will cause the test to fail. + +This approach ensures that any change to `pythonmaker` that alters its output is immediately detected. + +## Directory Structure + +- `idl/pythontypes.idl`: The master IDL file containing all test cases. This includes enums, constants, typedefs, structs (plain, inherited, and polymorphic), exceptions, interfaces, services, and singletons. It also includes edge cases like the use of keywords as identifiers. +- `expected_pyi_stubs/`: Contains the "golden" `.pyi` file structure that `pythonmaker` is expected to generate from `pythontypes.idl`. This is the reference standard for correctness. +- `test_pythonmaker.py`: The Python script that orchestrates the entire test. It is executed by the build system and is responsible for compiling the IDL, running `pythonmaker`, and performing the directory comparison. +- `makefile.mk`: The gbuild makefile that integrates the Python test script into the LibreOffice `make check` process. + +--- + +## How to Modify or Extend the Test Suite + +Future developers may need to modify these tests when fixing a bug or adding a new feature to `pythonmaker`. Here is the standard workflow. + +### Scenario 1: Fixing a Bug in `pythonmaker` + +If you have fixed a bug that was causing `pythonmaker` to generate incorrect `.pyi` files, the test suite should now fail because the new, correct output will not match the old, incorrect golden files. + +**To update the tests:** + +1. **Verify the Fix:** After fixing the C++ code in `pythonmaker`, run the test to confirm that it fails as expected. The `diff` error will show you the difference between the new output and the old golden files. +2. **Regenerate the Golden Files:** + a. First, delete the old golden files to ensure a clean slate. + ```bash + rm -rf codemaker/tests/pythonmaker/expected_pyi_stubs/* + ``` + b. Run your updated `pythonmaker` manually to generate the new, correct stubs into a temporary directory. You can find the exact command to run from the test script's log output during a `make check` run. A typical command would be: + ```bash + # Run from .../libreoffice/instdir/program/ + ./pathToPythonmaker.exe -O /path/to/new_golden_output /path/to/test.rdb + ``` +3. **Replace the Golden Files:** Copy the entire generated output into the `expected_pyi_stubs/` directory. + ```bash + cp -r /path/to/new_golden_output/* codemaker/tests/pythonmaker/expected_pyi_stubs/ + ``` +4. **Validate:** Run `mypy --strict codemaker/tests/pythonmaker/expected_pyi_stubs/` to ensure the new golden files are syntactically correct and type-safe. +5. **Commit:** Commit the changes to `pythonmaker`'s C++ code **along with** the updated golden files in your patch. The commit message should explain that the golden files were updated to reflect the bug fix. + +### Scenario 2: Adding a New Feature to `pythonmaker` + +If you add support for a new IDL feature (e.g., a new type or an annotation), you should add a test case for it. + +1. **Add a Test Case to the IDL:** + * Open `codemaker/tests/pythonmaker/idl/pythontypes.idl`. + * Add a new, simple example of the feature you've implemented. For example, add a new `interface` with a specific attribute you are now supporting. +2. **Generate and Verify the New Golden File:** + * Since you've added a new type, a new `.pyi` file will be generated. Run `pythonmaker` manually as described above. + * Locate the newly generated `.pyi` file for your new test case. + * **Manually inspect this new file** to ensure it is 100% correct. + * Run `mypy --strict` on this individual file. + * Once verified, place this new golden file in the correct subdirectory within `expected_pyi_stubs/`. +3. **Run the Full Test Suite:** Run `make check` for the module. The test should now pass, as the newly generated output will match your newly added golden file. +4. **Commit:** Commit the changes to `pythonmaker`'s C++ code, the updated `pythontypes.idl`, and the new golden `.pyi` file(s) together in your patch. + +By following this workflow, the test suite remains a reliable and comprehensive measure of `pythonmaker`'s correctness. diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/__init__.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/__init__.pyi new file mode 100644 index 000000000000..8e5e7871195c --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/__init__.pyi @@ -0,0 +1 @@ +# Auto-generated __init__.pyi by pythonmaker diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/__init__.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/__init__.pyi new file mode 100644 index 000000000000..8e5e7871195c --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/__init__.pyi @@ -0,0 +1 @@ +# Auto-generated __init__.pyi by pythonmaker diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Any.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Any.pyi new file mode 100644 index 000000000000..8558f834af6b --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Any.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import Any + +Any = Any diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Boolean.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Boolean.pyi new file mode 100644 index 000000000000..037ba9a2c14f --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Boolean.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +Boolean = bool diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Byte.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Byte.pyi new file mode 100644 index 000000000000..0894be631e48 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Byte.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +Byte = int diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Char.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Char.pyi new file mode 100644 index 000000000000..15957341c580 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Char.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +Char = str diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Double.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Double.pyi new file mode 100644 index 000000000000..a3420b8b506f --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Double.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +Double = float diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum.pyi new file mode 100644 index 000000000000..d2c2bc3bb3a5 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from test.codemaker.pythonmaker.Enum2 import Enum2 as test_codemaker_pythonmaker_Enum2_ + +Enum = test_codemaker_pythonmaker_Enum2_ diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum1.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum1.pyi new file mode 100644 index 000000000000..be6a0099c622 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum1.pyi @@ -0,0 +1,9 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +import enum + +class Enum1(enum.Enum): + VALUE_NEG = -1 + VALUE_ZERO = 0 + VALUE_POS = 1 diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum2.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum2.pyi new file mode 100644 index 000000000000..0a2279b41db8 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum2.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +import enum + +class Enum2(enum.Enum): + FLAG_NONE = 0 + FLAG_READ = 1 + FLAG_WRITE = 2 + FLAG_EXEC = 4 + FLAG_ALL = 7 diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum3.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum3.pyi new file mode 100644 index 000000000000..59b5ba4faf9e --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum3.pyi @@ -0,0 +1,10 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +import enum + +class Enum3(enum.Enum): + FIRST = 10 + SECOND = 20 + THIRD = 100 + FOURTH = 255 diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum4.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum4.pyi new file mode 100644 index 000000000000..6c4b144a7eb8 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum4.pyi @@ -0,0 +1,9 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +import enum + +class Enum4(enum.Enum): + AUTO_A = 0 + AUTO_B = 1 + AUTO_C = 2 diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Float.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Float.pyi new file mode 100644 index 000000000000..90a451820736 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Float.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +Float = float diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Hyper.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Hyper.pyi new file mode 100644 index 000000000000..e999eb0c3a6f --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Hyper.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +Hyper = int diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Long.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Long.pyi new file mode 100644 index 000000000000..e28c07ef2495 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Long.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +Long = int diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/PolyStruct.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/PolyStruct.pyi new file mode 100644 index 000000000000..413e1a950cc8 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/PolyStruct.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import TypeVar, Generic + +if_ = TypeVar("if_") +else_ = TypeVar("else_") + +class PolyStruct(Generic[if_, else_]): + def __init__(self, member1: if_ | None = ..., member2: int | None = ...) -> None: + ... + + member1: if_ + member2: int diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S1.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S1.pyi new file mode 100644 index 000000000000..275d4be7f698 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S1.pyi @@ -0,0 +1,52 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.lang.ClassNotFoundException import ClassNotFoundException as com_sun_star_lang_ClassNotFoundException_ +from com.sun.star.lang.IllegalAccessException import IllegalAccessException as com_sun_star_lang_IllegalAccessException_ +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.Exception import Exception as com_sun_star_uno_Exception_ +from com.sun.star.uno.RuntimeException import RuntimeException as com_sun_star_uno_RuntimeException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ +from test.codemaker.pythonmaker.Enum2 import Enum2 as test_codemaker_pythonmaker_Enum2_ +from test.codemaker.pythonmaker.Struct1 import Struct1 as test_codemaker_pythonmaker_Struct1_ +from test.codemaker.pythonmaker.XTest import XTest as test_codemaker_pythonmaker_XTest_ +from typing import Any +from typing import List +from typing import Type + +class S1: + @staticmethod + def create1(ctx: com_sun_star_uno_XComponentContext_) -> test_codemaker_pythonmaker_XTest_: + ... + + @staticmethod + def create2(ctx: com_sun_star_uno_XComponentContext_, *args: Any) -> test_codemaker_pythonmaker_XTest_: + """Raises: + com_sun_star_uno_RuntimeException_ + com_sun_star_lang_ClassNotFoundException_ + com_sun_star_uno_Exception_ + com_sun_star_lang_IllegalAccessException_ + com_sun_star_uno_DeploymentException_ + """ + ... + + @staticmethod + def create3(ctx: com_sun_star_uno_XComponentContext_, S1: List[Any]) -> test_codemaker_pythonmaker_XTest_: + """Raises: + com_sun_star_uno_RuntimeException_ + com_sun_star_lang_ClassNotFoundException_ + com_sun_star_lang_IllegalAccessException_ + com_sun_star_uno_DeploymentException_ + """ + ... + + @staticmethod + def create4(ctx: com_sun_star_uno_XComponentContext_, javamaker: int, S1: int, create4: int) -> test_codemaker_pythonmaker_XTest_: + ... + + @staticmethod + def create5(ctx: com_sun_star_uno_XComponentContext_, p1: bool, p2: int, p3: int, p4: int, p5: int, p6: int, p7: int, p8: int, p9: float, p10: float, p11: str, p12: str, p13: Type[Any], p14: Any, p15: test_codemaker_pythonmaker_Enum2_, p16: test_codemaker_pythonmaker_Struct1_, p17: com_sun_star_uno_XInterface_, p18: com_sun_star_uno_XNamingService_, t1: bool, t2: int, t3: int, t4: int, t5: int, t6: int, t7: int, t8: int, t9: float, t10: float, t11: str, t12: str, t13: Type[Any], t14: Any, t15: test_codemaker_pythonmaker_Enum2_, t16: test_codemaker_pythonmaker_Struct1_, t17: com_sun_star_uno_XInterface_, t18: com_sun_star_uno_XNamingService_, a1: List[bool], a2: List[int], a3: List[int], a4: List[int], a5: List[int], a6: List[int], a7: List[int], a8: List[int], a9: List[float], a10: List[float], a11: List[str], a12: List[str], a13: List[Type[Any]], a14: List[Any], a15: List[test_codemaker_pythonmaker_Enum2_], a16: List[test_codemaker_pythonmaker_Struct1_], a17: List[com_sun_star_uno_XInterface_], a18: List[com_sun_star_uno_XNamingService_], aa1: List[List[bool]], aa2: List[List[int]], aa3: List[List[int]], aa4: List[List[int]], aa5: List[List[int]], aa6: List[List[int]], aa7: List[List[int]], aa8: List[List[int]], aa9: List[List[float]], aa10: List[List[float]], aa11: List[List[str]], aa12: List[List[str]], aa13: List[List[Type[Any]]], aa14: List[List[Any]], aa15: List[List[test_codemaker_pythonmaker_Enum2_]], aa16: List[List[test_codemaker_pythonmaker_Struct1_]], aa17: List[List[com_sun_star_uno_XInterface_]], aa18: List[List[com_sun_star_uno_XNamingService_]], at1: List[List[bool]], at2: List[List[int]], at3: List[List[int]], at4: List[List[int]], at5: List[List[int]], at6: List[List[int]], at7: List[List[int]], at8: List[List[int]], at9: List[List[float]], at10: List[List[float]], at11: List[List[str]], at12: List[List[str]], at13: List[List[Type[Any]]], at14: List[List[Any]], at15: List[List[test_codemaker_pythonmaker_Enum2_]], at16: List[List[test_codemaker_pythonmaker_Struct1_]], at17: List[List[com_sun_star_uno_XInterface_]], at18: List[List[com_sun_star_uno_XNamingService_]]) -> test_codemaker_pythonmaker_XTest_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S2.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S2.pyi new file mode 100644 index 000000000000..32fcfaecd2a2 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S2.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from test.codemaker.pythonmaker.XTest import XTest as test_codemaker_pythonmaker_XTest_ + +class S2: + @staticmethod + def create(ctx: com_sun_star_uno_XComponentContext_) -> test_codemaker_pythonmaker_XTest_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S4.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S4.pyi new file mode 100644 index 000000000000..1ee119510671 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S4.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from test.codemaker.pythonmaker.XTest import XTest as test_codemaker_pythonmaker_XTest_ + +class S4: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> test_codemaker_pythonmaker_XTest_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceAny.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceAny.pyi new file mode 100644 index 000000000000..c3651a9022f7 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceAny.pyi @@ -0,0 +1,7 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import Any +from typing import List + +SequenceAny = List[Any] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceBoolean.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceBoolean.pyi new file mode 100644 index 000000000000..ba486ef7e517 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceBoolean.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceBoolean = List[bool] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceByte.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceByte.pyi new file mode 100644 index 000000000000..5a84725f96e0 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceByte.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceByte = List[int] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceChar.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceChar.pyi new file mode 100644 index 000000000000..5ac6e196533e --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceChar.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceChar = List[str] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceDouble.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceDouble.pyi new file mode 100644 index 000000000000..9d7718f94774 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceDouble.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceDouble = List[float] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceEnum.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceEnum.pyi new file mode 100644 index 000000000000..c0eae23cc497 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceEnum.pyi @@ -0,0 +1,7 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from test.codemaker.pythonmaker.Enum2 import Enum2 as test_codemaker_pythonmaker_Enum2_ +from typing import List + +SequenceEnum = List[test_codemaker_pythonmaker_Enum2_] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceFloat.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceFloat.pyi new file mode 100644 index 000000000000..b14ff1f48d8c --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceFloat.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceFloat = List[float] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceHyper.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceHyper.pyi new file mode 100644 index 000000000000..96b3f2f83df4 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceHyper.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceHyper = List[int] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceLong.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceLong.pyi new file mode 100644 index 000000000000..6b03ec48b8d3 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceLong.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceLong = List[int] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceShort.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceShort.pyi new file mode 100644 index 000000000000..108ff4203797 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceShort.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceShort = List[int] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceString.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceString.pyi new file mode 100644 index 000000000000..c0750835c25b --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceString.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceString = List[str] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceStruct.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceStruct.pyi new file mode 100644 index 000000000000..d607af826208 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceStruct.pyi @@ -0,0 +1,7 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from test.codemaker.pythonmaker.Struct1 import Struct1 as test_codemaker_pythonmaker_Struct1_ +from typing import List + +SequenceStruct = List[test_codemaker_pythonmaker_Struct1_] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceType.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceType.pyi new file mode 100644 index 000000000000..ae2f5d15d8c1 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceType.pyi @@ -0,0 +1,8 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import Any +from typing import List +from typing import Type + +SequenceType = List[Type[Any]] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedHyper.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedHyper.pyi new file mode 100644 index 000000000000..932eb16a725d --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedHyper.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceUnsignedHyper = List[int] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedLong.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedLong.pyi new file mode 100644 index 000000000000..f0966f1fbff4 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedLong.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceUnsignedLong = List[int] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedShort.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedShort.pyi new file mode 100644 index 000000000000..de202f933616 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedShort.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import List + +SequenceUnsignedShort = List[int] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceXInterface.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceXInterface.pyi new file mode 100644 index 000000000000..a3fc11c18d5e --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceXInterface.pyi @@ -0,0 +1,7 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ +from typing import List + +SequenceXInterface = List[com_sun_star_uno_XInterface_] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceXNamingService.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceXNamingService.pyi new file mode 100644 index 000000000000..ae04373df077 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceXNamingService.pyi @@ -0,0 +1,7 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ +from typing import List + +SequenceXNamingService = List[com_sun_star_uno_XNamingService_] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Service.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Service.pyi new file mode 100644 index 000000000000..7dbd89bc4223 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Service.pyi @@ -0,0 +1,12 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ +from typing import Any + +class Service: + @staticmethod + def create(ctx: com_sun_star_uno_XComponentContext_, *args: Any) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Short.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Short.pyi new file mode 100644 index 000000000000..eedc415c7520 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Short.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +Short = int diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/String.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/String.pyi new file mode 100644 index 000000000000..d1896e3c9773 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/String.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +String = str diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct.pyi new file mode 100644 index 000000000000..e9127de5dbeb --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from test.codemaker.pythonmaker.Struct1 import Struct1 as test_codemaker_pythonmaker_Struct1_ + +Struct = test_codemaker_pythonmaker_Struct1_ diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct1.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct1.pyi new file mode 100644 index 000000000000..c88d769ec622 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct1.pyi @@ -0,0 +1,8 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +class Struct1(object): + def __init__(self, member1: int | None = ...) -> None: + ... + + member1: int diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct2.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct2.pyi new file mode 100644 index 000000000000..7136529440d3 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct2.pyi @@ -0,0 +1,105 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ +from test.codemaker.pythonmaker.Enum2 import Enum2 as test_codemaker_pythonmaker_Enum2_ +from test.codemaker.pythonmaker.Struct1 import Struct1 as test_codemaker_pythonmaker_Struct1_ +from typing import Any +from typing import List +from typing import Type + +class Struct2(object): + def __init__(self, p1: bool | None = ..., p2: int | None = ..., p3: int | None = ..., p4: int | None = ..., p5: int | None = ..., p6: int | None = ..., p7: int | None = ..., p8: int | None = ..., p9: float | None = ..., p10: float | None = ..., p11: str | None = ..., p12: str | None = ..., p13: Type[Any] | None = ..., p14: Any | None = ..., p15: test_codemaker_pythonmaker_Enum2_ | None = ..., p16: test_codemaker_pythonmaker_Struct1_ | None = ..., p17: com_sun_star_uno_XInterface_ | None = ..., p18: com_sun_star_uno_XNamingService_ | None = ..., t1: bool | None = ..., t2: int | None = ..., t3: int | None = ..., t4: int | None = ..., t5: int | None = ..., t6: int | None = ..., t7: int | None = ..., t8: int | None = ..., t9: float | None = ..., t10: float | None = ..., t11: str | None = ..., t12: str | None = ..., t13: Type[Any] | None = ..., t14: Any | None = ..., t15: test_codemaker_pythonmaker_Enum2_ | None = ..., t16: test_codemaker_pythonmaker_Struct1_ | None = ..., t17: com_sun_star_uno_XInterface_ | None = ..., t18: com_sun_star_uno_XNamingService_ | None = ..., a1: List[bool] | None = ..., a2: List[int] | None = ..., a3: List[int] | None = ..., a4: List[int] | None = ..., a5: List[int] | None = ..., a6: List[int] | None = ..., a7: List[int] | None = ..., a8: List[int] | None = ..., a9: List[float] | None = ..., a10: List[float] | None = ..., a11: List[str] | None = ..., a12: List[str] | None = ..., a13: List[Type[Any]] | None = ..., a14: List[Any] | None = ..., a15: List[test_codemaker_pythonmaker_Enum2_] | None = ..., a16: List[test_codemaker_pythonmaker_Struct1_] | None = ..., a17: List[com_sun_star_uno_XInterface_] | None = ..., a18: List[com_sun_star_uno_XNamingService_] | None = ..., aa1: List[List[bool]] | None = ..., aa2: List[List[int]] | None = ..., aa3: List[List[int]] | None = ..., aa4: List[List[int]] | None = ..., aa5: List[List[int]] | None = ..., aa6: List[List[int]] | None = ..., aa7: List[List[int]] | None = ..., aa8: List[List[int]] | None = ..., aa9: List[List[float]] | None = ..., aa10: List[List[float]] | None = ..., aa11: List[List[str]] | None = ..., aa12: List[List[str]] | None = ..., aa13: List[List[Type[Any]]] | None = ..., aa14: List[List[Any]] | None = ..., aa15: List[List[test_codemaker_pythonmaker_Enum2_]] | None = ..., aa16: List[List[test_codemaker_pythonmaker_Struct1_]] | None = ..., aa17: List[List[com_sun_star_uno_XInterface_]] | None = ..., aa18: List[List[com_sun_star_uno_XNamingService_]] | None = ..., at1: List[List[bool]] | None = ..., at2: List[List[int]] | None = ..., at3: List[List[int]] | None = ..., at4: List[List[int]] | None = ..., at5: List[List[int]] | None = ..., at6: List[List[int]] | None = ..., at7: List[List[int]] | None = ..., at8: List[List[int]] | None = ..., at9: List[List[float]] | None = ..., at10: List[List[float]] | None = ..., at11: List[List[str]] | None = ..., at12: List[List[str]] | None = ..., at13: List[List[Type[Any]]] | None = ..., at14: List[List[Any]] | None = ..., at15: List[List[test_codemaker_pythonmaker_Enum2_]] | None = ..., at16: List[List[test_codemaker_pythonmaker_Struct1_]] | None = ..., at17: List[List[com_sun_star_uno_XInterface_]] | None = ..., at18: List[List[com_sun_star_uno_XNamingService_]] | None = ...) -> None: + ... + + p1: bool + p2: int + p3: int + p4: int + p5: int + p6: int + p7: int + p8: int + p9: float + p10: float + p11: str + p12: str + p13: Type[Any] + p14: Any + p15: test_codemaker_pythonmaker_Enum2_ + p16: test_codemaker_pythonmaker_Struct1_ + p17: com_sun_star_uno_XInterface_ + p18: com_sun_star_uno_XNamingService_ + t1: bool + t2: int + t3: int + t4: int + t5: int + t6: int + t7: int + t8: int + t9: float + t10: float + t11: str + t12: str + t13: Type[Any] + t14: Any + t15: test_codemaker_pythonmaker_Enum2_ + t16: test_codemaker_pythonmaker_Struct1_ + t17: com_sun_star_uno_XInterface_ + t18: com_sun_star_uno_XNamingService_ + a1: List[bool] + a2: List[int] + a3: List[int] + a4: List[int] + a5: List[int] + a6: List[int] + a7: List[int] + a8: List[int] + a9: List[float] + a10: List[float] + a11: List[str] + a12: List[str] + a13: List[Type[Any]] + a14: List[Any] + a15: List[test_codemaker_pythonmaker_Enum2_] + a16: List[test_codemaker_pythonmaker_Struct1_] + a17: List[com_sun_star_uno_XInterface_] + a18: List[com_sun_star_uno_XNamingService_] + aa1: List[List[bool]] + aa2: List[List[int]] + aa3: List[List[int]] + aa4: List[List[int]] + aa5: List[List[int]] + aa6: List[List[int]] + aa7: List[List[int]] + aa8: List[List[int]] + aa9: List[List[float]] + aa10: List[List[float]] + aa11: List[List[str]] + aa12: List[List[str]] + aa13: List[List[Type[Any]]] + aa14: List[List[Any]] + aa15: List[List[test_codemaker_pythonmaker_Enum2_]] + aa16: List[List[test_codemaker_pythonmaker_Struct1_]] + aa17: List[List[com_sun_star_uno_XInterface_]] + aa18: List[List[com_sun_star_uno_XNamingService_]] + at1: List[List[bool]] + at2: List[List[int]] + at3: List[List[int]] + at4: List[List[int]] + at5: List[List[int]] + at6: List[List[int]] + at7: List[List[int]] + at8: List[List[int]] + at9: List[List[float]] + at10: List[List[float]] + at11: List[List[str]] + at12: List[List[str]] + at13: List[List[Type[Any]]] + at14: List[List[Any]] + at15: List[List[test_codemaker_pythonmaker_Enum2_]] + at16: List[List[test_codemaker_pythonmaker_Struct1_]] + at17: List[List[com_sun_star_uno_XInterface_]] + at18: List[List[com_sun_star_uno_XNamingService_]] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/TestConstantsBasic.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/TestConstantsBasic.pyi new file mode 100644 index 000000000000..a7252abe7598 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/TestConstantsBasic.pyi @@ -0,0 +1,15 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +class TestConstantsBasic: + BOOL_FALSE: bool = False + BOOL_TRUE: bool = True + HYPER_MAX: int = 9223372036854775807 + HYPER_MIN: int = -9223372036854775808 + LONG_HEX: int = 2147483647 + LONG_MAX: int = 2147483647 + LONG_MIN: int = -2147483648 + SHORT_MAX: int = 32767 + SHORT_MIN: int = -32768 + ULONG_MAX: int = -1 + USHORT_MAX: int = 65535 diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Type.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Type.pyi new file mode 100644 index 000000000000..ddb95889694d --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Type.pyi @@ -0,0 +1,7 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from typing import Any +from typing import Type + +Type = Type[Any] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedHyper.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedHyper.pyi new file mode 100644 index 000000000000..86d18e905d78 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedHyper.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +UnsignedHyper = int diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedLong.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedLong.pyi new file mode 100644 index 000000000000..bedcdb038538 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedLong.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +UnsignedLong = int diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedShort.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedShort.pyi new file mode 100644 index 000000000000..e7e778663217 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedShort.pyi @@ -0,0 +1,4 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +UnsignedShort = int diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XIfc.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XIfc.pyi new file mode 100644 index 000000000000..87940d5ea949 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XIfc.pyi @@ -0,0 +1,17 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from abc import abstractmethod +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ +from test.codemaker.pythonmaker.PolyStruct import PolyStruct as test_codemaker_pythonmaker_PolyStruct_ +from typing import Any + +class XIfc(com_sun_star_uno_XInterface_): + @abstractmethod + def f1(self, arg: test_codemaker_pythonmaker_PolyStruct_[int, int]) -> None: + ... + + @abstractmethod + def f2(self, arg: test_codemaker_pythonmaker_PolyStruct_[Any, com_sun_star_uno_XInterface_]) -> None: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XInterface.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XInterface.pyi new file mode 100644 index 000000000000..a7dc3933106d --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XInterface.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +XInterface = com_sun_star_uno_XInterface_ diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XNamingService.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XNamingService.pyi new file mode 100644 index 000000000000..89d7d3f11ee0 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XNamingService.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +XNamingService = com_sun_star_uno_XNamingService_ diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XTest.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XTest.pyi new file mode 100644 index 000000000000..a85fe347aeb5 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XTest.pyi @@ -0,0 +1,39 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from abc import abstractmethod +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class XTest(com_sun_star_uno_XInterface_): + @property + @abstractmethod + def A1(self) -> int: + ... + @A1.setter + @abstractmethod + def A1(self, value: int) -> None: + ... + + @property + @abstractmethod + def A2(self) -> int: + ... + + @property + @abstractmethod + def A3(self) -> int: + ... + @A3.setter + @abstractmethod + def A3(self, value: int) -> None: + ... + + @property + @abstractmethod + def A4(self) -> int: + ... + + @abstractmethod + def test(self) -> bool: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/__init__.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/__init__.pyi new file mode 100644 index 000000000000..8e5e7871195c --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/__init__.pyi @@ -0,0 +1 @@ +# Auto-generated __init__.pyi by pythonmaker diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/abstract.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/abstract.pyi new file mode 100644 index 000000000000..6f557cb9b31a --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/abstract.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class abstract: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/assert.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/assert.pyi new file mode 100644 index 000000000000..2c7b334f42b6 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/assert.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class assert_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/break.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/break.pyi new file mode 100644 index 000000000000..710a3ef8088b --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/break.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class break_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/catch.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/catch.pyi new file mode 100644 index 000000000000..e4c72d3113b7 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/catch.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class catch: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/class.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/class.pyi new file mode 100644 index 000000000000..b8ec9c5ec75a --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/class.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class class_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/continue.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/continue.pyi new file mode 100644 index 000000000000..11be1b38f399 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/continue.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class continue_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/do.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/do.pyi new file mode 100644 index 000000000000..122cc299ff94 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/do.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class do: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/else.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/else.pyi new file mode 100644 index 000000000000..e2f6945591c1 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/else.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class else_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/MyBaseError.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/MyBaseError.pyi new file mode 100644 index 000000000000..27496d88fc25 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/MyBaseError.pyi @@ -0,0 +1,12 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.Exception import Exception as com_sun_star_uno_Exception_ +from typing import Any + +class MyBaseError(com_sun_star_uno_Exception_): + def __init__(self, ErrorCode: int | None = ..., Details: str | None = ..., *args: Any, **kwargs: Any) -> None: + ... + + ErrorCode: int + Details: str diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/SimpleError.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/SimpleError.pyi new file mode 100644 index 000000000000..42f0a7a4df8e --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/SimpleError.pyi @@ -0,0 +1,10 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.Exception import Exception as com_sun_star_uno_Exception_ +from typing import Any + +class SimpleError(com_sun_star_uno_Exception_): + def __init__(self, *args: Any, **kwargs: Any) -> None: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/__init__.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/__init__.pyi new file mode 100644 index 000000000000..8e5e7871195c --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/__init__.pyi @@ -0,0 +1 @@ +# Auto-generated __init__.pyi by pythonmaker diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/extends.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/extends.pyi new file mode 100644 index 000000000000..649bbcbba40b --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/extends.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class extends: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/final.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/final.pyi new file mode 100644 index 000000000000..24f09f7b575d --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/final.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class final: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/finally.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/finally.pyi new file mode 100644 index 000000000000..33ceb05b07af --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/finally.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class finally_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/for.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/for.pyi new file mode 100644 index 000000000000..5724af48fd4c --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/for.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class for_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/goto.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/goto.pyi new file mode 100644 index 000000000000..0141d517c58d --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/goto.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class goto: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/if.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/if.pyi new file mode 100644 index 000000000000..d3b6a30998c0 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/if.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class if_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/implements.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/implements.pyi new file mode 100644 index 000000000000..1a22bdf920bb --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/implements.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class implements: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/import.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/import.pyi new file mode 100644 index 000000000000..9ff50a89e024 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/import.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class import_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/instanceof.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/instanceof.pyi new file mode 100644 index 000000000000..3ca56959f9fc --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/instanceof.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class instanceof: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/int.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/int.pyi new file mode 100644 index 000000000000..5d88d1acb798 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/int.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class int: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/native.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/native.pyi new file mode 100644 index 000000000000..d7d56b6f732a --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/native.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class native: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/new.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/new.pyi new file mode 100644 index 000000000000..68148518e272 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/new.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class new: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/package.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/package.pyi new file mode 100644 index 000000000000..84491b6d4546 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/package.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class package: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/private.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/private.pyi new file mode 100644 index 000000000000..fc65c3069e15 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/private.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class private: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/protected.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/protected.pyi new file mode 100644 index 000000000000..fe409d0b4bba --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/protected.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class protected: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/public.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/public.pyi new file mode 100644 index 000000000000..f98eb4f1a685 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/public.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class public: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/return.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/return.pyi new file mode 100644 index 000000000000..81dc7a82947c --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/return.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class return_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/__init__.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/__init__.pyi new file mode 100644 index 000000000000..8e5e7871195c --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/__init__.pyi @@ -0,0 +1 @@ +# Auto-generated __init__.pyi by pythonmaker diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/abstract.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/abstract.pyi new file mode 100644 index 000000000000..82293118fbe4 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/abstract.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class abstract: + @staticmethod + def abstract(ctx: com_sun_star_uno_XComponentContext_, abstract: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/assert.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/assert.pyi new file mode 100644 index 000000000000..a8894bdfa2be --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/assert.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class assert_: + @staticmethod + def assert_(ctx: com_sun_star_uno_XComponentContext_, assert_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/break.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/break.pyi new file mode 100644 index 000000000000..2d7c5c1dee5d --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/break.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class break_: + @staticmethod + def break_(ctx: com_sun_star_uno_XComponentContext_, break_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/catch.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/catch.pyi new file mode 100644 index 000000000000..8a75e8badb11 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/catch.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class catch: + @staticmethod + def catch(ctx: com_sun_star_uno_XComponentContext_, catch: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/class.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/class.pyi new file mode 100644 index 000000000000..047194a633a4 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/class.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class class_: + @staticmethod + def class_(ctx: com_sun_star_uno_XComponentContext_, class_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/continue.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/continue.pyi new file mode 100644 index 000000000000..024ccd64b8fd --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/continue.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class continue_: + @staticmethod + def continue_(ctx: com_sun_star_uno_XComponentContext_, continue_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/do.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/do.pyi new file mode 100644 index 000000000000..f654d611dd21 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/do.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class do: + @staticmethod + def do(ctx: com_sun_star_uno_XComponentContext_, do: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/else.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/else.pyi new file mode 100644 index 000000000000..7f64ca1f0314 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/else.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class else_: + @staticmethod + def else_(ctx: com_sun_star_uno_XComponentContext_, else_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/extends.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/extends.pyi new file mode 100644 index 000000000000..a50b00dd6a4a --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/extends.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class extends: + @staticmethod + def extends(ctx: com_sun_star_uno_XComponentContext_, extends: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/final.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/final.pyi new file mode 100644 index 000000000000..c14e120427d9 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/final.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class final: + @staticmethod + def final(ctx: com_sun_star_uno_XComponentContext_, final: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/finally.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/finally.pyi new file mode 100644 index 000000000000..941bad551fe4 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/finally.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class finally_: + @staticmethod + def finally_(ctx: com_sun_star_uno_XComponentContext_, finally_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/for.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/for.pyi new file mode 100644 index 000000000000..6d15d5ab7ebc --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/for.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class for_: + @staticmethod + def for_(ctx: com_sun_star_uno_XComponentContext_, for_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/goto.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/goto.pyi new file mode 100644 index 000000000000..02869f1e849c --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/goto.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class goto: + @staticmethod + def goto(ctx: com_sun_star_uno_XComponentContext_, goto: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/if.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/if.pyi new file mode 100644 index 000000000000..be605e1b8cdf --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/if.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class if_: + @staticmethod + def if_(ctx: com_sun_star_uno_XComponentContext_, if_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/implements.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/implements.pyi new file mode 100644 index 000000000000..60509dbd4625 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/implements.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class implements: + @staticmethod + def implements(ctx: com_sun_star_uno_XComponentContext_, implements: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/import.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/import.pyi new file mode 100644 index 000000000000..4a71abb29222 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/import.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class import_: + @staticmethod + def import_(ctx: com_sun_star_uno_XComponentContext_, import_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/instanceof.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/instanceof.pyi new file mode 100644 index 000000000000..a4d14109ffe1 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/instanceof.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class instanceof: + @staticmethod + def instanceof(ctx: com_sun_star_uno_XComponentContext_, instanceof: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/int.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/int.pyi new file mode 100644 index 000000000000..6b8089236870 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/int.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class int: + @staticmethod + def int(ctx: com_sun_star_uno_XComponentContext_, int: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/native.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/native.pyi new file mode 100644 index 000000000000..bc072ccb46ff --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/native.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class native: + @staticmethod + def native(ctx: com_sun_star_uno_XComponentContext_, native: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/new.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/new.pyi new file mode 100644 index 000000000000..35126638b8e0 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/new.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class new: + @staticmethod + def new(ctx: com_sun_star_uno_XComponentContext_, new: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/package.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/package.pyi new file mode 100644 index 000000000000..3326f41715a2 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/package.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class package: + @staticmethod + def package(ctx: com_sun_star_uno_XComponentContext_, package: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/private.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/private.pyi new file mode 100644 index 000000000000..91185985768f --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/private.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class private: + @staticmethod + def private(ctx: com_sun_star_uno_XComponentContext_, private: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/protected.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/protected.pyi new file mode 100644 index 000000000000..644360a340ff --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/protected.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class protected: + @staticmethod + def protected(ctx: com_sun_star_uno_XComponentContext_, protected: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/public.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/public.pyi new file mode 100644 index 000000000000..a98e3fcea9b4 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/public.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class public: + @staticmethod + def public(ctx: com_sun_star_uno_XComponentContext_, public: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/return.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/return.pyi new file mode 100644 index 000000000000..616265e85354 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/return.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class return_: + @staticmethod + def return_(ctx: com_sun_star_uno_XComponentContext_, return_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/static.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/static.pyi new file mode 100644 index 000000000000..d1b56c39fa8a --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/static.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class static: + @staticmethod + def static(ctx: com_sun_star_uno_XComponentContext_, static: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/strictfp.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/strictfp.pyi new file mode 100644 index 000000000000..189f90be347d --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/strictfp.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class strictfp: + @staticmethod + def strictfp(ctx: com_sun_star_uno_XComponentContext_, strictfp: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/super.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/super.pyi new file mode 100644 index 000000000000..ec261362176d --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/super.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class super: + @staticmethod + def super(ctx: com_sun_star_uno_XComponentContext_, super: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/synchronized.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/synchronized.pyi new file mode 100644 index 000000000000..84e4a1e8955d --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/synchronized.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class synchronized: + @staticmethod + def synchronized(ctx: com_sun_star_uno_XComponentContext_, synchronized: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/this.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/this.pyi new file mode 100644 index 000000000000..eb582c23d4a6 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/this.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class this: + @staticmethod + def this(ctx: com_sun_star_uno_XComponentContext_, this: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/throw.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/throw.pyi new file mode 100644 index 000000000000..64c95bade778 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/throw.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class throw: + @staticmethod + def throw(ctx: com_sun_star_uno_XComponentContext_, throw: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/throws.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/throws.pyi new file mode 100644 index 000000000000..befbe79d8b64 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/throws.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class throws: + @staticmethod + def throws(ctx: com_sun_star_uno_XComponentContext_, throws: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/try.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/try.pyi new file mode 100644 index 000000000000..2a2d9d3097de --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/try.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class try_: + @staticmethod + def try_(ctx: com_sun_star_uno_XComponentContext_, try_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/volatile.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/volatile.pyi new file mode 100644 index 000000000000..4f9e8d29ab0a --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/volatile.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class volatile: + @staticmethod + def volatile(ctx: com_sun_star_uno_XComponentContext_, volatile: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/while.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/while.pyi new file mode 100644 index 000000000000..27ce41a48608 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/while.pyi @@ -0,0 +1,11 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ + +class while_: + @staticmethod + def while_(ctx: com_sun_star_uno_XComponentContext_, while_: int) -> com_sun_star_uno_XInterface_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/static.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/static.pyi new file mode 100644 index 000000000000..0cf425e64d19 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/static.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class static: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/strictfp.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/strictfp.pyi new file mode 100644 index 000000000000..986b2aa8e1f1 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/strictfp.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class strictfp: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/super.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/super.pyi new file mode 100644 index 000000000000..c868d941429f --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/super.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class super: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/synchronized.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/synchronized.pyi new file mode 100644 index 000000000000..9dce69dde495 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/synchronized.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class synchronized: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/this.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/this.pyi new file mode 100644 index 000000000000..f2a112c1bf4c --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/this.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class this: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/throw.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/throw.pyi new file mode 100644 index 000000000000..09fb32465cb1 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/throw.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class throw: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/throws.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/throws.pyi new file mode 100644 index 000000000000..0a8160c70e66 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/throws.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class throws: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/try.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/try.pyi new file mode 100644 index 000000000000..bdac04320119 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/try.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class try_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/volatile.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/volatile.pyi new file mode 100644 index 000000000000..b36f0f44e0f0 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/volatile.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class volatile: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/while.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/while.pyi new file mode 100644 index 000000000000..732257ee56a2 --- /dev/null +++ b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/while.pyi @@ -0,0 +1,14 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ + +class while_: + @staticmethod + def get(ctx: com_sun_star_uno_XComponentContext_) -> com_sun_star_uno_XNamingService_: + """Raises: + com_sun_star_uno_DeploymentException_ + """ + ... diff --git a/codemaker/tests/pythonmaker/idl/pythontypes.idl b/codemaker/tests/pythonmaker/idl/pythontypes.idl new file mode 100644 index 000000000000..93738d1fb63d --- /dev/null +++ b/codemaker/tests/pythonmaker/idl/pythontypes.idl @@ -0,0 +1,455 @@ + +module test +{ + module codemaker + { + module pythonmaker + { + // --- ENUMS --- + // Simple enum with negative and positive values + published enum Enum1 { VALUE_NEG = -1, VALUE_ZERO = 0, VALUE_POS = 1 }; + // Bit-flag enum for testing combined values + published enum Enum2 { + FLAG_NONE = 0, + FLAG_READ = 1, + FLAG_WRITE = 2, + FLAG_EXEC = 4, + FLAG_ALL = FLAG_READ | FLAG_WRITE | FLAG_EXEC + }; + // Enum with explicit large values and gaps + published enum Enum3 { FIRST = 10, SECOND = 20, THIRD = 100, FOURTH = 0xFF }; + // Enum without explicit values (auto-increment) + published enum Enum4 { AUTO_A, AUTO_B, AUTO_C }; + // --- CONSTANT GROUPS --- + /** Constants covering all scalar base types */ + published constants TestConstantsBasic + { + // Signed 16-bit + const short SHORT_MIN = -32768; + const short SHORT_MAX = 32767; + // Unsigned 16-bit + const unsigned short USHORT_MAX = 65535; + // Signed 32-bit + const long LONG_MIN = -2147483648; + const long LONG_MAX = 2147483647; + // Hex literal with L suffix + const long LONG_HEX = 0x7FFFFFFFL; + // Unsigned 32-bit + const unsigned long ULONG_MAX = 4294967295L; + // Signed 64-bit + const hyper HYPER_MIN = -9223372036854775808; + const hyper HYPER_MAX = 9223372036854775807; + // Boolean constants + const boolean BOOL_TRUE = TRUE; + const boolean BOOL_FALSE = FALSE; + }; + // Simple Struct which will be used as a typedef type + struct Struct1 + { + long member1; + }; + // PolyStruct with if and else which are keywords in most languages + // It is here to check now the maker tools handles the keywords as variables + struct PolyStruct + { + if + member1; + long member2; + }; + // --- TYPEDEF GROUPS --- + /**Comprehensive set of typedef declarations covering: + - Primitive UNO data types along with their corresponding sequence (array) types + - Type aliases for interfaces and structures + - Inheritance scenarios demonstrating type references from both the current and external modules + */ + typedef boolean Boolean; + typedef byte Byte; + typedef short Short; + typedef unsigned short UnsignedShort; + typedef long Long; + typedef unsigned long UnsignedLong; + typedef hyper Hyper; + typedef unsigned hyper UnsignedHyper; + typedef float Float; + typedef double Double; + typedef char Char; + typedef string String; + typedef type Type; + typedef any Any; + typedef Enum2 Enum; + typedef Struct1 Struct; + typedef com::sun::star::uno::XInterface XInterface; + typedef com::sun::star::uno::XNamingService XNamingService; + typedef sequence SequenceBoolean; + typedef sequence SequenceByte; + typedef sequence SequenceShort; + typedef sequence SequenceUnsignedShort; + typedef sequence SequenceLong; + typedef sequence SequenceUnsignedLong; + typedef sequence SequenceHyper; + typedef sequence SequenceUnsignedHyper; + typedef sequence SequenceFloat; + typedef sequence SequenceDouble; + typedef sequence SequenceChar; + typedef sequence SequenceString; + typedef sequence SequenceType; + typedef sequence SequenceAny; + typedef sequence SequenceEnum; + typedef sequence SequenceStruct; + typedef sequence SequenceXInterface; + typedef sequence SequenceXNamingService; + // --- STRUCT GROUPS --- + /** Struct2 is a comprehensive structure used to demonstrate the full range of supported UNO IDL data types. + It includes: + - Primitive types + - Custom typedefs + - Interface and struct references (from same and external modules) + - Single and nested sequences (1D and 2D arrays) + - Sequences of typedefs (alias-based sequences) */ + struct Struct2 + { + // --- Primitive Types --- + boolean p1; + byte p2; + short p3; + unsigned short p4; + long p5; + unsigned long p6; + hyper p7; + unsigned hyper p8; + float p9; + double p10; + char p11; + string p12; + type p13; + any p14; + // --- User-Defined Types (from same or external modules) --- + Enum2 p15; + Struct1 p16; + com::sun::star::uno::XInterface p17; + com::sun::star::uno::XNamingService p18; + // --- Typedef Variants of Above Tyeps --- + Boolean t1; + Byte t2; + Short t3; + UnsignedShort t4; + Long t5; + UnsignedLong t6; + Hyper t7; + UnsignedHyper t8; + Float t9; + Double t10; + Char t11; + String t12; + Type t13; + Any t14; + Enum t15; + Struct t16; + XInterface t17; + XNamingService t18; + // --- Sequences of Primitive and Custom Types --- + sequence a1; + sequence a2; + sequence a3; + sequence a4; + sequence a5; + sequence a6; + sequence a7; + sequence a8; + sequence a9; + sequence a10; + sequence a11; + sequence a12; + sequence a13; + sequence a14; + sequence a15; + sequence a16; + sequence a17; + sequence a18; + // --- Nested Sequences (2D Arrays) --- + sequence< sequence< boolean > > aa1; + sequence< sequence< byte > > aa2; + sequence< sequence< short > > aa3; + sequence< sequence< unsigned short > > aa4; + sequence< sequence< long > > aa5; + sequence< sequence< unsigned long > > aa6; + sequence< sequence< hyper > > aa7; + sequence< sequence< unsigned hyper> > aa8; + sequence< sequence< float > > aa9; + sequence< sequence< double > > aa10; + sequence< sequence< char > > aa11; + sequence< sequence< string > > aa12; + sequence< sequence< type > > aa13; + sequence< sequence< any > > aa14; + sequence< sequence< Enum2 > > aa15; + sequence< sequence< Struct1 > > aa16; + sequence< sequence< com::sun::star::uno::XInterface > > aa17; + sequence< sequence< com::sun::star::uno::XNamingService > > aa18; + // --- Sequence of Typedefs --- + sequence at1; + sequence at2; + sequence at3; + sequence at4; + sequence at5; + sequence at6; + sequence at7; + sequence at8; + sequence at9; + sequence at10; + sequence at11; + sequence at12; + sequence at13; + sequence at14; + sequence at15; + sequence at16; + sequence at17; + sequence at18; + }; + module exceptions + { + // Test case 1: An exception with custom members + exception MyBaseError : com::sun::star::uno::Exception + { + long ErrorCode; + string Details; + }; + // Test case 2: An exception with no custom members + exception SimpleError : com::sun::star::uno::Exception{}; + }; + interface XTest + { + boolean test(); + [ attribute, bound ] long A1; + [ attribute, bound, readonly ] long A2; + [attribute] long A3 { + get raises(com::sun::star::uno::Exception, + com::sun::star::lang::ClassNotFoundException); + set raises(com::sun::star::uno::RuntimeException); + }; + [attribute, readonly] long A4 { + get raises(com::sun::star::uno::DeploymentException); + }; + }; + service S1 : test::codemaker::pythonmaker::XTest + { + create1(); + create2([in] any... create2) raises(com::sun::star::uno::RuntimeException, + com::sun::star::lang::ClassNotFoundException, + com::sun::star::uno::Exception, + com::sun::star::lang::IllegalAccessException, + com::sun::star::uno::DeploymentException); + create3([in] sequence S1) raises(com::sun::star::uno::RuntimeException, + com::sun::star::lang::ClassNotFoundException, + com::sun::star::lang::IllegalAccessException, + com::sun::star::uno::DeploymentException); + create4([in] long javamaker, [in] long S1, [in] long create4); + create5( + [in] boolean p1, [in] byte p2, [in] short p3, [in] unsigned short p4, + [in] long p5, [in] unsigned long p6, [in] hyper p7, [in] unsigned hyper p8, + [in] float p9, [in] double p10, [in] char p11, [in] string p12, [in] type p13, + [in] any p14, [in] Enum2 p15, [in] Struct1 p16, + [in] com::sun::star::uno::XInterface p17, + [in] com::sun::star::uno::XNamingService p18, [in] Boolean t1, [in] Byte t2, + [in] Short t3, [in] UnsignedShort t4, [in] Long t5, [in] UnsignedLong t6, + [in] Hyper t7, [in] UnsignedHyper t8, [in] Float t9, [in] Double t10, + [in] Char t11, [in] String t12, [in] Type t13, [in] Any t14, [in] Enum t15, + [in] Struct t16, [in] XInterface t17, [in] XNamingService t18, + [in] sequence a1, [in] sequence a2, [in] sequence a3, + [in] sequence a4, [in] sequence a5, + [in] sequence a6, [in] sequence a7, + [in] sequence a8, [in] sequence a9, + [in] sequence a10, [in] sequence a11, [in] sequence a12, + [in] sequence a13, [in] sequence a14, [in] sequence a15, + [in] sequence a16, [in] sequence a17, + [in] sequence a18, + [in] sequence > aa1, [in] sequence< sequence< byte > > aa2, + [in] sequence< sequence< short > > aa3, [in] sequence< sequence< unsigned short > > aa4, + [in] sequence< sequence< long > > aa5, [in] sequence< sequence < unsigned long> > aa6, + [in] sequence< sequence< hyper > > aa7, [in] sequence< sequence< unsigned hyper > > aa8, + [in] sequence< sequence< float > > aa9, [in] sequence< sequence< double > > aa10, + [in] sequence< sequence< char > > aa11, [in] sequence< sequence< string > > aa12, + [in] sequence< sequence < type > > aa13, [in] sequence < sequence < any > > aa14, + [in] sequence< sequence < Enum2 > > aa15, [in] sequence< sequence < Struct1 > > aa16, + [in] sequence< sequence< com::sun::star::uno::XInterface > > aa17, + [in] sequence< sequence< com::sun::star::uno::XNamingService > > aa18, + [in] sequence at1, [in] sequence at2, + [in] sequence at3, [in] sequence at4, + [in] sequence at5, [in] sequence at6, + [in] sequence at7, [in] sequence at8, + [in] sequence at9, [in] sequence at10, + [in] sequence at11, [in] sequence at12, + [in] sequence at13, [in] sequence at14, + [in] sequence at15, [in] sequence at16, + [in] sequence at17, + [in] sequence at18); + }; + service S2 : XTest; + service S3 { interface XTest; }; + service Service : com::sun::star::uno::XInterface { create([in] any... args); }; + interface XIfc + { + void f1([in] PolyStruct arg); + void f2([in] PolyStruct arg); + }; + module services + { + service abstract : com::sun::star::uno::XInterface + { + abstract([in] long abstract); + }; + service assert : com::sun::star::uno::XInterface { assert([in] long assert); }; + //TODO: boolean + service break : com::sun::star::uno::XInterface { break([in] long break); }; + //TODO: byte + //TODO: case + service catch : com::sun::star::uno::XInterface { catch ([in] long catch); }; + //TODO: char + service class : com::sun::star::uno::XInterface + { + class([in] long class); + }; + //TODO: const + service continue : com::sun::star::uno::XInterface + { + continue([in] long continue); + }; + //TODO: default + service do : com::sun::star::uno::XInterface + { + do + ([in] long do); + }; + //TODO: double + service else : com::sun::star::uno::XInterface { else([in] long else); }; + //TODO: enum + service extends : com::sun::star::uno::XInterface { extends([in] long extends); }; + service final : com::sun::star::uno::XInterface { final([in] long final); }; + service finally : com::sun::star::uno::XInterface { finally([in] long finally); }; + //TODO: float + service for: com::sun::star::uno::XInterface + { for([in] long for) + ; + }; + service goto : com::sun::star::uno::XInterface { goto([in] long goto); }; + service if : com::sun::star::uno::XInterface + { + if ([in] long if) + ; + }; + service implements : com::sun::star::uno::XInterface + { + implements([in] long implements); + }; + service import : com::sun::star::uno::XInterface { import([in] long import); }; + service instanceof : com::sun::star::uno::XInterface + { + instanceof ([in] long instanceof); + }; + service int : com::sun::star::uno::XInterface { int([in] long int); }; + //TODO: interface + //TODO: long + service native : com::sun::star::uno::XInterface { native([in] long native); }; + service new : com::sun::star::uno::XInterface { new ([in] long new); }; + service package : com::sun::star::uno::XInterface { package([in] long package); }; + service private : com::sun::star::uno::XInterface + { + private + ([in] long private); + }; + service protected : com::sun::star::uno::XInterface + { + protected + ([in] long protected); + }; + service public : com::sun::star::uno::XInterface + { + public + ([in] long public); + }; + service return : com::sun::star::uno::XInterface { return ([in] long return ); }; + //TODO: short + service static : com::sun::star::uno::XInterface { static([in] long static); }; + service strictfp : com::sun::star::uno::XInterface + { + strictfp([in] long strictfp); + }; + service super : com::sun::star::uno::XInterface { super([in] long super); }; + //TODO: switch + service synchronized : com::sun::star::uno::XInterface + { + synchronized([in] long synchronized); + }; + service this : com::sun::star::uno::XInterface { this([in] long this); }; + service throw : com::sun::star::uno::XInterface { throw([in] long throw); }; + service throws : com::sun::star::uno::XInterface { throws([in] long throws); }; + //TODO: transient + service try : com + ::sun::star::uno::XInterface + { + try + ([in] long try); + }; + //TODO: void + service volatile : com::sun::star::uno::XInterface + { + volatile([in] long volatile); + }; + service while : com::sun::star::uno::XInterface + { + while ([in] long while) + ; + }; + }; + singleton S4 : XTest; + singleton abstract : com::sun::star::uno::XNamingService; + singleton assert : com::sun::star::uno::XNamingService; + //TODO: singleton boolean: com::sun::star::uno::XNamingService; + singleton break : com::sun::star::uno::XNamingService; + //TODO: singleton byte: com::sun::star::uno::XNamingService; + //TODO: singleton case: com::sun::star::uno::XNamingService; + singleton catch : com::sun::star::uno::XNamingService; + //TODO: singleton char: com::sun::star::uno::XNamingService; + singleton class : com::sun::star::uno::XNamingService; + //TODO: singleton const: com::sun::star::uno::XNamingService; + singleton continue : com::sun::star::uno::XNamingService; + //TODO: singleton default: com::sun::star::uno::XNamingService; + singleton do : com::sun::star::uno::XNamingService; + //TODO: singleton double: com::sun::star::uno::XNamingService; + singleton else : com::sun::star::uno::XNamingService; + //TODO: singleton enum: com::sun::star::uno::XNamingService; + singleton extends : com::sun::star::uno::XNamingService; + singleton final : com::sun::star::uno::XNamingService; + singleton finally : com::sun::star::uno::XNamingService; + //TODO: singleton float: com::sun::star::uno::XNamingService; + singleton for: com::sun::star::uno::XNamingService; + singleton goto : com::sun::star::uno::XNamingService; + singleton if : com::sun::star::uno::XNamingService; + singleton implements : com::sun::star::uno::XNamingService; + singleton import : com::sun::star::uno::XNamingService; + singleton instanceof : com::sun::star::uno::XNamingService; + singleton int : com::sun::star::uno::XNamingService; + //TODO: singleton interface: com::sun::star::uno::XNamingService; + //TODO: singleton long: com::sun::star::uno::XNamingService; + singleton native : com::sun::star::uno::XNamingService; + singleton new : com::sun::star::uno::XNamingService; + singleton package : com::sun::star::uno::XNamingService; + singleton private : com::sun::star::uno::XNamingService; + singleton protected : com::sun::star::uno::XNamingService; + singleton public : com::sun::star::uno::XNamingService; + singleton return : com::sun::star::uno::XNamingService; + //TODO: singleton short: com::sun::star::uno::XNamingService; + singleton static : com::sun::star::uno::XNamingService; + singleton strictfp : com::sun::star::uno::XNamingService; + singleton super : com::sun::star::uno::XNamingService; + //TODO: singleton switch: com::sun::star::uno::XNamingService; + singleton synchronized : com::sun::star::uno::XNamingService; + singleton this : com::sun::star::uno::XNamingService; + singleton throw : com::sun::star::uno::XNamingService; + singleton throws : com::sun::star::uno::XNamingService; + //TODO: singleton transient: com::sun::star::uno::XNamingService; + singleton try : com + ::sun::star::uno::XNamingService; + //TODO: singleton void: com::sun::star::uno::XNamingService; + singleton volatile : com::sun::star::uno::XNamingService; + singleton while : com::sun::star::uno::XNamingService; + };};}; \ No newline at end of file diff --git a/codemaker/tests/pythonmaker/test_pythonmaker.py b/codemaker/tests/pythonmaker/test_pythonmaker.py new file mode 100644 index 000000000000..e455cef2d224 --- /dev/null +++ b/codemaker/tests/pythonmaker/test_pythonmaker.py @@ -0,0 +1,246 @@ +#! /usr/bin/env python +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +import unittest +import os +import subprocess +import shutil +import filecmp +import glob +import sys + +from typing import Optional, List, Set + + +class TestPythonMaker(unittest.TestCase): + """Test pythonmaker tool by comparing generated stubs with expected files""" + + def setUp(self) -> None: + # Build environment + self.srcdir: str = os.environ.get("SRCDIR", os.getcwd()) + self.builddir: str = os.environ.get("BUILDDIR", os.getcwd()) + self.instdir: str = os.environ.get( + "INSTDIR", os.path.join(self.builddir, "instdir") + ) + self.workdir: str = os.environ.get( + "WORKDIR", os.path.join(self.builddir, "workdir") + ) + + # SDK tools + self.unoidl_write: Optional[str] = None + self.pythonmaker: Optional[str] = None + + sdk_patterns: List[str] = [ + os.path.join(self.instdir, "sdk", "bin"), + os.path.join(self.instdir, "LibreOffice*_SDK", "bin"), + ] + + exe_suffix: str = ".exe" if os.name == "nt" else "" + + for pattern in sdk_patterns: + for sdk_dir in glob.glob(pattern): + unoidl_path = os.path.join(sdk_dir, "unoidl-write" + exe_suffix) + pythonmaker_path = os.path.join(sdk_dir, "pythonmaker" + exe_suffix) + + if os.path.exists(unoidl_path) and os.path.exists(pythonmaker_path): + self.unoidl_write = unoidl_path + self.pythonmaker = pythonmaker_path + break + + if self.unoidl_write and self.pythonmaker: + break + + # Program directory + self.program_dir: Optional[str] + + if sys.platform == "darwin": + self.program_dir = None + app_patterns: List[str] = [ + os.path.join( + self.instdir, + "LibreOfficeDev.app", + "Contents", + "Resources", + ), + os.path.join( + self.instdir, + "LibreOffice.app", + "Contents", + "Resources", + ), + ] + for pattern in app_patterns: + if os.path.exists(pattern): + self.program_dir = pattern + break + else: + self.program_dir = os.path.join(self.instdir, "program") + + # Test paths + self.golden_dir: str = os.path.join( + self.srcdir, + "codemaker", + "tests", + "pythonmaker", + "expected_pyi_stubs", + ) + + self.idl_file: str = os.path.join( + self.srcdir, + "codemaker", + "tests", + "pythonmaker", + "idl", + "pythontypes.idl", + ) + + self.test_workdir: str = os.path.join(self.workdir, "pythonmaker_test") + os.makedirs(self.test_workdir, exist_ok=True) + + self.types_rdb: str = os.path.join( + self.workdir, "UnoApiTarget", "udkapi.rdb" + ) + + self.temp_rdb: str = os.path.join(self.test_workdir, "temptest.rdb") + self.output_dir: str = os.path.join(self.test_workdir, "generated_stubs") + + def tearDown(self) -> None: + if os.path.exists(self.test_workdir): + shutil.rmtree(self.test_workdir, ignore_errors=True) + + def test_pythonmaker_golden_comparison(self) -> None: + self.assertIsNotNone(self.unoidl_write) + self.assertIsNotNone(self.pythonmaker) + self.assertIsNotNone(self.program_dir) + + assert self.unoidl_write is not None + assert self.pythonmaker is not None + + self.assertTrue(os.path.exists(self.unoidl_write)) + self.assertTrue(os.path.exists(self.pythonmaker)) + self.assertTrue(os.path.exists(self.types_rdb)) + + self._convert_idl_to_rdb() + self._generate_python_stubs() + self._compare_with_expected_files() + + def _convert_idl_to_rdb(self) -> None: + assert self.unoidl_write is not None + + cmd: List[str] = [ + self.unoidl_write, + self.types_rdb, + self.idl_file, + self.temp_rdb, + ] + + try: + subprocess.run( + cmd, + cwd=self.test_workdir, + capture_output=True, + text=True, + check=True, + ) + self.assertTrue(os.path.exists(self.temp_rdb)) + except subprocess.CalledProcessError as e: + self.fail( + "Failed to convert IDL to RDB:\n" + + (e.stderr or "") + + "\nCommand: " + + " ".join(cmd) + ) + + def _generate_python_stubs(self) -> None: + assert self.pythonmaker is not None + + os.makedirs(self.output_dir, exist_ok=True) + + cmd: List[str] = [ + self.pythonmaker, + "-O", + self.output_dir, + self.temp_rdb, + "-X", + self.types_rdb, + ] + + try: + subprocess.run( + cmd, + cwd=self.test_workdir, + capture_output=True, + text=True, + check=True, + ) + + generated_files: List[str] = [] + for _, _, files in os.walk(self.output_dir): + for name in files: + if not name.lower().endswith(".tmp"): + generated_files.append(name) + + self.assertGreater(len(generated_files), 0) + + except subprocess.CalledProcessError as e: + self.fail( + "Failed to generate Python stubs:\n" + + (e.stderr or "") + + "\nCommand: " + + " ".join(cmd) + ) + + def _compare_with_expected_files(self) -> None: + if not os.path.exists(self.golden_dir): + self.fail("Expected directory does not exist: " + self.golden_dir) + + expected_files: List[str] = [] + for root, _, files in os.walk(self.golden_dir): + for name in files: + expected_files.append( + os.path.relpath(os.path.join(root, name), self.golden_dir) + ) + + generated_files: List[str] = [] + for root, _, files in os.walk(self.output_dir): + for name in files: + if not name.lower().endswith(".tmp"): + generated_files.append( + os.path.relpath(os.path.join(root, name), self.output_dir) + ) + + expected_set: Set[str] = set(expected_files) + generated_set: Set[str] = set(generated_files) + + missing = expected_set - generated_set + extra = generated_set - expected_set + + if missing: + self.fail("Missing generated files: " + str(missing)) + if extra: + self.fail("Unexpected generated files: " + str(extra)) + + differences: List[str] = [] + for rel_path in expected_files: + if not filecmp.cmp( + os.path.join(self.golden_dir, rel_path), + os.path.join(self.output_dir, rel_path), + shallow=False, + ): + differences.append(rel_path) + + if differences: + self.fail("File content differences found in: " + str(differences)) + + +if __name__ == "__main__": + unittest.main() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file