File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -30,3 +30,14 @@ allow-direct-references = true
3030
3131[tool .hatch .build .targets .wheel ]
3232packages = [" src/atmjsongen" ]
33+
34+ [tool .ruff .lint ]
35+ select = [
36+ " E" , # pycodestyle errors
37+ " W" , # pycodestyle warnings
38+ " F" , # pyflakes
39+ " I" , # isort
40+ " C" , # flake8-comprehensions
41+ " B" , # flake8-bugbear
42+ " UP" , # pyupgrade
43+ ]
Original file line number Diff line number Diff line change 1- from typing import Callable
1+ from collections . abc import Callable
22from pathlib import Path
3+
34import geopandas
45import typer
56
@@ -43,9 +44,10 @@ def get_openinghours(tags):
4344 return atm_opening
4445
4546
46- def main (parquet : Path , geojson_dir : Path = Path .cwd ()):
47+ def main (parquet : Path , geojson_dir : Path = Path .cwd ()): # noqa: B008
4748 gdf = geopandas .read_parquet (parquet )
48- gdf ["tags" ] = gdf ["tags" ].apply (lambda l : {i [0 ]: i [1 ] for i in l })
49+ # タグはlist[tuple]の構造になっているので使いやすいようにdictに変換する
50+ gdf ["tags" ] = gdf ["tags" ].apply (lambda lst : {i [0 ]: i [1 ] for i in lst })
4951 gdf ["brand" ] = gdf ["tags" ].apply (get_sometag ("brand" ))
5052 gdf ["name" ] = gdf ["tags" ].apply (get_sometag ("name" ))
5153 gdf ["atm" ] = gdf ["tags" ].apply (is_atm )
You can’t perform that action at this time.
0 commit comments