Skip to content

Commit

Permalink
build(pre-commit.ci): pre-commit autoupdate (#41)
Browse files Browse the repository at this point in the history
* build(pre-commit.ci): pre-commit autoupdate

updates:
- [github.com/compilerla/conventional-pre-commit: v3.0.0 → v3.1.0](compilerla/conventional-pre-commit@v3.0.0...v3.1.0)
- [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.2.0](astral-sh/ruff-pre-commit@v0.1.9...v0.2.0)
- [github.com/pdm-project/pdm: 2.11.1 → 2.12.3](pdm-project/pdm@2.11.1...2.12.3)
- [github.com/kynan/nbstripout: 0.6.1 → 0.7.1](kynan/nbstripout@0.6.1...0.7.1)
- [github.com/dosisod/refurb: v1.26.0 → v1.28.0](dosisod/refurb@v1.26.0...v1.28.0)
- [github.com/FHPythonUtils/LicenseCheck: 2023.5.2 → 2024](FHPythonUtils/LicenseCheck@2023.5.2...2024)

* refactor: apply refurb suggestion

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kamil Raczycki <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and RaczeQ authored Feb 13, 2024
1 parent 3b04c11 commit e990ef3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
default_stages: [commit]
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.0.0
rev: v3.1.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.9'
rev: 'v0.2.0'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -24,15 +24,15 @@ repos:
- id: mypy
additional_dependencies: ['types-requests', 'types-six']
- repo: https://github.com/pdm-project/pdm
rev: 2.11.1
rev: 2.12.3
hooks:
- id: pdm-lock-check
- id: pdm-export
args: ["-o", "requirements.txt", "--without-hashes", "-d", "-G", "all"]
files: ^pdm.lock$
stages: [manual]
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.7.1
hooks:
- id: nbstripout
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -47,15 +47,15 @@ repos:
args: ['--maxkb=1000']
- id: detect-private-key
- repo: https://github.com/dosisod/refurb
rev: v1.26.0
rev: v1.28.0
hooks:
- id: refurb
args: ["--python-version", "3.9", "--format", "github"]
language: python
language_version: python3.10
stages: [manual]
- repo: https://github.com/FHPythonUtils/LicenseCheck
rev: "2023.5.2"
rev: "2024"
hooks:
- id: licensecheck
stages: [manual]
Expand Down
3 changes: 2 additions & 1 deletion quackosm/osm_extracts/geofabrik.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import json
import operator
from pathlib import Path
from typing import Optional

Expand Down Expand Up @@ -48,7 +49,7 @@ def _load_geofabrik_index() -> gpd.GeoDataFrame:
gdf = gpd.GeoDataFrame.from_features(parsed_data["features"])
gdf["area"] = gdf.geometry.area
gdf.sort_values(by="area", ignore_index=True, inplace=True)
gdf["url"] = gdf["urls"].apply(lambda d: d["pbf"])
gdf["url"] = gdf["urls"].apply(operator.itemgetter("pbf"))
gdf["id"] = "Geofabrik_" + gdf["id"]
gdf = gdf[["id", "name", "geometry", "area", "url"]]

Expand Down

0 comments on commit e990ef3

Please sign in to comment.