MNT: Update type hints to modern Python 3.10+ syntax#511
Conversation
Agent-Logs-Url: https://github.com/skops-dev/skops/sessions/6f0f4f08-6cde-47f1-81e0-33fd192d422e Co-authored-by: adrinjalali <1663864+adrinjalali@users.noreply.github.com>
|
@copilot CI is failing, please try to fix. |
Agent-Logs-Url: https://github.com/skops-dev/skops/sessions/b34daa0d-bc42-4654-b1c4-f2e0ee6d5d85 Co-authored-by: adrinjalali <1663864+adrinjalali@users.noreply.github.com>
Fixed in 0ad3c09. The pre-commit |
|
@copilot please fix CI issues, until they're fixed. |
…pixi.lock Agent-Logs-Url: https://github.com/skops-dev/skops/sessions/563cf84e-e5a0-4b90-884c-d94804b31bb9 Co-authored-by: adrinjalali <1663864+adrinjalali@users.noreply.github.com>
Fixed in a141218. Three issues were causing CI failures:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot CI still fails. |
…ction Agent-Logs-Url: https://github.com/skops-dev/skops/sessions/a2d564ab-8480-4cf3-a437-c6f9b8146f08 Co-authored-by: adrinjalali <1663864+adrinjalali@users.noreply.github.com>
Fixed in f60698b. The remaining failure was a mypy error in |
Completes the modernization of type hints started in #426, replacing legacy
typingmodule constructs with built-in equivalents throughout the codebase.Changes
Optional[X]→X | Noneacross all filesUnion[X, Y]→X | Ywhere applicableList[X]→list[X],Dict[K, V]→dict[K, V],Sequence[X]→list[X]typing(Optional,List,Sequence,Union,Dict) in 14 files_visualize.pywheretrustedwas annotated as[str] | None(bare list literal) instead oflist[str] | NoneType distinction in
trustedparameterNodes in
_general.py/_audit.pythat internally pass type objects (e.g.dict,list,set) to_get_trusteduselist[str | type[Any]] | None, while nodes in_numpy.py,_sklearn.py, etc. that only deal with string type names uselist[str] | None.Before / After