Skip to content

Commit e7aab30

Browse files
committed
Applys enhanced ruff linting rules
1 parent 6914e81 commit e7aab30

File tree

4 files changed

+25
-35
lines changed

4 files changed

+25
-35
lines changed

.cruft.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"enable_dynamic_dev_versions": "y",
1717
"include_example_code": "n",
1818
"include_cruft_update_github_workflow": "y",
19-
"use_extended_ruff_linting": "n",
19+
"use_extended_ruff_linting": "y",
2020
"_sphinx_theme": "sunpy",
2121
"_parent_project": "",
2222
"_install_requires": "",

.github/workflows/ci.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- '!*pre*'
1313
- '!*post*'
1414
pull_request:
15-
# Allow manual runs through the web UI
15+
# Allow manual runs through the web UI
1616
workflow_dispatch:
1717

1818
concurrency:
@@ -90,27 +90,6 @@ jobs:
9090
submodules: false
9191
coverage: codecov
9292
toxdeps: tox-pypi-filter
93-
secrets:
94-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
95-
96-
publish:
97-
# Build wheels on PRs only when labelled. Releases will only be published if tagged ^v.*
98-
# see https://github-actions-workflows.openastronomy.org/en/latest/publish.html#upload-to-pypi
99-
if: |
100-
github.event_name != 'pull_request' ||
101-
(
102-
github.event_name == 'pull_request' &&
103-
contains(github.event.pull_request.labels.*.name, 'Run publish')
104-
)
105-
needs: [test, docs]
106-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main
107-
with:
108-
python-version: '3.12'
109-
test_extras: 'tests'
110-
test_command: 'pytest -p no:warnings --doctest-rst --pyargs sunpy_soar'
111-
submodules: false
112-
secrets:
113-
pypi_token: ${{ secrets.pypi_token }}
11493
envs: |
11594
- linux: py312-devdeps
11695
secrets:

.ruff.toml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Allow unused variables when underscore-prefixed.
2-
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
31
target-version = "py310"
42
line-length = 120
53
exclude=[
@@ -14,9 +12,27 @@ select = [
1412
"E",
1513
"F",
1614
"W",
15+
"N",
1716
"UP",
1817
"PT",
18+
"BLE",
19+
"A",
20+
"C4",
21+
"INP",
22+
"PIE",
23+
"T20",
24+
"RET",
25+
"TID",
26+
"PTH",
27+
"PD",
28+
"PLC",
29+
"PLE",
30+
"FLY",
31+
"NPY",
32+
"PERF",
33+
"RUF",
1934
]
35+
2036
extend-ignore = [
2137
# pycodestyle (E, W)
2238
"E501", # ignore line length will use a formatter instead
@@ -51,10 +67,8 @@ extend-ignore = [
5167
"INP001", # File is part of an implicit namespace package.
5268
]
5369
"docs/conf.py" = [
54-
"E402" # Module imports not at top of file
55-
]
56-
"docs/conf.py" = [
57-
"INP001", # conf.py is part of an implicit namespace package
70+
"E402", # Module imports not at top of file
71+
"INP001", # conf.py is part of an implicit namespace package
5872
]
5973
"docs/*.py" = [
6074
"INP001", # File is part of an implicit namespace package.

pyproject.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,15 @@ tests = [
2929
"pytest",
3030
"sunpy[map,net]>=5.0",
3131
]
32+
3233
docs = [
33-
"matplotlib",
34+
"sphinx",
3435
"sphinx-automodapi",
35-
"sunpy-sphinx-theme",
3636
"packaging",
37-
]
38-
repository = [
39-
"https://sunpy.org",
37+
"matplotlib",
4038
"sphinx-changelog",
4139
"sphinx-copybutton",
4240
"sphinx-gallery",
43-
"sphinx",
4441
"sphinxext-opengraph",
4542
"sunpy-sphinx-theme",
4643
]

0 commit comments

Comments
 (0)