codesorter 0.2.4__tar.gz → 0.2.5__tar.gz
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.
- {codesorter-0.2.4 → codesorter-0.2.5}/CHANGES.rst +12 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/PKG-INFO +2 -1
- {codesorter-0.2.4 → codesorter-0.2.5}/codesorter/const.py +1 -1
- {codesorter-0.2.4 → codesorter-0.2.5}/docs/contributing/pre_commit.rst +3 -3
- {codesorter-0.2.4 → codesorter-0.2.5}/pyproject.toml +3 -3
- {codesorter-0.2.4 → codesorter-0.2.5}/uv.lock +3 -7
- codesorter-0.2.4/.libcst.codemod.yaml +0 -36
- {codesorter-0.2.4 → codesorter-0.2.5}/.github/dependabot.yml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.github/workflows/ci.yml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.github/workflows/pre-commit_autoupdate.yml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.github/workflows/prepare_release.yml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.github/workflows/pypi.yml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.github/workflows/scorecard.yml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.github/workflows/stale_action.yml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.github/workflows/tag_release.yml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.gitignore +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.pre-commit-config.yaml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.pre-commit-hooks.yaml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.python-version +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/.readthedocs.yaml +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/LICENSE.txt +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/README.rst +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/codesorter/__init__.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/codesorter/cli.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/codesorter/py.typed +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/codesorter/sort_code.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/docs/Makefile +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/docs/code_overview/sort_code.rst +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/docs/conf.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/docs/docutils.conf +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/docs/genindex.rst +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/docs/index.rst +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/docs/make.bat +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/docs/package_info/change_log.rst +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/examples/after_example.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/examples/before_example.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/__init__.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/conftest.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/alias_function_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/alias_function_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/augmented_assignment_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/augmented_assignment_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/barrier_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/barrier_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/basic_function_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/basic_function_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/class_global_dependency_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/class_global_dependency_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/class_inheritance_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/class_inheritance_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/class_method_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/class_method_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/classmethod_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/classmethod_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/comprehension_dependency_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/comprehension_dependency_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/comprehensive_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/comprehensive_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/constant_ordering_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/constant_ordering_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/custom_decorators_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/custom_decorators_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/keyword_arguments_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/keyword_arguments_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/lazy_annotation_cycle_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/lazy_annotation_cycle_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/mixed_decorators_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/mixed_decorators_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/name_rebinding_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/name_rebinding_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/order_sensitive_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/order_sensitive_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/property_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/property_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/pytest_fixtures_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/pytest_fixtures_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/staticmethod_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/staticmethod_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/underscore_ordering_input.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_files/underscore_ordering_output.py +0 -0
- {codesorter-0.2.4 → codesorter-0.2.5}/tests/test_sort_code.py +0 -0
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
codesorter follows `semantic versioning <https://semver.org/>`_.
|
|
6
6
|
|
|
7
|
+
********************
|
|
8
|
+
0.2.5 (2026/06/14)
|
|
9
|
+
********************
|
|
10
|
+
|
|
11
|
+
**Changed**
|
|
12
|
+
|
|
13
|
+
- Depend on ``ruff`` directly so the formatter is always installed alongside
|
|
14
|
+
``codesorter``. The CLI shells out to ``ruff format``, which previously only worked
|
|
15
|
+
when ``ruff`` happened to be on ``PATH`` from another source; it is now a runtime
|
|
16
|
+
dependency, so ``codesorter`` is self-contained in a clean environment and in the
|
|
17
|
+
isolated pre-commit hook.
|
|
18
|
+
|
|
7
19
|
********************
|
|
8
20
|
0.2.4 (2026/06/14)
|
|
9
21
|
********************
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codesorter
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: A Python codemod that sorts and organizes code in your files.
|
|
5
5
|
Project-URL: Change Log, https://codesorter.readthedocs.io/en/latest/package_info/change_log.html
|
|
6
6
|
Project-URL: Documentation, https://codesorter.readthedocs.io/
|
|
@@ -51,6 +51,7 @@ Classifier: Typing :: Typed
|
|
|
51
51
|
Requires-Python: >=3.10
|
|
52
52
|
Requires-Dist: libcst<2.0.0,>=1.8.6
|
|
53
53
|
Requires-Dist: pathspec>=1.1.1
|
|
54
|
+
Requires-Dist: ruff>=0.1.2
|
|
54
55
|
Description-Content-Type: text/x-rst
|
|
55
56
|
|
|
56
57
|
############
|
|
@@ -21,9 +21,9 @@ hook so the repository is always sorted by the code on the current branch:
|
|
|
21
21
|
***************************
|
|
22
22
|
|
|
23
23
|
Because the hook uses ``language: system``, it runs the ``codesorter`` executable from
|
|
24
|
-
your environment instead of an isolated one pre-commit manages. CodeSorter
|
|
25
|
-
``ruff format`` as its formatter
|
|
26
|
-
``
|
|
24
|
+
your environment instead of an isolated one pre-commit manages. CodeSorter always
|
|
25
|
+
invokes ``ruff format`` as its formatter, so both ``codesorter`` and ``ruff`` must be on
|
|
26
|
+
``PATH`` when the hook runs.
|
|
27
27
|
|
|
28
28
|
Install the development environment and the git hook:
|
|
29
29
|
|
|
@@ -16,8 +16,7 @@ docs = [
|
|
|
16
16
|
"sphinx-autodoc-typehints>=2.5.0"
|
|
17
17
|
]
|
|
18
18
|
lint = [
|
|
19
|
-
"pre-commit>=4.6.0"
|
|
20
|
-
"ruff>=0.15.17"
|
|
19
|
+
"pre-commit>=4.6.0"
|
|
21
20
|
]
|
|
22
21
|
test = [
|
|
23
22
|
"coverage>=7.14.1",
|
|
@@ -50,7 +49,8 @@ classifiers = [
|
|
|
50
49
|
]
|
|
51
50
|
dependencies = [
|
|
52
51
|
"libcst>=1.8.6,<2.0.0",
|
|
53
|
-
"pathspec>=1.1.1"
|
|
52
|
+
"pathspec>=1.1.1",
|
|
53
|
+
"ruff>=0.1.2"
|
|
54
54
|
]
|
|
55
55
|
description = "A Python codemod that sorts and organizes code in your files."
|
|
56
56
|
dynamic = ["version"]
|
|
@@ -190,6 +190,7 @@ source = { editable = "." }
|
|
|
190
190
|
dependencies = [
|
|
191
191
|
{ name = "libcst" },
|
|
192
192
|
{ name = "pathspec" },
|
|
193
|
+
{ name = "ruff" },
|
|
193
194
|
]
|
|
194
195
|
|
|
195
196
|
[package.dev-dependencies]
|
|
@@ -199,7 +200,6 @@ dev = [
|
|
|
199
200
|
{ name = "pre-commit" },
|
|
200
201
|
{ name = "pyright" },
|
|
201
202
|
{ name = "pytest" },
|
|
202
|
-
{ name = "ruff" },
|
|
203
203
|
{ name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
|
|
204
204
|
{ name = "sphinx", version = "9.0.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" },
|
|
205
205
|
{ name = "sphinx", version = "9.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" },
|
|
@@ -219,7 +219,6 @@ docs = [
|
|
|
219
219
|
]
|
|
220
220
|
lint = [
|
|
221
221
|
{ name = "pre-commit" },
|
|
222
|
-
{ name = "ruff" },
|
|
223
222
|
]
|
|
224
223
|
test = [
|
|
225
224
|
{ name = "coverage" },
|
|
@@ -235,6 +234,7 @@ type = [
|
|
|
235
234
|
requires-dist = [
|
|
236
235
|
{ name = "libcst", specifier = ">=1.8.6,<2.0.0" },
|
|
237
236
|
{ name = "pathspec", specifier = ">=1.1.1" },
|
|
237
|
+
{ name = "ruff", specifier = ">=0.1.2" },
|
|
238
238
|
]
|
|
239
239
|
|
|
240
240
|
[package.metadata.requires-dev]
|
|
@@ -244,7 +244,6 @@ dev = [
|
|
|
244
244
|
{ name = "pre-commit", specifier = ">=4.6.0" },
|
|
245
245
|
{ name = "pyright", specifier = ">=1.1.410" },
|
|
246
246
|
{ name = "pytest", specifier = ">=9.0.3" },
|
|
247
|
-
{ name = "ruff", specifier = ">=0.15.17" },
|
|
248
247
|
{ name = "sphinx", specifier = ">=8.1.3" },
|
|
249
248
|
{ name = "sphinx-autodoc-typehints", specifier = ">=2.5.0" },
|
|
250
249
|
{ name = "tox-uv", specifier = ">=1.35.2" },
|
|
@@ -254,10 +253,7 @@ docs = [
|
|
|
254
253
|
{ name = "sphinx", specifier = ">=8.1.3" },
|
|
255
254
|
{ name = "sphinx-autodoc-typehints", specifier = ">=2.5.0" },
|
|
256
255
|
]
|
|
257
|
-
lint = [
|
|
258
|
-
{ name = "pre-commit", specifier = ">=4.6.0" },
|
|
259
|
-
{ name = "ruff", specifier = ">=0.15.17" },
|
|
260
|
-
]
|
|
256
|
+
lint = [{ name = "pre-commit", specifier = ">=4.6.0" }]
|
|
261
257
|
test = [
|
|
262
258
|
{ name = "coverage", specifier = ">=7.14.1" },
|
|
263
259
|
{ name = "pytest", specifier = ">=9.0.3" },
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# String that LibCST should look for in code which indicates that the
|
|
2
|
-
# module is generated code.
|
|
3
|
-
generated_code_marker: '@generated'
|
|
4
|
-
# Command line and arguments for invoking a code formatter. Anything
|
|
5
|
-
# specified here must be capable of taking code via stdin and returning
|
|
6
|
-
# formatted code via stdout.
|
|
7
|
-
formatter: ['ruff', 'format', '-']
|
|
8
|
-
# List of regex patterns which LibCST will evaluate against filenames to
|
|
9
|
-
# determine if the module should be touched.
|
|
10
|
-
blacklist_patterns:
|
|
11
|
-
- '.*/\.bzr/.*'
|
|
12
|
-
- '.*/\.direnv/.*'
|
|
13
|
-
- '.*/\.eggs/.*'
|
|
14
|
-
- '.*/\.git/.*'
|
|
15
|
-
- '.*/\.hg/.*'
|
|
16
|
-
- '.*/\.mypy_cache/.*'
|
|
17
|
-
- '.*/\.nox/.*'
|
|
18
|
-
- '.*/\.pytest_cache/.*'
|
|
19
|
-
- '.*/\.ruff_cache/.*'
|
|
20
|
-
- '.*/\.svn/.*'
|
|
21
|
-
- '.*/\.tox/.*'
|
|
22
|
-
- '.*/\.venv/.*'
|
|
23
|
-
- '.*/__pycache__/.*'
|
|
24
|
-
- '.*/__pypackages__/.*'
|
|
25
|
-
- '.*/build/.*'
|
|
26
|
-
- '.*/dist/.*'
|
|
27
|
-
- '.*/env/.*'
|
|
28
|
-
- '.*/node_modules/.*'
|
|
29
|
-
- '.*/venv/.*'
|
|
30
|
-
# List of modules that contain codemods inside of them.
|
|
31
|
-
modules:
|
|
32
|
-
- 'codesorter'
|
|
33
|
-
# Absolute or relative path of the repository root, used for providing
|
|
34
|
-
# full-repo metadata. Relative paths should be specified with this file
|
|
35
|
-
# location as the base.
|
|
36
|
-
repo_root: '.'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|