We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, refinement type annotations do not support additional annotations, e.g. annotating a non-empty list with a ValueRange:
ValueRange
from refined import NonEmpty from some_module import ValueRange from typing import List not_valid = NonEmpty[List[str], ValueRange(0, 10)] not_valid_neither = NonEmpty[List[str]](extra_annotations=[ValueRange(0, 10)])
However, as explained in the PEP 593, Nested Annotated types are flattened, with metadata ordered starting with the innermost annotation:
from refined import NonEmpty from some_module import ValueRange from typing import List valid = Annotated[NonEmpty[List[str]], ValueRange(0, 10)]
So it should be also OK if we do not support this.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently, refinement type annotations do not support additional annotations, e.g. annotating a non-empty list with a
ValueRange
:However, as explained in the PEP 593, Nested Annotated types are flattened, with metadata ordered starting with the innermost annotation:
So it should be also OK if we do not support this.
The text was updated successfully, but these errors were encountered: