ruff-sync 0.0.4.dev1__tar.gz → 0.0.5.dev2__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.
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/.github/workflows/ci.yaml +1 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/.github/workflows/complexity.yaml +8 -12
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/PKG-INFO +29 -17
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/README.md +27 -16
- ruff_sync-0.0.5.dev2/configs/fastapi/ruff.toml +150 -0
- ruff_sync-0.0.5.dev2/configs/kitchen-sink/ruff.toml +262 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/pyproject.toml +9 -2
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/ruff_sync.py +163 -49
- ruff_sync-0.0.5.dev2/tests/conftest.py +12 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_basic.py +36 -21
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_check.py +6 -6
- ruff_sync-0.0.5.dev2/tests/test_deprecation.py +213 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_e2e.py +6 -6
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_scaffold.py +6 -6
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_url_handling.py +107 -2
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/uv.lock +3 -1
- ruff_sync-0.0.4.dev1/tests/test_url_parsing.py +0 -31
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/.agents/TESTING.md +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/.agents/workflows/add-test-case.md +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/.git-blame-ignore-revs +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/.github/dependabot.yml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/.gitignore +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/.pre-commit-config.yaml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/AGENTS.md +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/LICENSE.md +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/codecov.yml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/ruff_sync_banner.png +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/scripts/check_dogfood.sh +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/scripts/gitclone_dogfood.sh +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/scripts/pull_dogfood.sh +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tasks.py +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/__init__.py +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/no_changes_final.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/no_changes_initial.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/no_changes_upstream.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/no_dotted_keys_final.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/no_dotted_keys_initial.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/no_dotted_keys_upstream.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/no_ruff_cfg_final.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/no_ruff_cfg_initial.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/no_ruff_cfg_upstream.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/readme_excludes_final.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/readme_excludes_initial.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/readme_excludes_upstream.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/standard_final.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/standard_initial.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/lifecycle_tomls/standard_upstream.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/ruff.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_config_validation.py +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_corner_cases.py +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_git_fetch.py +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_project.py +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_toml_operations.py +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/test_whitespace.py +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/w_ruff_sync_cfg/pyproject.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/wo_ruff_cfg/pyproject.toml +0 -0
- {ruff_sync-0.0.4.dev1 → ruff_sync-0.0.5.dev2}/tests/wo_ruff_sync_cfg/pyproject.toml +0 -0
|
@@ -88,6 +88,7 @@ jobs:
|
|
|
88
88
|
ruff-sync --version
|
|
89
89
|
ruff-sync https://github.com/Kilo59/ruff-sync
|
|
90
90
|
ruff-sync check https://github.com/Kilo59/ruff-sync
|
|
91
|
+
! ruff-sync check --semantic https://github.com/Kilo59/ruff-sync --path configs/kitchen-sink
|
|
91
92
|
|
|
92
93
|
publish:
|
|
93
94
|
name: Build and publish to PyPI
|
|
@@ -12,14 +12,13 @@ jobs:
|
|
|
12
12
|
|
|
13
13
|
steps:
|
|
14
14
|
- name: Checkout repository
|
|
15
|
-
uses: actions/checkout@
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
16
|
with:
|
|
17
17
|
fetch-depth: 0
|
|
18
|
-
ref: ${{ github.event.pull_request.head.ref }}
|
|
19
18
|
- name: Set up Python
|
|
20
|
-
uses: actions/setup-python@
|
|
19
|
+
uses: actions/setup-python@v5
|
|
21
20
|
with:
|
|
22
|
-
python-version: 3.
|
|
21
|
+
python-version: "3.10"
|
|
23
22
|
- name: Install Wily
|
|
24
23
|
run: pip install 'wily>=1.25.0'
|
|
25
24
|
- name: Build cache and diff
|
|
@@ -33,26 +32,23 @@ jobs:
|
|
|
33
32
|
DIFF="${DIFF//'%'/'%25'}"
|
|
34
33
|
DIFF="${DIFF//$'\n'/'%0A'}"
|
|
35
34
|
DIFF="${DIFF//$'\r'/'%0D'}"
|
|
36
|
-
echo "
|
|
37
|
-
- name: Find current PR
|
|
38
|
-
uses: jwalton/gh-find-current-pr@v1
|
|
39
|
-
id: findPr
|
|
35
|
+
echo "diff=$DIFF" >> "$GITHUB_OUTPUT"
|
|
40
36
|
- name: Add Wily PR Comment
|
|
41
37
|
uses: marocchino/sticky-pull-request-comment@v2
|
|
42
|
-
if:
|
|
38
|
+
if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.number && steps.wily.outputs.diff != ''
|
|
43
39
|
with:
|
|
44
40
|
recreate: true
|
|
45
|
-
number: ${{
|
|
41
|
+
number: ${{ github.event.pull_request.number }}
|
|
46
42
|
message: |
|
|
47
43
|
```
|
|
48
44
|
${{ steps.wily.outputs.diff }}
|
|
49
45
|
```
|
|
50
46
|
- name: Add Wily PR Comment
|
|
51
47
|
uses: marocchino/sticky-pull-request-comment@v2
|
|
52
|
-
if:
|
|
48
|
+
if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.number && steps.wily.outputs.diff == ''
|
|
53
49
|
with:
|
|
54
50
|
recreate: true
|
|
55
|
-
number: ${{
|
|
51
|
+
number: ${{ github.event.pull_request.number }}
|
|
56
52
|
message: |
|
|
57
53
|
```
|
|
58
54
|
Wily: No changes in complexity detected.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ruff-sync
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.5.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://github.com/Kilo59/ruff-sync#readme
|
|
@@ -26,6 +26,7 @@ Classifier: Topic :: Software Development :: Quality Assurance
|
|
|
26
26
|
Requires-Python: >=3.10
|
|
27
27
|
Requires-Dist: httpx<1.0.0,>=0.27.0
|
|
28
28
|
Requires-Dist: tomlkit<2.0.0,>=0.12.3
|
|
29
|
+
Requires-Dist: typing-extensions>=4.5.0
|
|
29
30
|
Description-Content-Type: text/markdown
|
|
30
31
|
|
|
31
32
|
<p align="center">
|
|
@@ -56,7 +57,6 @@ Description-Content-Type: text/markdown
|
|
|
56
57
|
- [CI Integration](#ci-integration)
|
|
57
58
|
- [Example Workflow](#example-workflow)
|
|
58
59
|
- [Detailed Check Logic](#detailed-check-logic)
|
|
59
|
-
- [Contributing](#contributing)
|
|
60
60
|
- [Dogfooding](#dogfooding)
|
|
61
61
|
- [License](#license)
|
|
62
62
|
|
|
@@ -130,14 +130,6 @@ With [pip](https://pip.pypa.io/en/stable/):
|
|
|
130
130
|
pip install ruff-sync
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
#### From Source (Bleeding Edge)
|
|
134
|
-
|
|
135
|
-
If you want the latest development version:
|
|
136
|
-
|
|
137
|
-
```console
|
|
138
|
-
uv tool install git+https://github.com/Kilo59/ruff-sync
|
|
139
|
-
```
|
|
140
|
-
|
|
141
133
|
### Usage
|
|
142
134
|
|
|
143
135
|
```console
|
|
@@ -198,7 +190,7 @@ exclude = [
|
|
|
198
190
|
```
|
|
199
191
|
|
|
200
192
|
This sets the default upstream and exclusions so you don't need to pass them on the command line every time.
|
|
201
|
-
|
|
193
|
+
_Note: Any explicitly provided CLI arguments will override the values in `pyproject.toml`._
|
|
202
194
|
|
|
203
195
|
### Advanced Configuration
|
|
204
196
|
|
|
@@ -220,8 +212,11 @@ exclude = [
|
|
|
220
212
|
branch = "develop"
|
|
221
213
|
|
|
222
214
|
# A directory prefix to use when looking for a configuration file in a repository. (Default: "")
|
|
223
|
-
# Useful if the upstream
|
|
215
|
+
# Useful if the upstream config is not at the repository root.
|
|
224
216
|
path = "config/ruff"
|
|
217
|
+
|
|
218
|
+
# The local target directory or file to sync into. (Default: ".")
|
|
219
|
+
to = "."
|
|
225
220
|
```
|
|
226
221
|
|
|
227
222
|
## CI Integration
|
|
@@ -268,6 +263,24 @@ git diff pyproject.toml # review the changes
|
|
|
268
263
|
git commit -am "sync ruff config from upstream"
|
|
269
264
|
```
|
|
270
265
|
|
|
266
|
+
### Curated Examples
|
|
267
|
+
|
|
268
|
+
While `ruff-sync` is designed to sync from _any_ repository or URL of your choosing, this repository also provides a few curated configurations in the [`configs/`](./configs/) directory that you can use directly.
|
|
269
|
+
|
|
270
|
+
For example, to sync an exhaustive "kitchen-sink" configuration that explicitly enables all rules and documents them:
|
|
271
|
+
|
|
272
|
+
```console
|
|
273
|
+
ruff-sync https://github.com/Kilo59/ruff-sync/blob/main/configs/kitchen-sink/ruff.toml
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Or configure it using `pyproject.toml` so it's always the default for your local project:
|
|
277
|
+
|
|
278
|
+
```toml
|
|
279
|
+
[tool.ruff-sync]
|
|
280
|
+
upstream = "https://github.com/Kilo59/ruff-sync"
|
|
281
|
+
path = "configs/kitchen-sink"
|
|
282
|
+
```
|
|
283
|
+
|
|
271
284
|
## Bootstrapping a New Project
|
|
272
285
|
|
|
273
286
|
By default, `ruff-sync` requires an existing configuration file (`pyproject.toml` or `ruff.toml`) to merge into. If you are starting a fresh project and want to initialize it with your organization's Ruff settings, you can use the `--init` flag to scaffold a new file automatically.
|
|
@@ -277,8 +290,7 @@ By default, `ruff-sync` requires an existing configuration file (`pyproject.toml
|
|
|
277
290
|
ruff-sync pull https://github.com/my-org/standards --init
|
|
278
291
|
```
|
|
279
292
|
|
|
280
|
-
`ruff-sync` seamlessly supports both `pyproject.toml` and standalone `ruff.toml` (or `.ruff.toml`) files. If your upstream source or your local target is a `ruff.toml`, it will automatically adapt and sync the root configuration rather than looking for a `[tool.ruff]` section.
|
|
281
|
-
|
|
293
|
+
`ruff-sync` seamlessly supports both `pyproject.toml` and standalone `ruff.toml` (or `.ruff.toml`) files. If your local target is a directory, it will look for configuration files in the following order: `ruff.toml` -> `.ruff.toml` -> `pyproject.toml`. If your upstream source or your local target is a `ruff.toml`, it will automatically adapt and sync the root configuration rather than looking for a `[tool.ruff]` section.
|
|
282
294
|
|
|
283
295
|
## Detailed Check Logic
|
|
284
296
|
|
|
@@ -286,9 +298,9 @@ When you run `ruff-sync check`, it follows this process to determine if your pro
|
|
|
286
298
|
|
|
287
299
|
```mermaid
|
|
288
300
|
flowchart TD
|
|
289
|
-
Start([Start]) --> Local[Read Local
|
|
290
|
-
Local --> Upstream[Download Upstream
|
|
291
|
-
Upstream --> Extract[Extract tool.ruff section]
|
|
301
|
+
Start([Start]) --> Local[Read Local Configuration]
|
|
302
|
+
Local --> Upstream[Download Upstream Configuration]
|
|
303
|
+
Upstream --> Extract[Extract tool.ruff section if needed]
|
|
292
304
|
Extract --> Exclude[Apply Exclusions]
|
|
293
305
|
Exclude --> Merge[Perform in-memory Merge]
|
|
294
306
|
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
- [CI Integration](#ci-integration)
|
|
27
27
|
- [Example Workflow](#example-workflow)
|
|
28
28
|
- [Detailed Check Logic](#detailed-check-logic)
|
|
29
|
-
- [Contributing](#contributing)
|
|
30
29
|
- [Dogfooding](#dogfooding)
|
|
31
30
|
- [License](#license)
|
|
32
31
|
|
|
@@ -100,14 +99,6 @@ With [pip](https://pip.pypa.io/en/stable/):
|
|
|
100
99
|
pip install ruff-sync
|
|
101
100
|
```
|
|
102
101
|
|
|
103
|
-
#### From Source (Bleeding Edge)
|
|
104
|
-
|
|
105
|
-
If you want the latest development version:
|
|
106
|
-
|
|
107
|
-
```console
|
|
108
|
-
uv tool install git+https://github.com/Kilo59/ruff-sync
|
|
109
|
-
```
|
|
110
|
-
|
|
111
102
|
### Usage
|
|
112
103
|
|
|
113
104
|
```console
|
|
@@ -168,7 +159,7 @@ exclude = [
|
|
|
168
159
|
```
|
|
169
160
|
|
|
170
161
|
This sets the default upstream and exclusions so you don't need to pass them on the command line every time.
|
|
171
|
-
|
|
162
|
+
_Note: Any explicitly provided CLI arguments will override the values in `pyproject.toml`._
|
|
172
163
|
|
|
173
164
|
### Advanced Configuration
|
|
174
165
|
|
|
@@ -190,8 +181,11 @@ exclude = [
|
|
|
190
181
|
branch = "develop"
|
|
191
182
|
|
|
192
183
|
# A directory prefix to use when looking for a configuration file in a repository. (Default: "")
|
|
193
|
-
# Useful if the upstream
|
|
184
|
+
# Useful if the upstream config is not at the repository root.
|
|
194
185
|
path = "config/ruff"
|
|
186
|
+
|
|
187
|
+
# The local target directory or file to sync into. (Default: ".")
|
|
188
|
+
to = "."
|
|
195
189
|
```
|
|
196
190
|
|
|
197
191
|
## CI Integration
|
|
@@ -238,6 +232,24 @@ git diff pyproject.toml # review the changes
|
|
|
238
232
|
git commit -am "sync ruff config from upstream"
|
|
239
233
|
```
|
|
240
234
|
|
|
235
|
+
### Curated Examples
|
|
236
|
+
|
|
237
|
+
While `ruff-sync` is designed to sync from _any_ repository or URL of your choosing, this repository also provides a few curated configurations in the [`configs/`](./configs/) directory that you can use directly.
|
|
238
|
+
|
|
239
|
+
For example, to sync an exhaustive "kitchen-sink" configuration that explicitly enables all rules and documents them:
|
|
240
|
+
|
|
241
|
+
```console
|
|
242
|
+
ruff-sync https://github.com/Kilo59/ruff-sync/blob/main/configs/kitchen-sink/ruff.toml
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Or configure it using `pyproject.toml` so it's always the default for your local project:
|
|
246
|
+
|
|
247
|
+
```toml
|
|
248
|
+
[tool.ruff-sync]
|
|
249
|
+
upstream = "https://github.com/Kilo59/ruff-sync"
|
|
250
|
+
path = "configs/kitchen-sink"
|
|
251
|
+
```
|
|
252
|
+
|
|
241
253
|
## Bootstrapping a New Project
|
|
242
254
|
|
|
243
255
|
By default, `ruff-sync` requires an existing configuration file (`pyproject.toml` or `ruff.toml`) to merge into. If you are starting a fresh project and want to initialize it with your organization's Ruff settings, you can use the `--init` flag to scaffold a new file automatically.
|
|
@@ -247,8 +259,7 @@ By default, `ruff-sync` requires an existing configuration file (`pyproject.toml
|
|
|
247
259
|
ruff-sync pull https://github.com/my-org/standards --init
|
|
248
260
|
```
|
|
249
261
|
|
|
250
|
-
`ruff-sync` seamlessly supports both `pyproject.toml` and standalone `ruff.toml` (or `.ruff.toml`) files. If your upstream source or your local target is a `ruff.toml`, it will automatically adapt and sync the root configuration rather than looking for a `[tool.ruff]` section.
|
|
251
|
-
|
|
262
|
+
`ruff-sync` seamlessly supports both `pyproject.toml` and standalone `ruff.toml` (or `.ruff.toml`) files. If your local target is a directory, it will look for configuration files in the following order: `ruff.toml` -> `.ruff.toml` -> `pyproject.toml`. If your upstream source or your local target is a `ruff.toml`, it will automatically adapt and sync the root configuration rather than looking for a `[tool.ruff]` section.
|
|
252
263
|
|
|
253
264
|
## Detailed Check Logic
|
|
254
265
|
|
|
@@ -256,9 +267,9 @@ When you run `ruff-sync check`, it follows this process to determine if your pro
|
|
|
256
267
|
|
|
257
268
|
```mermaid
|
|
258
269
|
flowchart TD
|
|
259
|
-
Start([Start]) --> Local[Read Local
|
|
260
|
-
Local --> Upstream[Download Upstream
|
|
261
|
-
Upstream --> Extract[Extract tool.ruff section]
|
|
270
|
+
Start([Start]) --> Local[Read Local Configuration]
|
|
271
|
+
Local --> Upstream[Download Upstream Configuration]
|
|
272
|
+
Upstream --> Extract[Extract tool.ruff section if needed]
|
|
262
273
|
Extract --> Exclude[Apply Exclusions]
|
|
263
274
|
Exclude --> Merge[Perform in-memory Merge]
|
|
264
275
|
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# ruff-sync FastAPI Configuration
|
|
2
|
+
# https://github.com/Kilo59/ruff-sync
|
|
3
|
+
#
|
|
4
|
+
# This is a Ruff configuration tailored for FastAPI / Web App development.
|
|
5
|
+
# It enables rules directly relevant to web development and async Python.
|
|
6
|
+
#
|
|
7
|
+
# Usage (direct Ruff config, assuming this file is vendored into your repo):
|
|
8
|
+
# extend = "configs/fastapi/ruff.toml"
|
|
9
|
+
#
|
|
10
|
+
# Usage (with ruff-sync in pyproject.toml):
|
|
11
|
+
# [tool.ruff-sync]
|
|
12
|
+
# path = "configs/fastapi/ruff.toml"
|
|
13
|
+
|
|
14
|
+
# Same as Black.
|
|
15
|
+
line-length = 88
|
|
16
|
+
indent-width = 4
|
|
17
|
+
|
|
18
|
+
# Assume Python 3.10. Consumers should override this to match their project's Python version.
|
|
19
|
+
target-version = "py310"
|
|
20
|
+
|
|
21
|
+
[lint]
|
|
22
|
+
# Enable rules relevant to web development and async Python.
|
|
23
|
+
select = [
|
|
24
|
+
# https://docs.astral.sh/ruff/rules/#pyflakes-f
|
|
25
|
+
"F", # Pyflakes: Essential checks for Python bugs
|
|
26
|
+
# https://docs.astral.sh/ruff/rules/#error-e
|
|
27
|
+
"E", # pycodestyle errors: PEP8 styling
|
|
28
|
+
# https://docs.astral.sh/ruff/rules/#warning-w
|
|
29
|
+
"W", # pycodestyle warnings: PEP8 styling
|
|
30
|
+
# https://docs.astral.sh/ruff/rules/#mccabe-c90
|
|
31
|
+
"C90", # mccabe: Code complexity (cyclomatic complexity)
|
|
32
|
+
# https://docs.astral.sh/ruff/rules/#isort-i
|
|
33
|
+
"I", # isort: Import sorting
|
|
34
|
+
# https://docs.astral.sh/ruff/rules/#pep8-naming-n
|
|
35
|
+
"N", # pep8-naming: Naming conventions
|
|
36
|
+
# https://docs.astral.sh/ruff/rules/#pydocstyle-d
|
|
37
|
+
"D", # pydocstyle: Docstring conventions
|
|
38
|
+
# https://docs.astral.sh/ruff/rules/#pyupgrade-up
|
|
39
|
+
"UP", # pyupgrade: Upgrade syntax for newer Python versions
|
|
40
|
+
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
|
|
41
|
+
"ANN", # flake8-annotations: Type annotation checks
|
|
42
|
+
# https://docs.astral.sh/ruff/rules/#flake8-async-async
|
|
43
|
+
"ASYNC", # flake8-async: Asynchronous code checks
|
|
44
|
+
# https://docs.astral.sh/ruff/rules/#flake8-bandit-s
|
|
45
|
+
"S", # flake8-bandit: Security testing
|
|
46
|
+
# https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
|
|
47
|
+
"B", # flake8-bugbear: Finding likely bugs and design problems
|
|
48
|
+
# https://docs.astral.sh/ruff/rules/#flake8-pie-pie
|
|
49
|
+
"PIE", # flake8-pie: Misc. lints
|
|
50
|
+
# https://docs.astral.sh/ruff/rules/#flake8-print-t20
|
|
51
|
+
"T20", # flake8-print: Check for Print statements
|
|
52
|
+
# https://docs.astral.sh/ruff/rules/#flake8-return-ret
|
|
53
|
+
"RET", # flake8-return: Check return values
|
|
54
|
+
# https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
|
|
55
|
+
"SIM", # flake8-simplify: Code simplification
|
|
56
|
+
# https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
|
|
57
|
+
"G", # flake8-logging-format: Validate logging format strings
|
|
58
|
+
# https://docs.astral.sh/ruff/rules/#flake8-quotes-q
|
|
59
|
+
"Q", # flake8-quotes: Lint for quotes
|
|
60
|
+
# https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
|
|
61
|
+
"PT", # flake8-pytest-style: Pytest style checks
|
|
62
|
+
# https://docs.astral.sh/ruff/rules/#pylint-pl
|
|
63
|
+
"PL", # Pylint: Pylint rules
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
# Ignore rules that conflict with the Ruff formatter.
|
|
67
|
+
# See: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
|
|
68
|
+
ignore = [
|
|
69
|
+
"W191", # tab-indentation
|
|
70
|
+
"E111", # indentation-with-invalid-multiple
|
|
71
|
+
"E114", # indentation-with-invalid-multiple-comment
|
|
72
|
+
"E117", # over-indented
|
|
73
|
+
"D206", # docstring-tab-indentation
|
|
74
|
+
"D300", # triple-single-quotes
|
|
75
|
+
"Q000", # bad-quotes-inline-string
|
|
76
|
+
"Q001", # bad-quotes-multiline-string
|
|
77
|
+
"Q002", # bad-quotes-docstring
|
|
78
|
+
"Q003", # avoidable-escaped-quote
|
|
79
|
+
"Q004", # unnecessary-escaped-quote
|
|
80
|
+
"COM812", # missing-trailing-comma
|
|
81
|
+
"COM819", # prohibited-trailing-comma
|
|
82
|
+
"ISC001", # single-line-implicit-string-concatenation
|
|
83
|
+
"ISC002", # multi-line-implicit-string-concatenation
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
# Allow autofix for all enabled rules.
|
|
87
|
+
fixable = ["ALL"]
|
|
88
|
+
|
|
89
|
+
# Allow unused variables when underscore-prefixed.
|
|
90
|
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
91
|
+
|
|
92
|
+
[lint.mccabe]
|
|
93
|
+
# Flag errors (C901) whenever the complexity level exceeds 10.
|
|
94
|
+
# Default: 10
|
|
95
|
+
max-complexity = 10
|
|
96
|
+
|
|
97
|
+
[lint.pydocstyle]
|
|
98
|
+
# Use Google-style docstrings (common in FastAPI projects).
|
|
99
|
+
# Default: "pep257"
|
|
100
|
+
convention = "google"
|
|
101
|
+
|
|
102
|
+
[lint.flake8-quotes]
|
|
103
|
+
# Use double quotes for inline strings (same as Black).
|
|
104
|
+
# Default: "double"
|
|
105
|
+
inline-quotes = "double"
|
|
106
|
+
# Use double quotes for multiline strings.
|
|
107
|
+
# Default: "double"
|
|
108
|
+
multiline-quotes = "double"
|
|
109
|
+
# Use double quotes for docstrings.
|
|
110
|
+
# Default: "double"
|
|
111
|
+
docstring-quotes = "double"
|
|
112
|
+
# Avoid escaping quotes if the other quote type would save an escape.
|
|
113
|
+
# Default: true
|
|
114
|
+
avoid-escape = true
|
|
115
|
+
|
|
116
|
+
[lint.flake8-pytest-style]
|
|
117
|
+
# Whether to require parentheses for pytest fixtures.
|
|
118
|
+
# Default: true
|
|
119
|
+
fixture-parentheses = true
|
|
120
|
+
# The type of pytest.mark.parametrize names to use: "tuple", "list", or "csv"
|
|
121
|
+
# Default: "tuple"
|
|
122
|
+
parametrize-names-type = "tuple"
|
|
123
|
+
|
|
124
|
+
[lint.pylint]
|
|
125
|
+
# The maximum number of arguments allowed for a function.
|
|
126
|
+
# Default: 5
|
|
127
|
+
max-args = 5
|
|
128
|
+
# The maximum number of branches allowed for a function.
|
|
129
|
+
# Default: 12
|
|
130
|
+
max-branches = 12
|
|
131
|
+
|
|
132
|
+
[lint.pep8-naming]
|
|
133
|
+
# Additional decorators that should be treated as classmethod.
|
|
134
|
+
# Pydantic v1/v2 decorators.
|
|
135
|
+
classmethod-decorators = [
|
|
136
|
+
"pydantic.validator",
|
|
137
|
+
"pydantic.root_validator",
|
|
138
|
+
"pydantic.field_validator",
|
|
139
|
+
"pydantic.model_validator",
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
[format]
|
|
143
|
+
# Like Black, use double quotes for strings.
|
|
144
|
+
quote-style = "double"
|
|
145
|
+
# Like Black, indent with spaces, rather than tabs.
|
|
146
|
+
indent-style = "space"
|
|
147
|
+
# Like Black, respect magic trailing commas.
|
|
148
|
+
skip-magic-trailing-comma = false
|
|
149
|
+
# Like Black, automatically detect the appropriate line ending.
|
|
150
|
+
line-ending = "auto"
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# ruff-sync Kitchen Sink Configuration
|
|
2
|
+
# https://github.com/Kilo59/ruff-sync
|
|
3
|
+
#
|
|
4
|
+
# This file enables ALL possible Ruff rules as of Ruff v0.15.5
|
|
5
|
+
# It explicitly lists all rule categories and provides links to their documentation.
|
|
6
|
+
# This serves as a comprehensive reference for what is possible with Ruff.
|
|
7
|
+
|
|
8
|
+
# Same as Black.
|
|
9
|
+
line-length = 88
|
|
10
|
+
indent-width = 4
|
|
11
|
+
|
|
12
|
+
# Assume Python 3.10. Consumers should override this to match
|
|
13
|
+
# their project's supported Python version.
|
|
14
|
+
target-version = "py310"
|
|
15
|
+
|
|
16
|
+
[lint]
|
|
17
|
+
# Enable all rule categories explicitly.
|
|
18
|
+
select = [
|
|
19
|
+
# https://docs.astral.sh/ruff/rules/#pyflakes-f
|
|
20
|
+
"F", # Pyflakes: Essential checks for python bugs
|
|
21
|
+
# https://docs.astral.sh/ruff/rules/#error-e
|
|
22
|
+
"E", # pycodestyle errors: PEP8 styling
|
|
23
|
+
# https://docs.astral.sh/ruff/rules/#warning-w
|
|
24
|
+
"W", # pycodestyle warnings: PEP8 styling
|
|
25
|
+
# https://docs.astral.sh/ruff/rules/#mccabe-c90
|
|
26
|
+
"C90", # mccabe: Code complexity (cyclomatic complexity)
|
|
27
|
+
# https://docs.astral.sh/ruff/rules/#isort-i
|
|
28
|
+
"I", # isort: Import sorting
|
|
29
|
+
# https://docs.astral.sh/ruff/rules/#pep8-naming-n
|
|
30
|
+
"N", # pep8-naming: Naming conventions
|
|
31
|
+
# https://docs.astral.sh/ruff/rules/#pydocstyle-d
|
|
32
|
+
"D", # pydocstyle: Docstring conventions
|
|
33
|
+
# https://docs.astral.sh/ruff/rules/#pyupgrade-up
|
|
34
|
+
"UP", # pyupgrade: Upgrade syntax for newer Python versions
|
|
35
|
+
# https://docs.astral.sh/ruff/rules/#flake8-2020-ytt
|
|
36
|
+
"YTT", # flake8-2020: Checks for sys.version and sys.version_info usage
|
|
37
|
+
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
|
|
38
|
+
"ANN", # flake8-annotations: Type annotation checks
|
|
39
|
+
# https://docs.astral.sh/ruff/rules/#flake8-async-async
|
|
40
|
+
"ASYNC", # flake8-async: Asynchronous code checks
|
|
41
|
+
# https://docs.astral.sh/ruff/rules/#flake8-bandit-s
|
|
42
|
+
"S", # flake8-bandit: Security testing
|
|
43
|
+
# https://docs.astral.sh/ruff/rules/#flake8-blind-except-ble
|
|
44
|
+
"BLE", # flake8-blind-except: Checks for blind except: statements
|
|
45
|
+
# https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
|
|
46
|
+
"FBT", # flake8-boolean-trap: Boolean trap checks
|
|
47
|
+
# https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
|
|
48
|
+
"B", # flake8-bugbear: Finding likely bugs and design problems
|
|
49
|
+
# https://docs.astral.sh/ruff/rules/#flake8-builtins-a
|
|
50
|
+
"A", # flake8-builtins: Check for python builtins being used as variables or parameters
|
|
51
|
+
# https://docs.astral.sh/ruff/rules/#flake8-commas-com
|
|
52
|
+
"COM", # flake8-commas: Trailing commas checks
|
|
53
|
+
# https://docs.astral.sh/ruff/rules/#flake8-copyright-cpy
|
|
54
|
+
# "CPY", # flake8-copyright: Copyright notice checks (Note: requires `preview = true`)
|
|
55
|
+
# https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
|
|
56
|
+
"C4", # flake8-comprehensions: Write better list/set/dict comprehensions
|
|
57
|
+
# https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
|
|
58
|
+
"DTZ", # flake8-datetimez: Usage of unsafe naive datetime class
|
|
59
|
+
# https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
|
|
60
|
+
"T10", # flake8-debugger: Check for pdb/ipdb imports and set_traces
|
|
61
|
+
# https://docs.astral.sh/ruff/rules/#flake8-django-dj
|
|
62
|
+
"DJ", # flake8-django: Django specific code quality checks
|
|
63
|
+
# https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
|
|
64
|
+
"EM", # flake8-errmsg: Nicer error messages
|
|
65
|
+
# https://docs.astral.sh/ruff/rules/#flake8-executable-exe
|
|
66
|
+
"EXE", # flake8-executable: Executable permissions and shebangs
|
|
67
|
+
# https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
|
|
68
|
+
"FA", # flake8-future-annotations: Verify python 3.7+ from __future__ import annotations
|
|
69
|
+
# https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
|
|
70
|
+
"ISC", # flake8-implicit-str-concat: Implicit string concatenation checks
|
|
71
|
+
# https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
|
|
72
|
+
"ICN", # flake8-import-conventions: Enforce standard naming for standard libraries
|
|
73
|
+
# https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
|
|
74
|
+
"G", # flake8-logging-format: Validate logging format strings
|
|
75
|
+
# https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp
|
|
76
|
+
"INP", # flake8-no-pep420: Ban PEP-420 implicit namespace packages
|
|
77
|
+
# https://docs.astral.sh/ruff/rules/#flake8-pie-pie
|
|
78
|
+
"PIE", # flake8-pie: Misc. lints
|
|
79
|
+
# https://docs.astral.sh/ruff/rules/#flake8-print-t20
|
|
80
|
+
"T20", # flake8-print: Check for Print statements in python files
|
|
81
|
+
# https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
|
|
82
|
+
"PYI", # flake8-pyi: Linting for .pyi files
|
|
83
|
+
# https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
|
|
84
|
+
"PT", # flake8-pytest-style: Checking common style issues or inconsistencies with pytest
|
|
85
|
+
# https://docs.astral.sh/ruff/rules/#flake8-quotes-q
|
|
86
|
+
"Q", # flake8-quotes: Lint for quotes
|
|
87
|
+
# https://docs.astral.sh/ruff/rules/#flake8-raise-rse
|
|
88
|
+
"RSE", # flake8-raise: Find and correct raise statements
|
|
89
|
+
# https://docs.astral.sh/ruff/rules/#flake8-return-ret
|
|
90
|
+
"RET", # flake8-return: Check return values
|
|
91
|
+
# https://docs.astral.sh/ruff/rules/#flake8-self-slf
|
|
92
|
+
"SLF", # flake8-self: Private member access checks
|
|
93
|
+
# https://docs.astral.sh/ruff/rules/#flake8-slots-slot
|
|
94
|
+
"SLOT", # flake8-slots: Require __slots__ for subclasses of immutable types
|
|
95
|
+
# https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
|
|
96
|
+
"SIM", # flake8-simplify: Code simplification
|
|
97
|
+
# https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid
|
|
98
|
+
"TID", # flake8-tidy-imports: Tidy imports
|
|
99
|
+
# https://docs.astral.sh/ruff/rules/#flake8-type-checking-tc
|
|
100
|
+
"TC", # flake8-type-checking: Move imports into type-checking blocks
|
|
101
|
+
# https://docs.astral.sh/ruff/rules/#flake8-gettext-int
|
|
102
|
+
"ARG", # flake8-unused-arguments: Unused argument checks
|
|
103
|
+
# https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
|
|
104
|
+
"PTH", # flake8-use-pathlib: Use pathlib instead of os.path
|
|
105
|
+
# https://docs.astral.sh/ruff/rules/#flake8-todos-td
|
|
106
|
+
"TD", # flake8-todos: TODO comments formatting
|
|
107
|
+
# https://docs.astral.sh/ruff/rules/#flake8-fixme-fix
|
|
108
|
+
"FIX", # flake8-fixme: Check for FIXME, XXX and other developer notes
|
|
109
|
+
# https://docs.astral.sh/ruff/rules/#eradicate-era
|
|
110
|
+
"ERA", # eradicate: Found commented out code
|
|
111
|
+
# https://docs.astral.sh/ruff/rules/#pandas-vet-pd
|
|
112
|
+
"PD", # pandas-vet: Pandas code checks
|
|
113
|
+
# https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
|
|
114
|
+
"PGH", # pygrep-hooks: Pygrep hooks
|
|
115
|
+
# https://docs.astral.sh/ruff/rules/#pylint-pl
|
|
116
|
+
"PL", # Pylint: Pylint rules
|
|
117
|
+
# https://docs.astral.sh/ruff/rules/#tryceratops-try
|
|
118
|
+
"TRY", # tryceratops: Prevent Exception Handling AntiPatterns
|
|
119
|
+
# https://docs.astral.sh/ruff/rules/#flynt-fly
|
|
120
|
+
"FLY", # flynt: Convert string formatting to f-strings
|
|
121
|
+
# https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy
|
|
122
|
+
"NPY", # NumPy-specific rules: NumPy conventions
|
|
123
|
+
# https://docs.astral.sh/ruff/rules/#airflow-air
|
|
124
|
+
"AIR", # Airflow: Airflow best practices
|
|
125
|
+
# https://docs.astral.sh/ruff/rules/#perflint-perf
|
|
126
|
+
"PERF", # Perflint: Performance anti-patterns
|
|
127
|
+
# https://docs.astral.sh/ruff/rules/#refurb-furb
|
|
128
|
+
"FURB", # refurb: Modernize Python code
|
|
129
|
+
# https://docs.astral.sh/ruff/rules/#flake8-logging-log
|
|
130
|
+
"LOG", # flake8-logging: Better logging practices
|
|
131
|
+
# https://docs.astral.sh/ruff/rules/#pydoclint-doc
|
|
132
|
+
# "DOC", # pydoclint: Validate docstrings against function signatures (Note: requires `preview = true`)
|
|
133
|
+
# https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
|
|
134
|
+
"RUF" # Ruff-specific rules: Rules unique to Ruff
|
|
135
|
+
]
|
|
136
|
+
|
|
137
|
+
# We don't ignore any rules in this config, as it aims to be exhaustive.
|
|
138
|
+
# WARNING: Some of the rules enabled above may be mutually exclusive or
|
|
139
|
+
# conflict with each other (e.g., D212 and D213). You will likely need to
|
|
140
|
+
# remove some rules from the `select` list or add them to the `ignore`
|
|
141
|
+
# list below based on your preferences and project conventions.
|
|
142
|
+
#
|
|
143
|
+
# Below is a list of lint rules that conflict with the Ruff formatter.
|
|
144
|
+
# We ignore these by default so `ruff format` will run without warnings.
|
|
145
|
+
# See: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
|
|
146
|
+
ignore = [
|
|
147
|
+
"W191", # tab-indentation
|
|
148
|
+
"E111", # indentation-with-invalid-multiple
|
|
149
|
+
"E114", # indentation-with-invalid-multiple-comment
|
|
150
|
+
"E117", # over-indented
|
|
151
|
+
"D206", # docstring-tab-indentation
|
|
152
|
+
"D300", # triple-single-quotes
|
|
153
|
+
"Q000", # bad-quotes-inline-string
|
|
154
|
+
"Q001", # bad-quotes-multiline-string
|
|
155
|
+
"Q002", # bad-quotes-docstring
|
|
156
|
+
"Q003", # avoidable-escaped-quote
|
|
157
|
+
"Q004", # unnecessary-escaped-quote
|
|
158
|
+
"COM812", # missing-trailing-comma
|
|
159
|
+
"COM819", # prohibited-trailing-comma
|
|
160
|
+
"ISC001", # single-line-implicit-string-concatenation
|
|
161
|
+
"ISC002", # multi-line-implicit-string-concatenation
|
|
162
|
+
]
|
|
163
|
+
|
|
164
|
+
# Allow autofix for all enabled rules (when `--fix`) is provided.
|
|
165
|
+
fixable = ["ALL"]
|
|
166
|
+
unfixable = []
|
|
167
|
+
|
|
168
|
+
# Allow unused variables when underscore-prefixed.
|
|
169
|
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
170
|
+
|
|
171
|
+
[lint.mccabe]
|
|
172
|
+
# Flag errors (`C901`) whenever the complexity level exceeds 10.
|
|
173
|
+
# Default: 10
|
|
174
|
+
max-complexity = 10
|
|
175
|
+
|
|
176
|
+
[lint.pydocstyle]
|
|
177
|
+
# Which style to use for docstrings. Can be "google", "numpy", or "pep257".
|
|
178
|
+
# Default: "pep257"
|
|
179
|
+
convention = "pep257"
|
|
180
|
+
|
|
181
|
+
[lint.flake8-quotes]
|
|
182
|
+
# The style to use for inline strings: "single" or "double"
|
|
183
|
+
# Default: "double"
|
|
184
|
+
inline-quotes = "double"
|
|
185
|
+
# The style to use for multiline strings
|
|
186
|
+
# Default: "double"
|
|
187
|
+
multiline-quotes = "double"
|
|
188
|
+
# The style to use for docstrings
|
|
189
|
+
# Default: "double"
|
|
190
|
+
docstring-quotes = "double"
|
|
191
|
+
# Whether to avoid escaping quotes if the other quote type would save an escape
|
|
192
|
+
# Default: true
|
|
193
|
+
avoid-escape = true
|
|
194
|
+
|
|
195
|
+
[lint.flake8-tidy-imports]
|
|
196
|
+
# Ban absolute imports from specific modules
|
|
197
|
+
# ban-relative-imports = "all" # Default: "parents"
|
|
198
|
+
|
|
199
|
+
[lint.isort]
|
|
200
|
+
# How to group imports: "std", "third-party", "first-party", "local-folder".
|
|
201
|
+
# Default: ["future", "standard-library", "third-party", "first-party", "local-folder"]
|
|
202
|
+
# section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
|
|
203
|
+
|
|
204
|
+
[format]
|
|
205
|
+
# Like Black, use double quotes for strings.
|
|
206
|
+
quote-style = "double"
|
|
207
|
+
|
|
208
|
+
# Like Black, indent with spaces, rather than tabs.
|
|
209
|
+
indent-style = "space"
|
|
210
|
+
|
|
211
|
+
# Like Black, respect magic trailing commas.
|
|
212
|
+
skip-magic-trailing-comma = false
|
|
213
|
+
|
|
214
|
+
# Like Black, automatically detect the appropriate line ending.
|
|
215
|
+
line-ending = "auto"
|
|
216
|
+
|
|
217
|
+
# Enable auto-formatting of code examples in docstrings. Markdown,
|
|
218
|
+
# reStructuredText code/literal blocks and doctests are all supported.
|
|
219
|
+
#
|
|
220
|
+
# This is currently disabled by default, but it is planned for this
|
|
221
|
+
# to be opt-out in the future.
|
|
222
|
+
docstring-code-format = true
|
|
223
|
+
|
|
224
|
+
# Set the line length limit used when formatting code snippets in
|
|
225
|
+
# docstrings.
|
|
226
|
+
#
|
|
227
|
+
# This only has an effect when the `docstring-code-format` setting is
|
|
228
|
+
# enabled.
|
|
229
|
+
docstring-code-line-length = "dynamic"
|
|
230
|
+
|
|
231
|
+
[lint.flake8-pytest-style]
|
|
232
|
+
# Whether to require parentheses for pytest fixtures.
|
|
233
|
+
# Default: true
|
|
234
|
+
fixture-parentheses = true
|
|
235
|
+
# The type of pytest.mark.parametrize names to use: "tuple", "list", or "csv"
|
|
236
|
+
# Default: "tuple"
|
|
237
|
+
parametrize-names-type = "tuple"
|
|
238
|
+
|
|
239
|
+
[lint.pylint]
|
|
240
|
+
# The maximum number of arguments allowed for a function.
|
|
241
|
+
# Default: 5
|
|
242
|
+
max-args = 5
|
|
243
|
+
# The maximum return statements allowed for a function.
|
|
244
|
+
# Default: 6
|
|
245
|
+
max-returns = 6
|
|
246
|
+
# The maximum number of branches allowed for a function.
|
|
247
|
+
# Default: 12
|
|
248
|
+
max-branches = 12
|
|
249
|
+
# The maximum number of local variables allowed for a function.
|
|
250
|
+
# Default: 15
|
|
251
|
+
max-locals = 15
|
|
252
|
+
|
|
253
|
+
[lint.pep8-naming]
|
|
254
|
+
# Additional functions or methods that should be exempt from the lower_case_with_underscores rule.
|
|
255
|
+
# Default: []
|
|
256
|
+
ignore-names = []
|
|
257
|
+
# Additional decorators that should be treated as classmethod.
|
|
258
|
+
# Default: []
|
|
259
|
+
classmethod-decorators = [
|
|
260
|
+
"pydantic.validator",
|
|
261
|
+
"pydantic.root_validator",
|
|
262
|
+
]
|