diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 87446ab..b0a760e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,13 +16,13 @@ repos: args: [--config, ./.codespellrc] - repo: https://github.com/pycqa/isort - rev: 7.0.0 + rev: 8.0.0 hooks: - id: isort args: [--profile, black] - repo: https://github.com/psf/black-pre-commit-mirror - rev: "25.12.0" + rev: "26.1.0" hooks: - id: black diff --git a/scripts/create_projects_table.py b/scripts/create_projects_table.py index 250b627..0188082 100644 --- a/scripts/create_projects_table.py +++ b/scripts/create_projects_table.py @@ -197,11 +197,9 @@ def labels_to_rename(): "topic:PCA": ["PCA"], } for key in LABELS_TO_RENAME: - log.info( - f"""Renaming {LABELS_TO_RENAME[key]} + log.info(f"""Renaming {LABELS_TO_RENAME[key]} to '{key}' - """ - ) + """) return LABELS_TO_RENAME @@ -238,12 +236,10 @@ def get_project_site(this_hackathon, sites, labels): site = find_site_in_labels(sites, labels) if site is None: - log.warning( - f"""Could not find site for: + log.warning(f"""Could not find site for: - name: {this_hackathon['name']} - labels: {labels} -- details: {this_hackathon}""" - ) +- details: {this_hackathon}""") site = "n/a" return site diff --git a/scripts/utils.py b/scripts/utils.py index 4d43c06..2d24a5a 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -44,10 +44,8 @@ def find_coordinates_event(event_city: str, brainhack_sites: pd.DataFrame) -> tu if this_city.sum() == 0: log.warning(f"Could not find {event_city} in brainhack-sites.csv") if this_city.sum() > 1: - log.warning( - f"""Found several cities for {event_city} in brainhack-sites.csv: -Evidence: {brainhack_sites[this_city]}""" - ) + log.warning(f"""Found several cities for {event_city} in brainhack-sites.csv: +Evidence: {brainhack_sites[this_city]}""") else: lat = brainhack_sites[this_city]["lat"].values lon = brainhack_sites[this_city]["lon"].values @@ -71,7 +69,7 @@ def get_timeline() -> pd.DataFrame: # Find coordinates for each event and drop it if not found coordinates = {"lat": [], "lon": []} for row in timeline.itertuples(): - (lat, lon) = find_coordinates_event(row.City, brainhack_sites) + lat, lon = find_coordinates_event(row.City, brainhack_sites) if len(lat) > 0 and len(lon) > 0: coordinates["lat"].append(lat[0]) coordinates["lon"].append(lon[0])