File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change 1717)
1818
1919import pystac
20+ import pystac .extensions .item_assets as item_assets
2021from pystac .extensions .base import (
2122 ExtensionManagementMixin ,
2223 PropertiesExtension ,
2324 SummariesExtension ,
2425)
2526from pystac .extensions .hooks import ExtensionHooks
26- import pystac .extensions .item_assets as item_assets
2727from pystac .extensions .raster import RasterBand
2828from pystac .serialization .identify import STACJSONDescription , STACVersionID
2929from pystac .utils import get_required , map_opt
@@ -86,8 +86,7 @@ def apply(
8686 ), "Must format color hints as '^([0-9A-F]{6})$'"
8787
8888 if color_hint is not None :
89- color_hint_pattern = re .compile ("^([0-9A-F]{6})$" )
90- match = color_hint_pattern .match (color_hint )
89+ match = COLOR_HINT_PATTERN .match (color_hint )
9190 assert (
9291 color_hint is None or match is not None and match .group () == color_hint
9392 ), "Must format color hints as '^([0-9A-F]{6})$'"
Original file line number Diff line number Diff line change 1- from copy import deepcopy
2- from datetime import datetime
3- from dateutil .parser import parse
41import json
52import logging
3+ from copy import deepcopy
4+ from datetime import datetime
65from typing import Any , Dict , List , cast
76
7+ import pytest
8+ from dateutil .parser import parse
9+
810import pystac
911from pystac import Collection , Item
1012from pystac .extensions .classification import (
11- Bitfield ,
1213 CLASSES_PROP ,
14+ Bitfield ,
1315 Classification ,
1416 ClassificationExtension ,
1517)
1618from pystac .extensions .item_assets import ItemAssetsExtension
1719from pystac .extensions .raster import RasterBand , RasterExtension
18- import pytest
1920from tests .utils import TestCases
2021
2122logging .basicConfig (level = logging .DEBUG )
@@ -202,14 +203,6 @@ def test_create() -> None:
202203 ],
203204 )
204205
205- assert (
206- field .__repr__ () == "<Bitfield offset=8 length=2 classes=["
207- "<Classification value=0 description=No confidence level set>, "
208- "<Classification value=1 description=Low confidence cloud>, "
209- "<Classification value=2 description=Medium confidence cloud>, "
210- "<Classification value=3 description=High confidence cloud>]>"
211- )
212-
213206 logger .info (field )
214207
215208
You can’t perform that action at this time.
0 commit comments