Skip to content

Commit 32ecf47

Browse files
committed
chore: replace flake8 and isort with ruff
https://beta.ruff.rs/docs/faq/#which-tools-does-ruff-replace
1 parent 50939ee commit 32ecf47

6 files changed

+15
-27
lines changed

.flake8

-4
This file was deleted.

.pre-commit-config.yaml

+7-15
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
repos:
55
- repo: local
66
hooks:
7+
- id: ruff
8+
name: ruff
9+
entry: ruff
10+
language: system
11+
stages: [commit]
12+
types: [python]
13+
714
- id: black
815
name: black
916
entry: black
@@ -26,13 +33,6 @@ repos:
2633
files: \.rst$
2734
require_serial: true
2835

29-
- id: flake8
30-
name: flake8
31-
entry: flake8
32-
language: system
33-
stages: [commit]
34-
types: [python]
35-
3636
- id: mypy
3737
name: mypy
3838
entry: mypy
@@ -41,11 +41,3 @@ repos:
4141
stages: [commit]
4242
types: [python]
4343
require_serial: true
44-
45-
- id: isort
46-
name: isort
47-
entry: isort
48-
args: []
49-
language: system
50-
stages: [commit]
51-
types: [python]

CHANGELOG.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Changed
6+
7+
- Use [ruff](https://github.com/charliermarsh/ruff) instead of **isort** and **flake8** ([#1034](https://github.com/stac-utils/pystac/pull/1034))
8+
59
## [v1.7.0]
610

711
### Added
@@ -230,7 +234,7 @@
230234
- Added `Collections` as a type that can be extended for extensions whose fields can appear in collection summaries ([#547](https://github.com/stac-utils/pystac/pull/547))
231235
- Allow resolved self links when getting an object's self href ([#555](https://github.com/stac-utils/pystac/pull/555))
232236
- Fixed type annotation on SummariesLabelExtension.label_properties setter ([#562](https://github.com/stac-utils/pystac/pull/562))
233-
- Allow comparable types with alternate parameter naming of __lt__ method to pass structural type linting for RangeSummary ([#562](https://github.com/stac-utils/pystac/pull/562))
237+
- Allow comparable types with alternate parameter naming of **lt** method to pass structural type linting for RangeSummary ([#562](https://github.com/stac-utils/pystac/pull/562))
234238

235239
## [v1.0.0-rc.3]
236240

@@ -592,7 +596,7 @@ documentation for more information on the new way to use extensions.
592596
- Dropped support for Python 3.5 [#108](https://github.com/azavea/pystac/pull/108)
593597

594598
- Extension classes for label, eo and single-file-stac were moved to the `pystac.extensions` package.
595-
- the eo and label extensions changed from being a subclass of Item to wrapping items. __Note__: This is a major change in the API for dealing with extensions. See the note below for more information.
599+
- the eo and label extensions changed from being a subclass of Item to wrapping items. **Note**: This is a major change in the API for dealing with extensions. See the note below for more information.
596600
- Renamed the class that enumerates extension names from `Extension` to `Extensions`
597601
- Asset properties always return a dict instead of being None for Assets that have non-core properties.
598602
- The `Band` constructor in the EO extension changed to taking a dict. To create a band from property values,

docs/contributing.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,11 @@ tl;dr: Run ``pre-commit install --overwrite`` to perform checks when committing,
5454

5555
PySTAC uses
5656

57+
- `ruff <https://github.com/charliermarsh/ruff>`_ for Python code linting
5758
- `black <https://github.com/psf/black>`_ for Python code formatting
5859
- `codespell <https://github.com/codespell-project/codespell/>`_ to check code for common misspellings
5960
- `doc8 <https://github.com/pycqa/doc8>`__ for style checking on RST files in the docs
60-
- `flake8 <https://flake8.pycqa.org/en/latest/>`_ for Python style checks
6161
- `mypy <http://www.mypy-lang.org/>`_ for Python type annotation checks
62-
- `isort <https://pycqa.github.io/isort/>` to sort Python import statements
6362

6463
Run all of these with ``pre-commit run --all-files`` or a single one using
6564
``pre-commit run --all-files ID``, where ``ID`` is one of the command names above. For

pyproject.toml

-2
This file was deleted.

requirements-test.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ black==23.1.0
22
codespell==2.2.2
33
coverage==7.2.1
44
doc8==1.1.1
5-
flake8==6.0.0
65
html5lib==1.1
7-
isort==5.12.0
86
jinja2<4.0
97
jsonschema==4.17.3
108
mypy==1.1.1
@@ -14,6 +12,7 @@ pytest-cov==4.0.0
1412
pytest-mock==3.10.0
1513
pytest-vcr==1.0.2
1614
pytest==7.2.2
15+
ruff==0.0.254
1716
types-html5lib==1.1.11.12
1817
types-orjson==3.6.2
1918
types-python-dateutil==2.8.19.10

0 commit comments

Comments
 (0)