-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Type stub for win32com.server
#14492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
32c194b
Add missing win32com packages
qwertycxz a4ffe5e
Use `from typing_extensions import Unpack` instead
qwertycxz 5f6c008
Fix stub style
qwertycxz 80a9ca1
fix allow list
qwertycxz e9c036b
fix some stub error
qwertycxz 4b911b9
Use `Unused` instead of `Any`
qwertycxz 1c3c488
Mark `PythonCOMServer` as const
qwertycxz 194728c
Merge branch 'main' into main
qwertycxz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from _typeshed import Unused | ||
from collections.abc import Iterable | ||
|
||
from _win32typing import PyIClassFactory, PyIID | ||
|
||
def RegisterClassFactories( | ||
clsids: Iterable[PyIID], flags: int | None = None, clsctx: int | None = None | ||
) -> list[tuple[PyIClassFactory, int]]: ... | ||
def RevokeClassFactories(infos: Iterable[tuple[Unused, int]]) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from collections.abc import Iterable | ||
from typing import Final | ||
|
||
from _win32typing import PyIID | ||
|
||
usage: Final[str] | ||
|
||
def serve(clsids: Iterable[PyIID]) -> None: ... | ||
def main() -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
from collections.abc import Callable, Iterable, Mapping | ||
from typing import Final, Literal, Protocol, TypedDict, TypeVar, type_check_only | ||
from typing_extensions import Unpack | ||
|
||
from _win32typing import PyHKEY, PyIID | ||
|
||
_T = TypeVar("_T", PyHKEY, int) | ||
|
||
@type_check_only | ||
class _RegisterClass(Protocol): | ||
_reg_clsid_: PyIID | ||
|
||
@type_check_only | ||
class _RegisterFlag(TypedDict, total=False): | ||
quiet: bool | ||
debug: bool | ||
finalize_register: Callable[[], None] | ||
|
||
@type_check_only | ||
class _UnregisterFlag(TypedDict, total=False): | ||
quiet: bool | ||
finalize_unregister: Callable[[], None] | ||
|
||
@type_check_only | ||
class _ElevatedFlag(TypedDict, total=False): | ||
quiet: bool | ||
unattended: bool | ||
hwnd: int | ||
|
||
@type_check_only | ||
class _CommandFlag(_RegisterFlag, _UnregisterFlag, _ElevatedFlag): # type: ignore[misc] | ||
... | ||
|
||
CATID_PythonCOMServer: Final = "{B3EF80D0-68E2-11D0-A689-00C04FD658FF}" | ||
|
||
def recurse_delete_key(path: str | None, base: PyHKEY | int = -2147483648) -> None: ... | ||
def RegisterServer( | ||
clsid: PyIID, | ||
pythonInstString: str | None = None, | ||
desc: str | None = None, | ||
progID: str | None = None, | ||
verProgID: str | None = None, | ||
defIcon: str | None = None, | ||
threadingModel: Literal["apartment", "both", "free", "neutral"] = "both", | ||
policy: str | None = None, | ||
catids: list[PyIID] = [], | ||
other: Mapping[str, str] = {}, | ||
addPyComCat: bool | None = None, | ||
dispatcher: str | None = None, | ||
clsctx: int | None = None, | ||
addnPath: str | None = None, | ||
) -> None: ... | ||
def GetUnregisterServerKeys( | ||
clsid: PyIID, progID: str | None = None, verProgID: str | None = None, customKeys: Iterable[tuple[str, _T]] | None = None | ||
) -> list[tuple[str, _T | int]]: ... | ||
def UnregisterServer( | ||
clsid: PyIID, | ||
progID: str | None = None, | ||
verProgID: str | None = None, | ||
customKeys: Iterable[tuple[str, PyHKEY | int]] | None = None, | ||
) -> None: ... | ||
qwertycxz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
def GetRegisteredServerOption(clsid: PyIID, optionName: str) -> str | None: ... | ||
def RegisterClasses(*classes: type[_RegisterClass], **flags: Unpack[_RegisterFlag]) -> None: ... | ||
def UnregisterClasses(*classes: type[_RegisterClass], **flags: Unpack[_UnregisterFlag]) -> None: ... | ||
def UnregisterInfoClasses(*classes: type[_RegisterClass]) -> list[tuple[str, PyHKEY | int]]: ... | ||
def ReExecuteElevated(flags: _ElevatedFlag) -> None: ... | ||
def UseCommandLine(*classes: type[_RegisterClass], **flags: Unpack[_CommandFlag]) -> list[tuple[str, PyHKEY | int]] | None: ... | ||
def RegisterPyComCategory() -> None: ... |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.