Skip to content

Commit 8cbeb2a

Browse files
committed
format
1 parent b7377d5 commit 8cbeb2a

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
# E501 let black handle all line length decisions
1717
# W503 black conflicts with "line break before operator" rule
1818
# E203 black conflicts with "whitespace before ':'" rule
19-
'--ignore=E501,W503,E203,C901' ]
19+
'--ignore=E501,W503,E203,C901,E231' ]
2020
- repo: https://github.com/pre-commit/mirrors-mypy
2121
rev: v0.991
2222
hooks:

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/config.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@ def _es_config() -> Dict[str, Any]:
1616
scheme = "https" if use_ssl else "http"
1717

1818
# Configure the hosts parameter with the correct scheme
19-
es_hosts = os.getenv("ES_HOST", "localhost").strip() # Default to localhost if ES_HOST is not set
19+
es_hosts = os.getenv(
20+
"ES_HOST", "localhost"
21+
).strip() # Default to localhost if ES_HOST is not set
2022
es_port = os.getenv("ES_PORT", "9200") # Default to 9200 if ES_PORT is not set
2123

2224
# Validate ES_HOST
2325
if not es_hosts:
2426
raise ValueError("ES_HOST environment variable is empty or invalid.")
2527

26-
hosts = [
27-
f"{scheme}://{host.strip()}:{es_port}"
28-
for host in es_hosts.split(",")
29-
]
28+
hosts = [f"{scheme}://{host.strip()}:{es_port}" for host in es_hosts.split(",")]
3029

3130
# Initialize the configuration dictionary
3231
config: Dict[str, Any] = {

stac_fastapi/opensearch/stac_fastapi/opensearch/config.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ def _es_config() -> Dict[str, Any]:
1515
scheme = "https" if use_ssl else "http"
1616

1717
# Configure the hosts parameter with the correct scheme
18-
es_hosts = os.getenv("ES_HOST", "localhost").strip() # Default to localhost if ES_HOST is not set
18+
es_hosts = os.getenv(
19+
"ES_HOST", "localhost"
20+
).strip() # Default to localhost if ES_HOST is not set
1921
es_port = os.getenv("ES_PORT", "9200") # Default to 9200 if ES_PORT is not set
2022

2123
# Validate ES_HOST
2224
if not es_hosts:
2325
raise ValueError("ES_HOST environment variable is empty or invalid.")
2426

25-
hosts = [
26-
f"{scheme}://{host.strip()}:{es_port}"
27-
for host in es_hosts.split(",")
28-
]
27+
hosts = [f"{scheme}://{host.strip()}:{es_port}" for host in es_hosts.split(",")]
2928

3029
# Initialize the configuration dictionary
3130
config: Dict[str, Any] = {

0 commit comments

Comments
 (0)