Skip to content

Commit cfc4731

Browse files
committed
Move function around
1 parent 3710540 commit cfc4731

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/stac_api_validator/validations.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,6 @@ def __str__(self) -> str:
113113
return self.value
114114

115115

116-
def get_catalog(data_dict: Dict[str, Any], r_session: Session) -> Catalog:
117-
stac_io = StacIO.default()
118-
if r_session.headers and r_session.headers.get("Authorization"):
119-
stac_io.headers = {"Authorization": r_session.headers["Authorization"]}
120-
catalog = Catalog.from_dict(data_dict)
121-
catalog._stac_io = stac_io
122-
return catalog
123-
124-
125116
class BaseErrors:
126117
def __init__(self) -> None:
127118
self.errors: List[Tuple[str, str]] = []
@@ -285,6 +276,15 @@ def is_geojson_type(maybe_type: Optional[str]) -> bool:
285276
)
286277

287278

279+
def get_catalog(data_dict: Dict[str, Any], r_session: Session) -> Catalog:
280+
stac_io = StacIO.default()
281+
if r_session.headers and r_session.headers.get("Authorization"):
282+
stac_io.headers = {"Authorization": r_session.headers["Authorization"]}
283+
catalog = Catalog.from_dict(data_dict)
284+
catalog._stac_io = stac_io
285+
return catalog
286+
287+
288288
# def is_json_or_geojson_type(maybe_type: Optional[str]) -> bool:
289289
# return maybe_type and (is_json_type(maybe_type) or is_geojson_type(maybe_type))
290290

0 commit comments

Comments
 (0)