Skip to content

Commit 4eb17e4

Browse files
authored
Merge branch 'main' into feature/classification-extension
2 parents 1eac1b7 + add2fe9 commit 4eb17e4

File tree

8 files changed

+17
-9
lines changed

8 files changed

+17
-9
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ repos:
1010
language: system
1111
stages: [commit]
1212
types: [python]
13+
args: [--fix, --exit-non-zero-on-fix]
1314

1415
- id: black
1516
name: black

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ exclude = ["tests*", "benchmarks*"]
8484
[tool.setuptools.dynamic]
8585
version = { attr = "pystac.version.__version__" }
8686

87+
[tool.ruff]
88+
line-length = 88
89+
select = ["E", "F", "I"]
90+
8791
[tool.pytest]
8892
filterwarnings = "error:::pystac[.*]"
8993

pystac/catalog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from __future__ import annotations
22

3-
from itertools import chain
4-
import warnings
53
import os
4+
import warnings
65
from copy import deepcopy
76
from html import escape
7+
from itertools import chain
88
from typing import (
99
TYPE_CHECKING,
1010
Any,

pystac/extensions/raster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
)
1717

1818
import pystac
19+
import pystac.extensions.item_assets as item_assets
1920
from pystac.extensions.base import (
2021
ExtensionManagementMixin,
2122
PropertiesExtension,
2223
SummariesExtension,
2324
)
2425
from pystac.extensions.hooks import ExtensionHooks
25-
import pystac.extensions.item_assets as item_assets
2626
from pystac.utils import StringEnum, get_opt, get_required, map_opt
2727

2828
T = TypeVar("T", pystac.Asset, item_assets.AssetDefinition)

tests/extensions/test_grid.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
from typing import Any, Dict
88

99
import pytest
10+
1011
import pystac
1112
from pystac import ExtensionTypeError
1213
from pystac.extensions import grid
1314
from pystac.extensions.grid import GridExtension
14-
from tests.utils import TestCases
1515
from tests.conftest import get_data_file
16+
from tests.utils import TestCases
1617

1718
code = "MGRS-4CFJ"
1819

tests/extensions/test_label.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import unittest
55
from typing import List, Union
66

7+
import pytest
8+
79
import pystac
810
import pystac.validation
911
from pystac import Catalog, CatalogType, Collection, ExtensionTypeError, Item
@@ -19,9 +21,8 @@
1921
LabelType,
2022
)
2123
from pystac.utils import get_opt
22-
from tests.utils import TestCases, assert_to_from_dict
2324
from tests.conftest import get_data_file
24-
import pytest
25+
from tests.utils import TestCases, assert_to_from_dict
2526

2627

2728
class LabelTypeTest(unittest.TestCase):

tests/extensions/test_mgrs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""Tests for pystac.tests.extensions.mgrs"""
22
import json
3+
34
import pytest
5+
46
import pystac
57
from pystac.extensions.mgrs import MgrsExtension
6-
7-
88
from tests.conftest import get_data_file
99

1010

tests/extensions/test_raster.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import unittest
33

44
import pytest
5+
56
import pystac
67
from pystac import ExtensionTypeError, Item
78
from pystac.extensions.item_assets import ItemAssetsExtension
@@ -15,8 +16,8 @@
1516
Statistics,
1617
)
1718
from pystac.utils import get_opt
18-
from tests.utils import TestCases, assert_to_from_dict
1919
from tests.conftest import get_data_file
20+
from tests.utils import TestCases, assert_to_from_dict
2021

2122

2223
class RasterTest(unittest.TestCase):

0 commit comments

Comments
 (0)