mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
![]() ## Summary <!-- What's the purpose of the change? What does it do, and why? --> Hi! Currently NumPy Python API is undergoing a cleanup process that will be delivered in NumPy 2.0 (release is planned for the end of the year). Most changes are rather simple (renaming, removing or moving a member of the main namespace to a new place), and they could be flagged/fixed by an additional ruff rule for numpy (e.g. changing occurrences of `np.float_` to `np.float64`). Would you accept such rule? I named it `NPY201` in the existing group, so people will receive a heads-up for changes arriving in 2.0 before actually migrating to it. ~~This is still a draft PR.~~ I'm not an expert in rust so if any part of code can be done better please share! NumPy 2.0 migration guide: https://numpy.org/devdocs/numpy_2_0_migration_guide.html NEP 52: https://numpy.org/neps/nep-0052-python-api-cleanup.html NumPy cleanup tracking issue: https://github.com/numpy/numpy/issues/23999 ## Test Plan A unit test is provided that checks all rule's fix cases. |
||
---|---|---|
.. | ||
flake8_to_ruff | ||
ruff_benchmark | ||
ruff_cache | ||
ruff_cli | ||
ruff_dev | ||
ruff_diagnostics | ||
ruff_formatter | ||
ruff_index | ||
ruff_linter | ||
ruff_macros | ||
ruff_notebook | ||
ruff_python_ast | ||
ruff_python_codegen | ||
ruff_python_formatter | ||
ruff_python_index | ||
ruff_python_literal | ||
ruff_python_parser | ||
ruff_python_resolver | ||
ruff_python_semantic | ||
ruff_python_stdlib | ||
ruff_python_trivia | ||
ruff_shrinking | ||
ruff_source_file | ||
ruff_text_size | ||
ruff_wasm | ||
ruff_workspace |