ArcGIS Pro's default conda environment includes the Flake8 library for linting and the Black library for autoformatting. (See ArcGIS Blog: Improve Your Scripts with Linting and Automatic Code Formatting.) Several other Python code quality tools are available to be installed through the Package Manager, including isort, pydocstyle, and pep8-naming.
Ruff is a Python library that combines the functionality of all the tools mentioned above, plus more, while performing many times faster than any of them. Several mature projects have switched to using Ruff, such as Mozilla Firefox, pandas, pip, Project Jupyter, and SciPy. (See astral-sh/ruff: Who's Using Ruff?)
It would be great for Ruff either to be included in the default conda environment, or at least to be available to be installed through the Package Manager.
Though not by our doing, Anaconda is now hosting `ruff` on defaults since this May: https://anaconda.org/main/ruff/files
That means ruff is now available for install from the Package Manager in ArcGIS Pro (it pulls from Anaconda's defaults channel).
At this time, we do not plan on incorporating this package into the default Python environment for ArcGIS Pro, arcgispro-py3.
Because the package can be successfully installed from the Package Manager into a custom environment (clone of arcgispro-py3), I am closing this idea now.
@HannesZiegler: ruff is still not showing up for me as a package that's available to install in the ArcGIS Pro Package Manager. I am on ArcGIS Pro version 3.3.2.
@Skyler I confirmed that in 3.3 ruff does not show up in the backstage, but it does show up in 3.4 (next release). You should be able to install it now using the command prompt:
Using a clone of arcgispro-py3 (do not modify arcgispro-py3 directly)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.