Commit f62fbc0
authored
Modernize
* refactor: Fix linting issues in `comtypes/git.py` and remove lint ignores.
- Replace wildcard `ctypes` import with explicit `POINTER` import.
- Remove unused `COMMETHOD` import.
- Remove `comtypes/git.py` from `per-file-ignores` in `pyproject.toml`.
* refactor: Remove redundant `if __name__ == "__main__":` block from `comtypes/git.py`.
The manual test code in the main block is no longer needed as the functionality
is covered by other tests or was intended only for local verification.
* fix: Add type ignores to `IGlobalInterfaceTable` methods.
Add `# type: ignore` to `RegisterInterfaceInGlobal`, `GetInterfaceFromGlobal`,
and `RevokeInterfaceFromGlobal` in `IGlobalInterfaceTable` to suppress type
checking errors for generated `__com_*` methods.
* refactor: Add type hints to `IGlobalInterfaceTable` methods.
- Use `TypeVar` `_T_IUnknown` to define generic interface types.
- Add type hints to `RegisterInterfaceInGlobal`, `GetInterfaceFromGlobal`,
and `RevokeInterfaceFromGlobal`.
- Update method signatures to use `_T_IUnknown` for improved type safety.IGlobalInterfaceTable with type hints. (#941)1 parent 74300b2 commit f62fbc0
2 files changed
Lines changed: 15 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | | - | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | | - | |
45 | | - | |
| 50 | + | |
| 51 | + | |
46 | 52 | | |
47 | | - | |
48 | | - | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| |||
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
0 commit comments