Skip to content

Commit a3db459

Browse files
authored
ruff for linting & formatting (#155)
* change developer docs * ruff format & ruff check --fix * upgrade action versions
1 parent 814387d commit a3db459

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
matrix:
1515
python-version: ["3.7", "3.9", "3.11", "3.13", "3.14"]
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Install dependencies

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@
6767
"specversion",
6868
]
6969
frozen_locals = dict(locals())
70-
rst_epilog = '\n'.join(map(lambda x: f".. |{x}| replace:: {frozen_locals[x]}", variables_to_export))
71-
del frozen_locals
70+
rst_epilog = "\n".join(map(lambda x: f".. |{x}| replace:: {frozen_locals[x]}", variables_to_export))
71+
del frozen_locals

docs/source/developers.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,13 @@ To lint the entire project and get suggested changes:
4242

4343
.. code-block:: console
4444
45-
$ pylint sigmf tests
45+
$ ruff check
4646
4747
To autoformat the entire project according to our coding standard:
4848

4949
.. code-block:: console
5050
51-
$ black sigmf tests # autoformat entire project
52-
$ isort sigmf tests # format imports for entire project
51+
$ ruff format
5352
5453
----
5554
Docs

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies = [
3939
sigmf_convert = "sigmf.convert.__main__:main"
4040
[project.optional-dependencies]
4141
test = [
42-
"pylint",
42+
"ruff",
4343
"pytest",
4444
"pytest-cov",
4545
"hypothesis", # next-gen testing framework
@@ -99,6 +99,9 @@ line-length = 120
9999
[tool.isort]
100100
profile = "black"
101101

102+
[tool.ruff]
103+
line-length = 120
104+
102105
[tool.tox]
103106
legacy_tox_ini = '''
104107
[tox]

0 commit comments

Comments
 (0)