@formaggio-software/rhtop-windows-amd64 0.0.0-stage → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +16 -4
- package/payload/LICENSE.txt +95 -0
- package/payload/NOTICE +16 -0
- package/payload/THIRD_PARTY_NOTICES/altgraph-0.17.5.dist-info/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/altgraph-0.17.5.dist-info/METADATA +307 -0
- package/payload/THIRD_PARTY_NOTICES/annotated_types-0.8.0.dist-info/METADATA +295 -0
- package/payload/THIRD_PARTY_NOTICES/annotated_types-0.8.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/anyio-4.16.0.dist-info/METADATA +108 -0
- package/payload/THIRD_PARTY_NOTICES/anyio-4.16.0.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/attrs-26.1.0.dist-info/METADATA +199 -0
- package/payload/THIRD_PARTY_NOTICES/attrs-26.1.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/backports.tarfile-1.2.0.dist-info/LICENSE +17 -0
- package/payload/THIRD_PARTY_NOTICES/backports.tarfile-1.2.0.dist-info/METADATA +46 -0
- package/payload/THIRD_PARTY_NOTICES/build-1.6.1.dist-info/METADATA +142 -0
- package/payload/THIRD_PARTY_NOTICES/build-1.6.1.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/cffi-2.1.1.dist-info/METADATA +67 -0
- package/payload/THIRD_PARTY_NOTICES/cffi-2.1.1.dist-info/licenses/LICENSE +23 -0
- package/payload/THIRD_PARTY_NOTICES/click-8.5.1.dist-info/METADATA +83 -0
- package/payload/THIRD_PARTY_NOTICES/click-8.5.1.dist-info/licenses/LICENSE.txt +28 -0
- package/payload/THIRD_PARTY_NOTICES/colorama-0.4.6.dist-info/METADATA +441 -0
- package/payload/THIRD_PARTY_NOTICES/colorama-0.4.6.dist-info/licenses/LICENSE.txt +27 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/METADATA +111 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/licenses/LICENSE +3 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/licenses/LICENSE.APACHE +202 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/licenses/LICENSE.BSD +27 -0
- package/payload/THIRD_PARTY_NOTICES/h11-0.16.0.dist-info/METADATA +202 -0
- package/payload/THIRD_PARTY_NOTICES/h11-0.16.0.dist-info/licenses/LICENSE.txt +22 -0
- package/payload/THIRD_PARTY_NOTICES/hatchling-1.33.0.dist-info/METADATA +81 -0
- package/payload/THIRD_PARTY_NOTICES/hatchling-1.33.0.dist-info/licenses/LICENSE.txt +9 -0
- package/payload/THIRD_PARTY_NOTICES/httpcore2-2.16.2.dist-info/METADATA +798 -0
- package/payload/THIRD_PARTY_NOTICES/httpcore2-2.16.2.dist-info/licenses/LICENSE.md +28 -0
- package/payload/THIRD_PARTY_NOTICES/httpx2-2.16.2.dist-info/METADATA +227 -0
- package/payload/THIRD_PARTY_NOTICES/httpx2-2.16.2.dist-info/licenses/LICENSE.md +13 -0
- package/payload/THIRD_PARTY_NOTICES/idna-3.20.dist-info/METADATA +176 -0
- package/payload/THIRD_PARTY_NOTICES/idna-3.20.dist-info/licenses/LICENSE.md +31 -0
- package/payload/THIRD_PARTY_NOTICES/importlib_metadata-10.2.0.dist-info/METADATA +131 -0
- package/payload/THIRD_PARTY_NOTICES/importlib_metadata-10.2.0.dist-info/licenses/LICENSE +73 -0
- package/payload/THIRD_PARTY_NOTICES/iniconfig-2.3.1.dist-info/METADATA +84 -0
- package/payload/THIRD_PARTY_NOTICES/iniconfig-2.3.1.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco.classes-3.4.0.dist-info/LICENSE +17 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco.classes-3.4.0.dist-info/METADATA +60 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_context-6.1.2.dist-info/METADATA +81 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_context-6.1.2.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_functools-4.6.0.dist-info/METADATA +68 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_functools-4.6.0.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema-4.26.0.dist-info/METADATA +170 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema-4.26.0.dist-info/licenses/COPYING +19 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema_specifications-2025.9.1.dist-info/METADATA +54 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema_specifications-2025.9.1.dist-info/licenses/COPYING +19 -0
- package/payload/THIRD_PARTY_NOTICES/keyring-25.7.0.dist-info/METADATA +554 -0
- package/payload/THIRD_PARTY_NOTICES/keyring-25.7.0.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/lazy_importer-0.1.0.dist-info/METADATA +174 -0
- package/payload/THIRD_PARTY_NOTICES/lazy_importer-0.1.0.dist-info/licenses/LICENSE +202 -0
- package/payload/THIRD_PARTY_NOTICES/linkify_it_py-2.2.0.dist-info/METADATA +262 -0
- package/payload/THIRD_PARTY_NOTICES/linkify_it_py-2.2.0.dist-info/licenses/LICENSE +48 -0
- package/payload/THIRD_PARTY_NOTICES/markdown_it_py-4.3.0.dist-info/METADATA +237 -0
- package/payload/THIRD_PARTY_NOTICES/markdown_it_py-4.3.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/markdown_it_py-4.3.0.dist-info/licenses/LICENSE.markdown-it +22 -0
- package/payload/THIRD_PARTY_NOTICES/mcp-2.3.0.dist-info/METADATA +172 -0
- package/payload/THIRD_PARTY_NOTICES/mcp-2.3.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/mcp_types-2.3.0.dist-info/METADATA +43 -0
- package/payload/THIRD_PARTY_NOTICES/mcp_types-2.3.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/mdit_py_plugins-0.7.0.dist-info/METADATA +60 -0
- package/payload/THIRD_PARTY_NOTICES/mdit_py_plugins-0.7.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/mdurl-0.1.2.dist-info/LICENSE +46 -0
- package/payload/THIRD_PARTY_NOTICES/mdurl-0.1.2.dist-info/METADATA +32 -0
- package/payload/THIRD_PARTY_NOTICES/more_itertools-11.2.1.dist-info/METADATA +302 -0
- package/payload/THIRD_PARTY_NOTICES/more_itertools-11.2.1.dist-info/licenses/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/opentelemetry_api-1.45.2.dist-info/METADATA +43 -0
- package/payload/THIRD_PARTY_NOTICES/opentelemetry_api-1.45.2.dist-info/licenses/LICENSE +201 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/METADATA +112 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/licenses/LICENSE +3 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/licenses/LICENSE.APACHE +177 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/licenses/LICENSE.BSD +23 -0
- package/payload/THIRD_PARTY_NOTICES/pathspec-1.1.1.dist-info/METADATA +392 -0
- package/payload/THIRD_PARTY_NOTICES/pathspec-1.1.1.dist-info/licenses/LICENSE +373 -0
- package/payload/THIRD_PARTY_NOTICES/pefile-2024.8.26.dist-info/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pefile-2024.8.26.dist-info/METADATA +34 -0
- package/payload/THIRD_PARTY_NOTICES/pip-23.2.1.dist-info/LICENSE.txt +20 -0
- package/payload/THIRD_PARTY_NOTICES/pip-23.2.1.dist-info/METADATA +90 -0
- package/payload/THIRD_PARTY_NOTICES/platformdirs-4.14.7.dist-info/METADATA +114 -0
- package/payload/THIRD_PARTY_NOTICES/platformdirs-4.14.7.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pluggy-1.7.0.dist-info/METADATA +152 -0
- package/payload/THIRD_PARTY_NOTICES/pluggy-1.7.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pycparser-3.12.dist-info/METADATA +286 -0
- package/payload/THIRD_PARTY_NOTICES/pycparser-3.12.dist-info/licenses/LICENSE +27 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic-2.14.3.dist-info/METADATA +1646 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic-2.14.3.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic_core-2.50.4.dist-info/METADATA +172 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic_core-2.50.4.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pygments-2.21.0.dist-info/METADATA +58 -0
- package/payload/THIRD_PARTY_NOTICES/pygments-2.21.0.dist-info/licenses/AUTHORS +296 -0
- package/payload/THIRD_PARTY_NOTICES/pygments-2.21.0.dist-info/licenses/LICENSE +25 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller-6.22.3.dist-info/METADATA +213 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller-6.22.3.dist-info/licenses/COPYING.txt +648 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller_hooks_contrib-2026.10.dist-info/METADATA +373 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller_hooks_contrib-2026.10.dist-info/licenses/LICENSE +521 -0
- package/payload/THIRD_PARTY_NOTICES/pyjwt-2.15.1.dist-info/METADATA +94 -0
- package/payload/THIRD_PARTY_NOTICES/pyjwt-2.15.1.dist-info/licenses/AUTHORS.rst +7 -0
- package/payload/THIRD_PARTY_NOTICES/pyjwt-2.15.1.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pyproject_hooks-1.3.3.dist-info/METADATA +27 -0
- package/payload/THIRD_PARTY_NOTICES/pyproject_hooks-1.3.3.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pytest-9.2.0.dist-info/METADATA +217 -0
- package/payload/THIRD_PARTY_NOTICES/pytest-9.2.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pytest_asyncio-1.5.0.dist-info/METADATA +100 -0
- package/payload/THIRD_PARTY_NOTICES/pytest_asyncio-1.5.0.dist-info/licenses/LICENSE +201 -0
- package/payload/THIRD_PARTY_NOTICES/python_multipart-0.0.34.dist-info/METADATA +179 -0
- package/payload/THIRD_PARTY_NOTICES/python_multipart-0.0.34.dist-info/licenses/LICENSE.txt +202 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/METADATA +261 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/adodbapi/license.txt +505 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/com/License.txt +30 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/com/win32comext/mapi/src/MAPIStubLibrary/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/isapi/README.txt +7 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/pythonwin/License.txt +30 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/pythonwin/Scintilla/License.txt +20 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/pythonwin/pywin/idle/LICENSE.txt +246 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/win32/License.txt +30 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32_ctypes-0.2.3.dist-info/LICENSE.txt +28 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32_ctypes-0.2.3.dist-info/METADATA +134 -0
- package/payload/THIRD_PARTY_NOTICES/pywinpty-3.1.2.dist-info/METADATA +162 -0
- package/payload/THIRD_PARTY_NOTICES/pywinpty-3.1.2.dist-info/licenses/LICENSE.txt +21 -0
- package/payload/THIRD_PARTY_NOTICES/pyyaml-6.0.3.dist-info/METADATA +59 -0
- package/payload/THIRD_PARTY_NOTICES/pyyaml-6.0.3.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/referencing-0.37.0.dist-info/METADATA +64 -0
- package/payload/THIRD_PARTY_NOTICES/referencing-0.37.0.dist-info/licenses/COPYING +19 -0
- package/payload/THIRD_PARTY_NOTICES/rich-15.0.0.dist-info/METADATA +479 -0
- package/payload/THIRD_PARTY_NOTICES/rich-15.0.0.dist-info/licenses/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/rpds_py-2026.9.1.dist-info/METADATA +99 -0
- package/payload/THIRD_PARTY_NOTICES/rpds_py-2026.9.1.dist-info/licenses/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/ruff-0.17.5.dist-info/METADATA +484 -0
- package/payload/THIRD_PARTY_NOTICES/ruff-0.17.5.dist-info/licenses/LICENSE +430 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools-65.5.0.dist-info/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools-65.5.0.dist-info/METADATA +144 -0
- package/payload/THIRD_PARTY_NOTICES/sse_starlette-3.7.0.dist-info/METADATA +493 -0
- package/payload/THIRD_PARTY_NOTICES/sse_starlette-3.7.0.dist-info/licenses/AUTHORS +10 -0
- package/payload/THIRD_PARTY_NOTICES/sse_starlette-3.7.0.dist-info/licenses/LICENSE +27 -0
- package/payload/THIRD_PARTY_NOTICES/starlette-1.10.0.dist-info/METADATA +181 -0
- package/payload/THIRD_PARTY_NOTICES/starlette-1.10.0.dist-info/licenses/LICENSE.md +27 -0
- package/payload/THIRD_PARTY_NOTICES/textual-6.12.0.dist-info/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/textual-6.12.0.dist-info/METADATA +265 -0
- package/payload/THIRD_PARTY_NOTICES/tomlkit-0.15.2.dist-info/METADATA +93 -0
- package/payload/THIRD_PARTY_NOTICES/tomlkit-0.15.2.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/trove_classifiers-2026.9.21.13.dist-info/METADATA +82 -0
- package/payload/THIRD_PARTY_NOTICES/trove_classifiers-2026.9.21.13.dist-info/licenses/LICENSE +201 -0
- package/payload/THIRD_PARTY_NOTICES/truststore-0.10.5.dist-info/METADATA +110 -0
- package/payload/THIRD_PARTY_NOTICES/truststore-0.10.5.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/typing_extensions-4.16.0.dist-info/METADATA +73 -0
- package/payload/THIRD_PARTY_NOTICES/typing_extensions-4.16.0.dist-info/licenses/LICENSE +279 -0
- package/payload/THIRD_PARTY_NOTICES/typing_inspection-0.4.5.dist-info/METADATA +49 -0
- package/payload/THIRD_PARTY_NOTICES/typing_inspection-0.4.5.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/uvicorn-0.54.0.dist-info/METADATA +189 -0
- package/payload/THIRD_PARTY_NOTICES/uvicorn-0.54.0.dist-info/licenses/LICENSE.md +27 -0
- package/payload/THIRD_PARTY_NOTICES/zipp-4.1.2.dist-info/METADATA +108 -0
- package/payload/THIRD_PARTY_NOTICES/zipp-4.1.2.dist-info/licenses/LICENSE +18 -0
- package/payload/rhtop.exe +0 -0
- package/README.md +0 -3
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rpds-py
|
|
3
|
+
Version: 2026.9.1
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: Operating System :: OS Independent
|
|
7
|
+
Classifier: Programming Language :: Rust
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
15
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Summary: Python bindings to Rust's persistent data structures (rpds)
|
|
18
|
+
Keywords: data structures,rust,persistent
|
|
19
|
+
Author-email: Julian Berman <Julian+rpds@GrayVines.com>
|
|
20
|
+
License-Expression: MIT
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Description-Content-Type: text/x-rst; charset=UTF-8
|
|
23
|
+
Project-URL: Documentation, https://rpds.readthedocs.io/
|
|
24
|
+
Project-URL: Funding, https://github.com/sponsors/Julian
|
|
25
|
+
Project-URL: Homepage, https://github.com/crate-py/rpds
|
|
26
|
+
Project-URL: Issues, https://github.com/crate-py/rpds/issues/
|
|
27
|
+
Project-URL: Source, https://github.com/crate-py/rpds
|
|
28
|
+
Project-URL: Tidelift, https://tidelift.com/subscription/pkg/pypi-rpds-py?utm_source=pypi-rpds-py&utm_medium=referral&utm_campaign=pypi-link
|
|
29
|
+
Project-URL: Upstream, https://github.com/orium/rpds
|
|
30
|
+
|
|
31
|
+
===========
|
|
32
|
+
``rpds.py``
|
|
33
|
+
===========
|
|
34
|
+
|
|
35
|
+
|PyPI| |Pythons| |CI|
|
|
36
|
+
|
|
37
|
+
.. |PyPI| image:: https://img.shields.io/pypi/v/rpds-py.svg
|
|
38
|
+
:alt: PyPI version
|
|
39
|
+
:target: https://pypi.org/project/rpds-py/
|
|
40
|
+
|
|
41
|
+
.. |Pythons| image:: https://img.shields.io/pypi/pyversions/rpds-py.svg
|
|
42
|
+
:alt: Supported Python versions
|
|
43
|
+
:target: https://pypi.org/project/rpds-py/
|
|
44
|
+
|
|
45
|
+
.. |CI| image:: https://github.com/crate-py/rpds/workflows/CI/badge.svg
|
|
46
|
+
:alt: Build status
|
|
47
|
+
:target: https://github.com/crate-py/rpds/actions?query=workflow%3ACI
|
|
48
|
+
|
|
49
|
+
.. |ReadTheDocs| image:: https://readthedocs.org/projects/referencing/badge/?version=stable&style=flat
|
|
50
|
+
:alt: ReadTheDocs status
|
|
51
|
+
:target: https://referencing.readthedocs.io/en/stable/
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
Python bindings to the `Rust rpds crate <https://docs.rs/rpds/>`_ for persistent data structures.
|
|
55
|
+
|
|
56
|
+
What's here is quite minimal (in transparency, it was written initially to support replacing ``pyrsistent`` in the `referencing library <https://github.com/python-jsonschema/referencing>`_).
|
|
57
|
+
If you see something missing (which is very likely), a PR is definitely welcome to add it.
|
|
58
|
+
|
|
59
|
+
Installation
|
|
60
|
+
------------
|
|
61
|
+
|
|
62
|
+
The distribution on PyPI is named ``rpds.py`` (equivalently ``rpds-py``), and thus can be installed via e.g.:
|
|
63
|
+
|
|
64
|
+
.. code:: sh
|
|
65
|
+
|
|
66
|
+
$ pip install rpds-py
|
|
67
|
+
|
|
68
|
+
Note that if you install ``rpds-py`` from source, you will need a Rust toolchain installed, as it is a build-time dependency.
|
|
69
|
+
An example of how to do so in a ``Dockerfile`` can be found `here <https://github.com/bowtie-json-schema/bowtie/blob/e77fd93598cb6e7dc1b8b1f53c00e5aa410c201a/implementations/python-jsonschema/Dockerfile#L1-L8>`_.
|
|
70
|
+
|
|
71
|
+
If you believe you are on a common platform which should have wheels built (i.e. and not need to compile from source), feel free to file an issue or pull request modifying the GitHub action used here to build wheels via ``maturin``.
|
|
72
|
+
|
|
73
|
+
Usage
|
|
74
|
+
-----
|
|
75
|
+
|
|
76
|
+
Methods in general are named similarly to their ``rpds`` counterparts (rather than ``pyrsistent``\ 's conventions, though probably a full drop-in ``pyrsistent``\ -compatible wrapper module is a good addition at some point).
|
|
77
|
+
|
|
78
|
+
.. code:: python
|
|
79
|
+
|
|
80
|
+
>>> from rpds import HashTrieMap, HashTrieSet, List
|
|
81
|
+
|
|
82
|
+
>>> m = HashTrieMap({"foo": "bar", "baz": "quux"})
|
|
83
|
+
>>> m.insert("spam", 37) == HashTrieMap({"foo": "bar", "baz": "quux", "spam": 37})
|
|
84
|
+
True
|
|
85
|
+
>>> m.remove("foo") == HashTrieMap({"baz": "quux"})
|
|
86
|
+
True
|
|
87
|
+
|
|
88
|
+
>>> s = HashTrieSet({"foo", "bar", "baz", "quux"})
|
|
89
|
+
>>> s.insert("spam") == HashTrieSet({"foo", "bar", "baz", "quux", "spam"})
|
|
90
|
+
True
|
|
91
|
+
>>> s.remove("foo") == HashTrieSet({"bar", "baz", "quux"})
|
|
92
|
+
True
|
|
93
|
+
|
|
94
|
+
>>> L = List([1, 3, 5])
|
|
95
|
+
>>> L.push_front(-1) == List([-1, 1, 3, 5])
|
|
96
|
+
True
|
|
97
|
+
>>> L.rest == List([3, 5])
|
|
98
|
+
True
|
|
99
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2023 Julian Berman
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
|
11
|
+
all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ruff
|
|
3
|
+
Version: 0.17.5
|
|
4
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
5
|
+
Classifier: Environment :: Console
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: Operating System :: OS Independent
|
|
8
|
+
Classifier: Programming Language :: Python
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Rust
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Summary: An extremely fast Python linter and code formatter, written in Rust.
|
|
24
|
+
Keywords: automation,flake8,pycodestyle,pyflakes,pylint,clippy
|
|
25
|
+
Home-Page: https://docs.astral.sh/ruff
|
|
26
|
+
Author-email: "Astral Software Inc." <hey@astral.sh>
|
|
27
|
+
License-Expression: MIT
|
|
28
|
+
Requires-Python: >=3.7
|
|
29
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
30
|
+
Project-URL: Changelog, https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md
|
|
31
|
+
Project-URL: Documentation, https://docs.astral.sh/ruff/
|
|
32
|
+
Project-URL: Repository, https://github.com/astral-sh/ruff
|
|
33
|
+
|
|
34
|
+
<!-- Begin section: Overview -->
|
|
35
|
+
|
|
36
|
+
# Ruff
|
|
37
|
+
|
|
38
|
+
[](https://github.com/astral-sh/ruff)
|
|
39
|
+
[](https://pypi.python.org/pypi/ruff)
|
|
40
|
+
[](https://github.com/astral-sh/ruff/blob/main/LICENSE)
|
|
41
|
+
[](https://pypi.python.org/pypi/ruff)
|
|
42
|
+
[](https://github.com/astral-sh/ruff/actions)
|
|
43
|
+
[](https://discord.com/invite/astral-sh)
|
|
44
|
+
|
|
45
|
+
[**Docs**](https://docs.astral.sh/ruff/) | [**Playground**](https://play.ruff.rs/)
|
|
46
|
+
|
|
47
|
+
An extremely fast Python linter and code formatter, written in Rust.
|
|
48
|
+
|
|
49
|
+
<p align="center">
|
|
50
|
+
<img alt="Shows a bar chart with benchmark results." src="https://user-images.githubusercontent.com/1309177/232603516-4fb4892d-585c-4b20-b810-3db9161831e4.svg">
|
|
51
|
+
</p>
|
|
52
|
+
|
|
53
|
+
<p align="center">
|
|
54
|
+
<i>Linting the CPython codebase from scratch.</i>
|
|
55
|
+
</p>
|
|
56
|
+
|
|
57
|
+
- ⚡️ 10-100x faster than existing linters (like Flake8) and formatters (like Black)
|
|
58
|
+
- 🐍 Installable via `pip`
|
|
59
|
+
- 🛠️ `pyproject.toml` support
|
|
60
|
+
- 🤝 Python 3.15 compatibility
|
|
61
|
+
- ⚖️ Drop-in parity with [Flake8](https://docs.astral.sh/ruff/faq/#how-does-ruffs-linter-compare-to-flake8), [isort](https://docs.astral.sh/ruff/faq/#how-does-ruffs-import-sorting-compare-to-isort), and [Black](https://docs.astral.sh/ruff/faq/#how-does-ruffs-formatter-compare-to-black)
|
|
62
|
+
- 📦 Built-in caching, to avoid re-analyzing unchanged files
|
|
63
|
+
- 🔧 Fix support, for automatic error correction (e.g., automatically remove unused imports)
|
|
64
|
+
- 📏 Over [900 built-in rules](https://docs.astral.sh/ruff/rules/), with native re-implementations
|
|
65
|
+
of popular Flake8 plugins, like flake8-bugbear
|
|
66
|
+
- ⌨️ First-party [editor integrations](https://docs.astral.sh/ruff/editors) for [VS Code](https://github.com/astral-sh/ruff-vscode) and [more](https://docs.astral.sh/ruff/editors/setup)
|
|
67
|
+
- 🌎 Monorepo-friendly, with [hierarchical and cascading configuration](https://docs.astral.sh/ruff/configuration/#config-file-discovery)
|
|
68
|
+
|
|
69
|
+
Ruff aims to be orders of magnitude faster than alternative tools while integrating more
|
|
70
|
+
functionality behind a single, common interface.
|
|
71
|
+
|
|
72
|
+
Ruff can be used to replace [Flake8](https://pypi.org/project/flake8/) (plus dozens of plugins),
|
|
73
|
+
[Black](https://github.com/psf/black), [isort](https://pypi.org/project/isort/),
|
|
74
|
+
[pydocstyle](https://pypi.org/project/pydocstyle/), [pyupgrade](https://pypi.org/project/pyupgrade/),
|
|
75
|
+
[autoflake](https://pypi.org/project/autoflake/), and more, all while executing tens or hundreds of
|
|
76
|
+
times faster than any individual tool.
|
|
77
|
+
|
|
78
|
+
Ruff is actively developed and used in major open-source projects like:
|
|
79
|
+
|
|
80
|
+
- [Apache Airflow](https://github.com/apache/airflow)
|
|
81
|
+
- [Apache Superset](https://github.com/apache/superset)
|
|
82
|
+
- [FastAPI](https://github.com/tiangolo/fastapi)
|
|
83
|
+
- [Hugging Face](https://github.com/huggingface/transformers)
|
|
84
|
+
- [Pandas](https://github.com/pandas-dev/pandas)
|
|
85
|
+
- [SciPy](https://github.com/scipy/scipy)
|
|
86
|
+
|
|
87
|
+
Ruff is backed by [Astral](https://astral.sh), the creators of
|
|
88
|
+
[uv](https://github.com/astral-sh/uv) and [ty](https://github.com/astral-sh/ty).
|
|
89
|
+
|
|
90
|
+
Read the [launch
|
|
91
|
+
post](https://astral.sh/blog/announcing-astral-the-company-behind-ruff), or the
|
|
92
|
+
original [project
|
|
93
|
+
announcement](https://notes.crmarsh.com/python-tooling-could-be-much-much-faster).
|
|
94
|
+
|
|
95
|
+
## Testimonials
|
|
96
|
+
|
|
97
|
+
[**Sebastián Ramírez**](https://twitter.com/tiangolo/status/1591912354882764802), creator
|
|
98
|
+
of [FastAPI](https://github.com/tiangolo/fastapi):
|
|
99
|
+
|
|
100
|
+
> Ruff is so fast that sometimes I add an intentional bug in the code just to confirm it's actually
|
|
101
|
+
> running and checking the code.
|
|
102
|
+
|
|
103
|
+
[**Nick Schrock**](https://twitter.com/schrockn/status/1612615862904827904), founder of [Elementl](https://www.elementl.com/),
|
|
104
|
+
co-creator of [GraphQL](https://graphql.org/):
|
|
105
|
+
|
|
106
|
+
> Why is Ruff a gamechanger? Primarily because it is nearly 1000x faster. Literally. Not a typo. On
|
|
107
|
+
> our largest module (dagster itself, 250k LOC) pylint takes about 2.5 minutes, parallelized across 4
|
|
108
|
+
> cores on my M1. Running ruff against our _entire_ codebase takes .4 seconds.
|
|
109
|
+
|
|
110
|
+
[**Bryan Van de Ven**](https://github.com/bokeh/bokeh/pull/12605), co-creator
|
|
111
|
+
of [Bokeh](https://github.com/bokeh/bokeh/), original author
|
|
112
|
+
of [Conda](https://docs.conda.io/en/latest/):
|
|
113
|
+
|
|
114
|
+
> Ruff is ~150-200x faster than flake8 on my machine, scanning the whole repo takes ~0.2s instead of
|
|
115
|
+
> ~20s. This is an enormous quality of life improvement for local dev. It's fast enough that I added
|
|
116
|
+
> it as an actual commit hook, which is terrific.
|
|
117
|
+
|
|
118
|
+
[**Timothy Crosley**](https://twitter.com/timothycrosley/status/1606420868514877440),
|
|
119
|
+
creator of [isort](https://github.com/PyCQA/isort):
|
|
120
|
+
|
|
121
|
+
> Just switched my first project to Ruff. Only one downside so far: it's so fast I couldn't believe
|
|
122
|
+
> it was working till I intentionally introduced some errors.
|
|
123
|
+
|
|
124
|
+
[**Tim Abbott**](https://github.com/zulip/zulip/pull/23431#issuecomment-1302557034), lead developer of [Zulip](https://github.com/zulip/zulip) (also [here](https://github.com/astral-sh/ruff/issues/465#issuecomment-1317400028)):
|
|
125
|
+
|
|
126
|
+
> This is just ridiculously fast... `ruff` is amazing.
|
|
127
|
+
|
|
128
|
+
<!-- End section: Overview -->
|
|
129
|
+
|
|
130
|
+
## Table of Contents
|
|
131
|
+
|
|
132
|
+
For more, see the [documentation](https://docs.astral.sh/ruff/).
|
|
133
|
+
|
|
134
|
+
1. [Getting Started](#getting-started)
|
|
135
|
+
1. [Configuration](#configuration)
|
|
136
|
+
1. [Rules](#rules)
|
|
137
|
+
1. [Contributing](#contributing)
|
|
138
|
+
1. [Support](#support)
|
|
139
|
+
1. [Acknowledgements](#acknowledgements)
|
|
140
|
+
1. [Show Your Support](#show-your-support)
|
|
141
|
+
1. [License](#license)
|
|
142
|
+
|
|
143
|
+
## Getting Started<a id="getting-started"></a>
|
|
144
|
+
|
|
145
|
+
For more, see the [documentation](https://docs.astral.sh/ruff/).
|
|
146
|
+
|
|
147
|
+
### Installation
|
|
148
|
+
|
|
149
|
+
Ruff is available as [`ruff`](https://pypi.org/project/ruff/) on PyPI.
|
|
150
|
+
|
|
151
|
+
Invoke Ruff directly with [`uvx`](https://docs.astral.sh/uv/):
|
|
152
|
+
|
|
153
|
+
```shell
|
|
154
|
+
uvx ruff@0.17.5 check # Lint all files in the current directory.
|
|
155
|
+
uvx ruff@0.17.5 format # Format all files in the current directory.
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Or install Ruff with `uv` (recommended), `pip`, or `pipx`:
|
|
159
|
+
|
|
160
|
+
```shell
|
|
161
|
+
# With uv.
|
|
162
|
+
uv tool install ruff@latest # Install Ruff globally.
|
|
163
|
+
uv add --dev ruff # Or add Ruff to your project.
|
|
164
|
+
|
|
165
|
+
# With pip.
|
|
166
|
+
pip install ruff
|
|
167
|
+
|
|
168
|
+
# With pipx.
|
|
169
|
+
pipx install ruff
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Starting with version `0.5.0`, Ruff can be installed with our standalone installers:
|
|
173
|
+
|
|
174
|
+
```shell
|
|
175
|
+
# On macOS and Linux.
|
|
176
|
+
curl -LsSf https://astral.sh/ruff/install.sh | sh
|
|
177
|
+
|
|
178
|
+
# On Windows.
|
|
179
|
+
powershell -c "irm https://astral.sh/ruff/install.ps1 | iex"
|
|
180
|
+
|
|
181
|
+
# For a specific version.
|
|
182
|
+
curl -LsSf https://astral.sh/ruff/0.17.5/install.sh | sh
|
|
183
|
+
powershell -c "irm https://astral.sh/ruff/0.17.5/install.ps1 | iex"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
You can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff),
|
|
187
|
+
and with [a variety of other package managers](https://docs.astral.sh/ruff/installation/).
|
|
188
|
+
|
|
189
|
+
### Usage
|
|
190
|
+
|
|
191
|
+
To run Ruff as a linter, try any of the following:
|
|
192
|
+
|
|
193
|
+
```shell
|
|
194
|
+
ruff check # Lint all files in the current directory (and any subdirectories).
|
|
195
|
+
ruff check path/to/code/ # Lint all files in `/path/to/code` (and any subdirectories).
|
|
196
|
+
ruff check path/to/code/*.py # Lint all `.py` files in `/path/to/code`.
|
|
197
|
+
ruff check path/to/code/to/file.py # Lint `file.py`.
|
|
198
|
+
ruff check @arguments.txt # Lint using an input file, treating its contents as newline-delimited command-line arguments.
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Or, to run Ruff as a formatter:
|
|
202
|
+
|
|
203
|
+
```shell
|
|
204
|
+
ruff format # Format all files in the current directory (and any subdirectories).
|
|
205
|
+
ruff format path/to/code/ # Format all files in `/path/to/code` (and any subdirectories).
|
|
206
|
+
ruff format path/to/code/*.py # Format all `.py` files in `/path/to/code`.
|
|
207
|
+
ruff format path/to/code/to/file.py # Format `file.py`.
|
|
208
|
+
ruff format @arguments.txt # Format using an input file, treating its contents as newline-delimited command-line arguments.
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Ruff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff-pre-commit`](https://github.com/astral-sh/ruff-pre-commit):
|
|
212
|
+
|
|
213
|
+
```yaml
|
|
214
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
215
|
+
# Ruff version.
|
|
216
|
+
rev: v0.17.5
|
|
217
|
+
hooks:
|
|
218
|
+
# Run the linter.
|
|
219
|
+
- id: ruff-check
|
|
220
|
+
args: [ --fix ]
|
|
221
|
+
# Run the formatter.
|
|
222
|
+
- id: ruff-format
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Ruff can also be used as a [VS Code extension](https://github.com/astral-sh/ruff-vscode) or with [various other editors](https://docs.astral.sh/ruff/editors/setup).
|
|
226
|
+
|
|
227
|
+
Ruff can also be used as a [GitHub Action](https://github.com/features/actions) via
|
|
228
|
+
[`ruff-action`](https://github.com/astral-sh/ruff-action):
|
|
229
|
+
|
|
230
|
+
```yaml
|
|
231
|
+
name: Ruff
|
|
232
|
+
on: [ push, pull_request ]
|
|
233
|
+
jobs:
|
|
234
|
+
ruff:
|
|
235
|
+
runs-on: ubuntu-latest
|
|
236
|
+
steps:
|
|
237
|
+
- uses: actions/checkout@v4
|
|
238
|
+
- uses: astral-sh/ruff-action@v3
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Configuration<a id="configuration"></a>
|
|
242
|
+
|
|
243
|
+
Ruff can be configured through a `pyproject.toml`, `ruff.toml`, or `.ruff.toml` file (see:
|
|
244
|
+
[_Configuration_](https://docs.astral.sh/ruff/configuration/), or [_Settings_](https://docs.astral.sh/ruff/settings/)
|
|
245
|
+
for a complete list of all configuration options).
|
|
246
|
+
|
|
247
|
+
For the complete list of enabled rules, see [_Default Rules_](https://docs.astral.sh/ruff/default-rules/).
|
|
248
|
+
|
|
249
|
+
If left unspecified, Ruff's default configuration is equivalent to the following `ruff.toml` file:
|
|
250
|
+
|
|
251
|
+
```toml
|
|
252
|
+
# Exclude a variety of commonly ignored directories.
|
|
253
|
+
exclude = [
|
|
254
|
+
".bzr",
|
|
255
|
+
".direnv",
|
|
256
|
+
".eggs",
|
|
257
|
+
".git",
|
|
258
|
+
".git-rewrite",
|
|
259
|
+
".hg",
|
|
260
|
+
".ipynb_checkpoints",
|
|
261
|
+
".mypy_cache",
|
|
262
|
+
".nox",
|
|
263
|
+
".pants.d",
|
|
264
|
+
".pyenv",
|
|
265
|
+
".pytest_cache",
|
|
266
|
+
".pytype",
|
|
267
|
+
".ruff_cache",
|
|
268
|
+
".svn",
|
|
269
|
+
".tox",
|
|
270
|
+
".venv",
|
|
271
|
+
".vscode",
|
|
272
|
+
"__pypackages__",
|
|
273
|
+
"_build",
|
|
274
|
+
"buck-out",
|
|
275
|
+
"build",
|
|
276
|
+
"dist",
|
|
277
|
+
"node_modules",
|
|
278
|
+
"site-packages",
|
|
279
|
+
"venv",
|
|
280
|
+
]
|
|
281
|
+
|
|
282
|
+
# Same as Black.
|
|
283
|
+
line-length = 88
|
|
284
|
+
indent-width = 4
|
|
285
|
+
|
|
286
|
+
# Assume Python 3.11
|
|
287
|
+
target-version = "py311"
|
|
288
|
+
|
|
289
|
+
[lint]
|
|
290
|
+
# select = [...] # See the Default Rules page for the full listing.
|
|
291
|
+
ignore = []
|
|
292
|
+
|
|
293
|
+
# Allow fix for all enabled rules (when `--fix`) is provided.
|
|
294
|
+
fixable = ["ALL"]
|
|
295
|
+
unfixable = []
|
|
296
|
+
|
|
297
|
+
# Allow unused variables when underscore-prefixed.
|
|
298
|
+
dummy-variable-rgx = "^(_+|(_+[\\p{XID_Continue}]*[\\p{XID_Continue}--_]+?))$"
|
|
299
|
+
|
|
300
|
+
[format]
|
|
301
|
+
# Like Black, use double quotes for strings.
|
|
302
|
+
quote-style = "double"
|
|
303
|
+
|
|
304
|
+
# Like Black, indent with spaces, rather than tabs.
|
|
305
|
+
indent-style = "space"
|
|
306
|
+
|
|
307
|
+
# Like Black, respect magic trailing commas.
|
|
308
|
+
skip-magic-trailing-comma = false
|
|
309
|
+
|
|
310
|
+
# Like Black, automatically detect the appropriate line ending.
|
|
311
|
+
line-ending = "auto"
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Note that, in a `pyproject.toml`, each section header should be prefixed with `tool.ruff`. For
|
|
315
|
+
example, `[lint]` should be replaced with `[tool.ruff.lint]`.
|
|
316
|
+
|
|
317
|
+
Some configuration options can be provided via dedicated command-line arguments, such as those
|
|
318
|
+
related to rule enablement and disablement, file discovery, and logging level:
|
|
319
|
+
|
|
320
|
+
```shell
|
|
321
|
+
ruff check --select F401 --select F403 --quiet
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
The remaining configuration options can be provided through a catch-all `--config` argument:
|
|
325
|
+
|
|
326
|
+
```shell
|
|
327
|
+
ruff check --config "lint.per-file-ignores = {'some_file.py' = ['F841']}"
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
To opt in to the latest lint rules, formatter style changes, interface updates, and more, enable
|
|
331
|
+
[preview mode](https://docs.astral.sh/ruff/preview/) by setting `preview = true` in your configuration
|
|
332
|
+
file or passing `--preview` on the command line. Preview mode enables a collection of unstable
|
|
333
|
+
features that may change prior to stabilization.
|
|
334
|
+
|
|
335
|
+
See `ruff help` for more on Ruff's top-level commands, or `ruff help check` and `ruff help format`
|
|
336
|
+
for more on the linting and formatting commands, respectively.
|
|
337
|
+
|
|
338
|
+
## Rules<a id="rules"></a>
|
|
339
|
+
|
|
340
|
+
<!-- Begin section: Rules -->
|
|
341
|
+
|
|
342
|
+
**Ruff supports over 900 lint rules**, many of which are inspired by popular tools like Flake8,
|
|
343
|
+
isort, pyupgrade, and others. Regardless of the rule's origin, Ruff re-implements every rule in
|
|
344
|
+
Rust as a first-party feature.
|
|
345
|
+
|
|
346
|
+
By default, Ruff enables rules from the `F`, `E`, `B`, `UP`, and `RUF` categories,
|
|
347
|
+
as well as many more, omitting any stylistic rules that overlap with the use of a formatter, like
|
|
348
|
+
`ruff format` or [Black](https://github.com/psf/black).
|
|
349
|
+
|
|
350
|
+
If you're just getting started with Ruff, **the default rule set is a great place to start**: it
|
|
351
|
+
catches a wide variety of common errors (like unused imports) with zero configuration. See
|
|
352
|
+
[_Default Rules_](https://docs.astral.sh/ruff/default-rules/) for the complete list.
|
|
353
|
+
|
|
354
|
+
<!-- End section: Rules -->
|
|
355
|
+
|
|
356
|
+
Beyond the defaults, Ruff re-implements some of the most popular Flake8 plugins and related code
|
|
357
|
+
quality tools, including:
|
|
358
|
+
|
|
359
|
+
- [autoflake](https://pypi.org/project/autoflake/)
|
|
360
|
+
- [eradicate](https://pypi.org/project/eradicate/)
|
|
361
|
+
- [flake8-2020](https://pypi.org/project/flake8-2020/)
|
|
362
|
+
- [flake8-annotations](https://pypi.org/project/flake8-annotations/)
|
|
363
|
+
- [flake8-async](https://pypi.org/project/flake8-async)
|
|
364
|
+
- [flake8-bandit](https://pypi.org/project/flake8-bandit/) ([#1646](https://github.com/astral-sh/ruff/issues/1646))
|
|
365
|
+
- [flake8-blind-except](https://pypi.org/project/flake8-blind-except/)
|
|
366
|
+
- [flake8-boolean-trap](https://pypi.org/project/flake8-boolean-trap/)
|
|
367
|
+
- [flake8-bugbear](https://pypi.org/project/flake8-bugbear/)
|
|
368
|
+
- [flake8-builtins](https://pypi.org/project/flake8-builtins/)
|
|
369
|
+
- [flake8-commas](https://pypi.org/project/flake8-commas/)
|
|
370
|
+
- [flake8-comprehensions](https://pypi.org/project/flake8-comprehensions/)
|
|
371
|
+
- [flake8-copyright](https://pypi.org/project/flake8-copyright/)
|
|
372
|
+
- [flake8-datetimez](https://pypi.org/project/flake8-datetimez/)
|
|
373
|
+
- [flake8-debugger](https://pypi.org/project/flake8-debugger/)
|
|
374
|
+
- [flake8-django](https://pypi.org/project/flake8-django/)
|
|
375
|
+
- [flake8-docstrings](https://pypi.org/project/flake8-docstrings/)
|
|
376
|
+
- [flake8-eradicate](https://pypi.org/project/flake8-eradicate/)
|
|
377
|
+
- [flake8-errmsg](https://pypi.org/project/flake8-errmsg/)
|
|
378
|
+
- [flake8-executable](https://pypi.org/project/flake8-executable/)
|
|
379
|
+
- [flake8-future-annotations](https://pypi.org/project/flake8-future-annotations/)
|
|
380
|
+
- [flake8-gettext](https://pypi.org/project/flake8-gettext/)
|
|
381
|
+
- [flake8-implicit-str-concat](https://pypi.org/project/flake8-implicit-str-concat/)
|
|
382
|
+
- [flake8-import-conventions](https://github.com/joaopalmeiro/flake8-import-conventions)
|
|
383
|
+
- [flake8-logging](https://pypi.org/project/flake8-logging/)
|
|
384
|
+
- [flake8-logging-format](https://pypi.org/project/flake8-logging-format/)
|
|
385
|
+
- [flake8-no-pep420](https://pypi.org/project/flake8-no-pep420)
|
|
386
|
+
- [flake8-pie](https://pypi.org/project/flake8-pie/)
|
|
387
|
+
- [flake8-print](https://pypi.org/project/flake8-print/)
|
|
388
|
+
- [flake8-pyi](https://pypi.org/project/flake8-pyi/)
|
|
389
|
+
- [flake8-pytest-style](https://pypi.org/project/flake8-pytest-style/)
|
|
390
|
+
- [flake8-quotes](https://pypi.org/project/flake8-quotes/)
|
|
391
|
+
- [flake8-raise](https://pypi.org/project/flake8-raise/)
|
|
392
|
+
- [flake8-return](https://pypi.org/project/flake8-return/)
|
|
393
|
+
- [flake8-self](https://pypi.org/project/flake8-self/)
|
|
394
|
+
- [flake8-simplify](https://pypi.org/project/flake8-simplify/)
|
|
395
|
+
- [flake8-slots](https://pypi.org/project/flake8-slots/)
|
|
396
|
+
- [flake8-super](https://pypi.org/project/flake8-super/)
|
|
397
|
+
- [flake8-tidy-imports](https://pypi.org/project/flake8-tidy-imports/)
|
|
398
|
+
- [flake8-todos](https://pypi.org/project/flake8-todos/)
|
|
399
|
+
- [flake8-type-checking](https://pypi.org/project/flake8-type-checking/)
|
|
400
|
+
- [flake8-use-pathlib](https://pypi.org/project/flake8-use-pathlib/)
|
|
401
|
+
- [flynt](https://pypi.org/project/flynt/) ([#2102](https://github.com/astral-sh/ruff/issues/2102))
|
|
402
|
+
- [isort](https://pypi.org/project/isort/)
|
|
403
|
+
- [mccabe](https://pypi.org/project/mccabe/)
|
|
404
|
+
- [pandas-vet](https://pypi.org/project/pandas-vet/)
|
|
405
|
+
- [pep8-naming](https://pypi.org/project/pep8-naming/)
|
|
406
|
+
- [pydocstyle](https://pypi.org/project/pydocstyle/)
|
|
407
|
+
- [pygrep-hooks](https://github.com/pre-commit/pygrep-hooks)
|
|
408
|
+
- [pylint-airflow](https://pypi.org/project/pylint-airflow/)
|
|
409
|
+
- [pyupgrade](https://pypi.org/project/pyupgrade/)
|
|
410
|
+
- [tryceratops](https://pypi.org/project/tryceratops/)
|
|
411
|
+
- [yesqa](https://pypi.org/project/yesqa/)
|
|
412
|
+
|
|
413
|
+
For the complete list of supported rules, see [_Rules_](https://docs.astral.sh/ruff/rules/).
|
|
414
|
+
|
|
415
|
+
## Contributing<a id="contributing"></a>
|
|
416
|
+
|
|
417
|
+
Contributions are welcome and highly appreciated. To get started, check out the
|
|
418
|
+
[**contributing guidelines**](https://docs.astral.sh/ruff/contributing/).
|
|
419
|
+
|
|
420
|
+
You can also join us on [**Discord**](https://discord.com/invite/astral-sh).
|
|
421
|
+
|
|
422
|
+
## Support<a id="support"></a>
|
|
423
|
+
|
|
424
|
+
Having trouble? Check out the existing issues on [**GitHub**](https://github.com/astral-sh/ruff/issues),
|
|
425
|
+
or feel free to [**open a new one**](https://github.com/astral-sh/ruff/issues/new).
|
|
426
|
+
|
|
427
|
+
You can also ask for help on [**Discord**](https://discord.com/invite/astral-sh).
|
|
428
|
+
|
|
429
|
+
## Acknowledgements<a id="acknowledgements"></a>
|
|
430
|
+
|
|
431
|
+
Ruff's linter draws on both the APIs and implementation details of many other
|
|
432
|
+
tools in the Python ecosystem, especially [Flake8](https://github.com/PyCQA/flake8), [Pyflakes](https://github.com/PyCQA/pyflakes),
|
|
433
|
+
[pycodestyle](https://github.com/PyCQA/pycodestyle), [pydocstyle](https://github.com/PyCQA/pydocstyle),
|
|
434
|
+
[pyupgrade](https://github.com/asottile/pyupgrade), and [isort](https://github.com/PyCQA/isort).
|
|
435
|
+
|
|
436
|
+
In some cases, Ruff includes a "direct" Rust port of the corresponding tool.
|
|
437
|
+
We're grateful to the maintainers of these tools for their work, and for all
|
|
438
|
+
the value they've provided to the Python community.
|
|
439
|
+
|
|
440
|
+
Ruff's formatter is built on a fork of Rome's [`rome_formatter`](https://github.com/rome/tools/tree/main/crates/rome_formatter),
|
|
441
|
+
and again draws on both API and implementation details from [Rome](https://github.com/rome/tools),
|
|
442
|
+
[Prettier](https://github.com/prettier/prettier), and [Black](https://github.com/psf/black).
|
|
443
|
+
|
|
444
|
+
Ruff's import resolver is based on the import resolution algorithm from [Pyright](https://github.com/microsoft/pyright).
|
|
445
|
+
|
|
446
|
+
Ruff is also influenced by a number of tools outside the Python ecosystem, like
|
|
447
|
+
[Clippy](https://github.com/rust-lang/rust-clippy) and [ESLint](https://github.com/eslint/eslint).
|
|
448
|
+
|
|
449
|
+
Ruff is the beneficiary of a large number of [contributors](https://github.com/astral-sh/ruff/graphs/contributors).
|
|
450
|
+
|
|
451
|
+
Ruff is released under the MIT license.
|
|
452
|
+
|
|
453
|
+
## Show Your Support
|
|
454
|
+
|
|
455
|
+
If you're using Ruff, consider adding the Ruff badge to your project's `README.md`:
|
|
456
|
+
|
|
457
|
+
```md
|
|
458
|
+
[](https://github.com/astral-sh/ruff)
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
...or `README.rst`:
|
|
462
|
+
|
|
463
|
+
```rst
|
|
464
|
+
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
|
|
465
|
+
:target: https://github.com/astral-sh/ruff
|
|
466
|
+
:alt: Ruff
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
...or, as HTML:
|
|
470
|
+
|
|
471
|
+
```html
|
|
472
|
+
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" style="max-width:100%;"></a>
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
## License<a id="license"></a>
|
|
476
|
+
|
|
477
|
+
This repository is licensed under the [MIT License](https://github.com/astral-sh/ruff/blob/main/LICENSE)
|
|
478
|
+
|
|
479
|
+
<div align="center">
|
|
480
|
+
<a target="_blank" href="https://astral.sh" style="background:none">
|
|
481
|
+
<img src="https://raw.githubusercontent.com/astral-sh/ruff/main/assets/svg/Astral.svg" alt="Made by Astral">
|
|
482
|
+
</a>
|
|
483
|
+
</div>
|
|
484
|
+
|