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

Ruff failing on latest version #543

Closed
callumforrester opened this issue Jul 8, 2024 · 0 comments · Fixed by #544
Closed

Ruff failing on latest version #543

callumforrester opened this issue Jul 8, 2024 · 0 comments · Fixed by #544
Labels
bug Something isn't working

Comments

@callumforrester
Copy link
Contributor

[vid18871@diamrl6120-linux blueapi]$ ruff check
tests/core/test_context.py:284:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
    |
282 | def test_function_spec(empty_context: BlueskyContext) -> None:
283 |     spec = empty_context._type_spec_for_function(has_some_params)
284 |     assert spec["foo"][0] == int
    |            ^^^^^^^^^^^^^^^^^^^^^ E721
285 |     assert spec["foo"][1].default_factory == DefaultFactory(42)
286 |     assert spec["bar"][0] == str
    |

tests/core/test_context.py:286:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
    |
284 |     assert spec["foo"][0] == int
285 |     assert spec["foo"][1].default_factory == DefaultFactory(42)
286 |     assert spec["bar"][0] == str
    |            ^^^^^^^^^^^^^^^^^^^^^ E721
287 |     assert spec["bar"][1].default_factory == DefaultFactory("bar")
    |

tests/core/test_context.py:291:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
    |
290 | def test_basic_type_conversion(empty_context: BlueskyContext) -> None:
291 |     assert empty_context._convert_type(int) == int
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E721
292 |     assert empty_context._convert_type(dict[str, int]) == dict[str, int]
    |

Found 3 errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant