Skip to content

Commit

Permalink
Merge pull request #141 from hotosm/actions/black
Browse files Browse the repository at this point in the history
Format Python code with psf/black push
  • Loading branch information
kshitijrajsharma authored Aug 29, 2023
2 parents 0067c90 + 656f4e5 commit 5dc1ca3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ def get_db_connection_params() -> dict:
try:
connection_params = {
"host": os.environ.get("PGHOST") or config.get("DB", "PGHOST"),
"port": os.environ.get("PGPORT") or config.get("DB", "PGPORT", fallback="5432"),
"port": os.environ.get("PGPORT")
or config.get("DB", "PGPORT", fallback="5432"),
"dbname": os.environ.get("PGDATABASE") or config.get("DB", "PGDATABASE"),
"user": os.environ.get("PGUSER") or config.get("DB", "PGUSER"),
"password": os.environ.get("PGPASSWORD") or config.get("DB", "PGPASSWORD"),
Expand All @@ -186,7 +187,9 @@ def get_db_connection_params() -> dict:

def get_oauth_credentials() -> tuple:
"""Gets oauth credentials from the env file and returns a config dict"""
osm_url = os.environ.get("OSM_URL") or config.get("OAUTH", "OSM_URL", fallback="https://www.openstreetmap.org")
osm_url = os.environ.get("OSM_URL") or config.get(
"OAUTH", "OSM_URL", fallback="https://www.openstreetmap.org"
)
client_id = os.environ.get("OSM_CLIENT_ID") or config.get("OAUTH", "OSM_CLIENT_ID")
client_secret = os.environ.get("OSM_CLIENT_SECRET") or config.get(
"OAUTH", "OSM_CLIENT_SECRET"
Expand Down

0 comments on commit 5dc1ca3

Please sign in to comment.