Remove PyQualifier and ConstPyQualifier classes#304
Remove PyQualifier and ConstPyQualifier classes#304tomaskontrimas wants to merge 1 commit intomasterfrom
PyQualifier and ConstPyQualifier classes#304Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the unused PyQualifier / ConstPyQualifier mechanism from skyllh.core.py, simplifying runtime typing/inspection utilities and aligning the test suite with the reduced API surface.
Changes:
- Removed
PyQualifier,ConstPyQualifier, and theconstinstance fromskyllh/core/py.py. - Simplified
issequenceofby dropping qualifier-filtering support and reducing it to a pureisinstancesequence check. - Updated
tests/core/test_py.pyby removing qualifier-related tests and imports.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
skyllh/core/py.py |
Deletes qualifier classes and simplifies issequenceof implementation/signature accordingly. |
tests/core/test_py.py |
Removes tests/imports that exercised the deleted qualifier behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def issequenceof(obj, T): | ||
| """Checks if the given object ``obj`` is a sequence with items being | ||
| instances of type ``T``, possibly qualified with the given Python | ||
| qualifiers. | ||
| instances of type ``T``. |
There was a problem hiding this comment.
Removing the optional pyqualifiers parameter from issequenceof is a backwards-incompatible public API change (callers passing the 3rd argument will now get a TypeError). If this function is part of the supported API, consider keeping the parameter (e.g., pyqualifiers=None or *pyqualifiers) for compatibility and either ignoring it or raising a clear error when non-None is provided, with a deprecation path if desired.
2df0ad0 to
f69777b
Compare
Introduced in 8a64418 but never used in the package. Removing them as they would make typing and inheritance inspection even more difficult.