File tree 2 files changed +8
-16
lines changed
2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change 17
17
)
18
18
19
19
import pystac
20
+ import pystac .extensions .item_assets as item_assets
20
21
from pystac .extensions .base import (
21
22
ExtensionManagementMixin ,
22
23
PropertiesExtension ,
23
24
SummariesExtension ,
24
25
)
25
26
from pystac .extensions .hooks import ExtensionHooks
26
- import pystac .extensions .item_assets as item_assets
27
27
from pystac .extensions .raster import RasterBand
28
28
from pystac .serialization .identify import STACJSONDescription , STACVersionID
29
29
from pystac .utils import get_required , map_opt
@@ -86,8 +86,7 @@ def apply(
86
86
), "Must format color hints as '^([0-9A-F]{6})$'"
87
87
88
88
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 )
91
90
assert (
92
91
color_hint is None or match is not None and match .group () == color_hint
93
92
), "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
4
1
import json
5
2
import logging
3
+ from copy import deepcopy
4
+ from datetime import datetime
6
5
from typing import Any , Dict , List , cast
7
6
7
+ import pytest
8
+ from dateutil .parser import parse
9
+
8
10
import pystac
9
11
from pystac import Collection , Item
10
12
from pystac .extensions .classification import (
11
- Bitfield ,
12
13
CLASSES_PROP ,
14
+ Bitfield ,
13
15
Classification ,
14
16
ClassificationExtension ,
15
17
)
16
18
from pystac .extensions .item_assets import ItemAssetsExtension
17
19
from pystac .extensions .raster import RasterBand , RasterExtension
18
- import pytest
19
20
from tests .utils import TestCases
20
21
21
22
logging .basicConfig (level = logging .DEBUG )
@@ -202,14 +203,6 @@ def test_create() -> None:
202
203
],
203
204
)
204
205
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
-
213
206
logger .info (field )
214
207
215
208
You can’t perform that action at this time.
0 commit comments