Commit 0881adb
committed
fix: address Copilot review feedback on public type aliases
- Parameterize os.PathLike as os.PathLike[str] in FilePath so
type checkers get precise element-type info instead of the bare
generic form (Copilot review, types.py:7).
- Add @runtime_checkable to IDPAttributes and IDPProperty so that
isinstance() checks against the re-exported public Protocol types
do not raise TypeError. These Protocols are exported from the
package root; making them runtime-checkable is required for them
to be safe to use as documented public types.
- Widen FileObject from `io.BufferedReader | io.BytesIO` to the more
idiomatic `typing.BinaryIO`. FileObject is not used as a parameter
or return annotation anywhere in the codebase (only re-exported via
__init__ / PathOrFile), so the widening is source-compatible for
in-repo callers. Public consumers passing a wider binary-file-like
object now type-check cleanly.
Skipped items: none.1 parent 8e882a5 commit 0881adb
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
0 commit comments