ruff-sync 0.1.6.dev4__py3-none-any.whl → 0.1.7.dev2__py3-none-any.whl
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.
- ruff_sync/cli.py +1 -1
- ruff_sync/config_io.py +1 -1
- ruff_sync/core.py +7 -6
- {ruff_sync-0.1.6.dev4.dist-info → ruff_sync-0.1.7.dev2.dist-info}/METADATA +7 -2
- {ruff_sync-0.1.6.dev4.dist-info → ruff_sync-0.1.7.dev2.dist-info}/RECORD +8 -8
- {ruff_sync-0.1.6.dev4.dist-info → ruff_sync-0.1.7.dev2.dist-info}/WHEEL +1 -1
- {ruff_sync-0.1.6.dev4.dist-info → ruff_sync-0.1.7.dev2.dist-info}/entry_points.txt +0 -0
- {ruff_sync-0.1.6.dev4.dist-info → ruff_sync-0.1.7.dev2.dist-info}/licenses/LICENSE.md +0 -0
ruff_sync/cli.py
CHANGED
ruff_sync/config_io.py
CHANGED
ruff_sync/core.py
CHANGED
|
@@ -22,9 +22,9 @@ from typing import (
|
|
|
22
22
|
overload,
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
-
import httpx
|
|
25
|
+
import httpx2 as httpx
|
|
26
26
|
import tomlkit
|
|
27
|
-
from
|
|
27
|
+
from httpx2 import URL
|
|
28
28
|
from tomlkit import TOMLDocument, table
|
|
29
29
|
from tomlkit.items import Item, Table
|
|
30
30
|
from tomlkit.toml_file import TOMLFile
|
|
@@ -330,12 +330,13 @@ def _get_discovery_candidates(base: pathlib.Path) -> list[pathlib.Path]: ...
|
|
|
330
330
|
def _get_discovery_candidates(base: URL | pathlib.Path) -> list[URL] | list[pathlib.Path]:
|
|
331
331
|
"""Return a list of candidate configuration files, prioritizing the requested one."""
|
|
332
332
|
# If it's a URL, use PurePosixPath. If it's a Path, use it directly.
|
|
333
|
-
|
|
333
|
+
is_url = not isinstance(base, pathlib.Path)
|
|
334
|
+
name = base.path if is_url else base.name
|
|
334
335
|
if pathlib.PurePosixPath(name).name != RuffConfigFileName.PYPROJECT_TOML:
|
|
335
336
|
return [base] # type: ignore[return-value]
|
|
336
337
|
|
|
337
338
|
# Try pyproject.toml first, then fall back to ruff.toml variants.
|
|
338
|
-
if
|
|
339
|
+
if is_url:
|
|
339
340
|
base_url = base.join(".")
|
|
340
341
|
return [base] + [
|
|
341
342
|
base_url.join(str(f))
|
|
@@ -935,7 +936,7 @@ async def check(
|
|
|
935
936
|
Examples:
|
|
936
937
|
>>> import asyncio
|
|
937
938
|
>>> from ruff_sync.cli import Arguments
|
|
938
|
-
>>> from
|
|
939
|
+
>>> from httpx2 import URL
|
|
939
940
|
>>> import pathlib
|
|
940
941
|
>>> args = Arguments(
|
|
941
942
|
... command="check",
|
|
@@ -1122,7 +1123,7 @@ async def pull(
|
|
|
1122
1123
|
Examples:
|
|
1123
1124
|
>>> import asyncio
|
|
1124
1125
|
>>> from ruff_sync.cli import Arguments
|
|
1125
|
-
>>> from
|
|
1126
|
+
>>> from httpx2 import URL
|
|
1126
1127
|
>>> import pathlib
|
|
1127
1128
|
>>> args = Arguments(
|
|
1128
1129
|
... command="pull",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ruff-sync
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7.dev2
|
|
4
4
|
Summary: Synchronize Ruff linter configuration across projects
|
|
5
5
|
Project-URL: Homepage, https://github.com/Kilo59/ruff-sync
|
|
6
6
|
Project-URL: Documentation, https://kilo59.github.io/ruff-sync/
|
|
@@ -24,7 +24,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.14
|
|
25
25
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
26
26
|
Requires-Python: >=3.10
|
|
27
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: httpx2>=2.3.0
|
|
28
28
|
Requires-Dist: tomlkit<2.0.0,>=0.12.3
|
|
29
29
|
Requires-Dist: typing-extensions>=4.5.0
|
|
30
30
|
Provides-Extra: tui
|
|
@@ -34,12 +34,15 @@ Description-Content-Type: text/markdown
|
|
|
34
34
|
<p align="center">
|
|
35
35
|
<img src="https://raw.githubusercontent.com/Kilo59/ruff-sync/main/docs/assets/ruff_sync_banner.png" alt="ruff-sync banner" style="max-width: 600px; width: 100%; height: auto; margin-bottom: 1rem;">
|
|
36
36
|
<br>
|
|
37
|
+
<img src="https://raw.githubusercontent.com/Kilo59/ruff-sync/main/docs/assets/recordings/pull_basic.gif" alt="ruff-sync pull demo" style="max-width: 600px; width: 100%; height: auto;">
|
|
38
|
+
<br>
|
|
37
39
|
<a href="https://kilo59.github.io/ruff-sync/"><img src="https://img.shields.io/badge/docs-MkDocs-blue.svg" alt="Documentation"></a>
|
|
38
40
|
<a href="https://pypi.org/project/ruff-sync/"><img src="https://img.shields.io/pypi/v/ruff-sync" alt="PyPI version"></a>
|
|
39
41
|
<a href="https://codecov.io/gh/Kilo59/ruff-sync"><img src="https://codecov.io/gh/Kilo59/ruff-sync/graph/badge.svg?token=kMZw0XtoFW" alt="codecov"></a>
|
|
40
42
|
<a href="https://results.pre-commit.ci/latest/github/Kilo59/ruff-sync/main"><img src="https://results.pre-commit.ci/badge/github/Kilo59/ruff-sync/main.svg" alt="pre-commit.ci status"></a>
|
|
41
43
|
<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"></a>
|
|
42
44
|
<a href="https://wily.readthedocs.io/"><img src="https://img.shields.io/badge/%F0%9F%A6%8A%20wily-passing-brightgreen.svg" alt="Wily"></a>
|
|
45
|
+
<a href="https://codspeed.io/Kilo59/ruff-sync?utm_source=badge"><img src="https://img.shields.io/endpoint?url=https://codspeed.io/badge.json" alt="CodSpeed"/></a>
|
|
43
46
|
</p>
|
|
44
47
|
|
|
45
48
|
# ruff-sync
|
|
@@ -315,6 +318,8 @@ See the [Pre-commit Guide](https://kilo59.github.io/ruff-sync/stable/pre-commit/
|
|
|
315
318
|
|
|
316
319
|
## CI Integration
|
|
317
320
|
|
|
321
|
+

|
|
322
|
+
|
|
318
323
|
The `check` command is designed for use in CI pipelines. Add it as a step to catch config drift before it merges. See the [CI Integration Guide](https://kilo59.github.io/ruff-sync/stable/ci-integration/) for more details.
|
|
319
324
|
|
|
320
325
|
```yaml
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
ruff_sync/__init__.py,sha256=M_1YK0BcPzlLlxlBOEPEBTCkAVm37r-yoQzGGZnfQ7Y,1206
|
|
2
2
|
ruff_sync/__main__.py,sha256=oMIbv9ywToleBKJrZ-GMo_KhM4lHg02nJe7t6neWzJE,179
|
|
3
|
-
ruff_sync/cli.py,sha256=
|
|
4
|
-
ruff_sync/config_io.py,sha256=
|
|
3
|
+
ruff_sync/cli.py,sha256=IICm0f60_-fKRjFH3gMLUn3sK9yxB9auNglI7E6P-WU,25346
|
|
4
|
+
ruff_sync/config_io.py,sha256=Hfwo0VC2rbs1ToXPwB0_oQae__opyj-Us8pDsgI3-w0,4349
|
|
5
5
|
ruff_sync/constants.py,sha256=g7ZU8mGdQ2682tKQuKkhRaTRRmg0K2vMVp3Ljs60D70,5822
|
|
6
|
-
ruff_sync/core.py,sha256=
|
|
6
|
+
ruff_sync/core.py,sha256=69AQ0YraOtl3KQ0fSeBtqpw-LPBMRHV5G2QQr9P_A0k,44309
|
|
7
7
|
ruff_sync/dependencies.py,sha256=RpJXAsrB-Y-ol_ZH4U92XIuyq8_bWaYwp9sn9KpxraA,2096
|
|
8
8
|
ruff_sync/formatters.py,sha256=A4p2XAyc-xnteUmdtRXbp63fIjT9MdyKF6qKvcyNMho,29908
|
|
9
9
|
ruff_sync/pre_commit.py,sha256=0ltXUkmocbrSwwf6cPbNc_K5K9n-gvou98xJy9YUhr0,5303
|
|
@@ -17,8 +17,8 @@ ruff_sync/tui/screens.py,sha256=NVIlqNIr64JrFFWeec7usqJCb1x41NEmSfRZGeEcwuo,5557
|
|
|
17
17
|
ruff_sync/tui/themes.py,sha256=-x9u_8iZPa1XZuo8O_tWVHyCImN9Qs9F7xPhl0VLwZw,654
|
|
18
18
|
ruff_sync/tui/types_.py,sha256=poNUBJotgUso2IkUi3nXUuxz6wv1goFWZimj4VttdJE,8271
|
|
19
19
|
ruff_sync/tui/widgets.py,sha256=2m3gyH4xDBpM0CK-5eQmmUCZXYKJujrbyVkFTxqmHcg,9760
|
|
20
|
-
ruff_sync-0.1.
|
|
21
|
-
ruff_sync-0.1.
|
|
22
|
-
ruff_sync-0.1.
|
|
23
|
-
ruff_sync-0.1.
|
|
24
|
-
ruff_sync-0.1.
|
|
20
|
+
ruff_sync-0.1.7.dev2.dist-info/METADATA,sha256=iysOAshz9XPsmyasNIGUE_zkL8vK8rQ4gUmxLeOVOn0,23134
|
|
21
|
+
ruff_sync-0.1.7.dev2.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
22
|
+
ruff_sync-0.1.7.dev2.dist-info/entry_points.txt,sha256=QQ0pjxMIN0vp5EmNFkyb-1Yk8JOIkid8zAPN3IpAExA,78
|
|
23
|
+
ruff_sync-0.1.7.dev2.dist-info/licenses/LICENSE.md,sha256=RcCP8t8xyCx2cvMZSLjBrPqJfctciWC6q85ceQAcEfA,1080
|
|
24
|
+
ruff_sync-0.1.7.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|