Skip to content

Commit 5676759

Browse files
committed
using ruff instead of flake8
1 parent 1535791 commit 5676759

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ clean-docs: ## remove documentation artifacts
7171

7272
lint: ## check style with ruff
7373
@echo "Running code style checks ..."
74-
@bash -c 'ruff check src tests docs'
74+
@bash -c 'ruff check pywps'
7575

7676
## Testing targets:
7777

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
[build-system]
22
requires = ["setuptools"]
33
build-backend = "setuptools.build_meta"
4+
5+
[tool.ruff]
6+
lint.select = ["E", "W", "F", "C90"] # Flake8-equivalent rule families
7+
lint.ignore = ["F401", "E402", "C901"]
8+
9+
line-length = 120
10+
exclude = ["tests"]
11+

pywps/validator/complexvalidator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def validategeojson(data_input, mode):
223223
>>> from io import StringIO
224224
>>> class FakeInput(object):
225225
... json = open('point.geojson','w')
226-
... json.write('''{"type":"Feature", "properties":{}, "geometry":{"type":"Point", "coordinates":[8.5781228542328, 22.87500500679]}, "crs":{"type":"name", "properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}''') # noqa
226+
... json.write('''{"type":"Feature", "properties":{}, "geometry":{"type":"Point", "coordinates":[8.5781228542328, 22.87500500679]}, "crs":{"type":"name", "properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}''')
227227
... json.close()
228228
... file = 'point.geojson'
229229
>>> class FakeDataFormat(object):
@@ -232,7 +232,7 @@ def validategeojson(data_input, mode):
232232
>>> fake_input.data_format = FakeDataFormat()
233233
>>> validategeojson(fake_input, MODE.SIMPLE)
234234
True
235-
"""
235+
""" # noqa
236236

237237
LOGGER.info('validating GeoJSON; Mode: {}'.format(mode))
238238
passed = False

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ bump2version
22
coverage
33
coveralls
44
docutils
5-
flake8
5+
ruff
66
pylint
77
pytest
88
pytest-cov

setup.cfg

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,4 @@ replace = {new_version}
1717
[coverage:run]
1818
relative_files = True
1919

20-
[flake8]
21-
ignore =
22-
F401
23-
E402
24-
W606
25-
max-line-length = 120
26-
exclude = tests
2720

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ opts = --verbose
1010
skip_install = true
1111
extras =
1212
deps =
13-
flake8
13+
ruff
1414
commands =
15-
flake8 pywps
15+
ruff check pywps
1616

1717
[testenv]
1818
setenv =

0 commit comments

Comments
 (0)