Skip to content
New issue

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

fix(typing): Add missing float to IntoExpression alias #3611

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

dangotbanned
Copy link
Member

Discovered during #3600

21d13e7

Will fix these false positives

cmd [3] | mypy altair tests
tests\vegalite\v5\test_api.py:602: error: Argument 2 to "if_" of "expr" has incompatible type "int"; expected "bool | str | OperatorMixin | dict[str, Any] | None"  [arg-type]
        expected = alt.expr.if_(alt.datum.b >= 0, 10, -20)
                                                  ^~
tests\vegalite\v5\test_api.py:602: error: Argument 3 to "if_" of "expr" has incompatible type "int"; expected "bool | str | OperatorMixin | dict[str, Any] | None"  [arg-type]
        expected = alt.expr.if_(alt.datum.b >= 0, 10, -20)
                                                      ^~~
tests\examples_arguments_syntax\one_dot_per_zipcode.py:14: error: Argument 2 to "substring" of "expr" has incompatible type "int"; expected "bool | str | OperatorMixin | dict[str, Any] | None"  [arg-type]
        "leading digit", alt.expr.substring(alt.datum.zip_code, 0, 1)
                                                                ^
tests\examples_arguments_syntax\one_dot_per_zipcode.py:14: error: Argument 3 to "substring" of "expr" has incompatible type "int"; expected "bool | str | OperatorMixin | dict[str, Any] | None"  [arg-type]
        "leading digit", alt.expr.substring(alt.datum.zip_code, 0, 1)
                                                                   ^
Found 4 errors in 2 files (checked 374 source files)

@dangotbanned dangotbanned marked this pull request as ready for review September 25, 2024 10:43
@dangotbanned dangotbanned enabled auto-merge (squash) September 25, 2024 10:46
@dangotbanned dangotbanned merged commit 02e8c34 into main Sep 25, 2024
25 checks passed
@dangotbanned dangotbanned deleted the fix-into-expression-float branch September 25, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant