Skip to content

Commit

Permalink
fix: lint SIM113 Use enumerate()
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscorn committed Mar 8, 2024
1 parent e818a1d commit 9cd182e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
# - name: pyright
# run: poetry run pyright .

- name: ruff-format
- name: ruff (format)
run: poetry run ruff format --check .

- name: ruff
- name: ruff (lint)
run: poetry run ruff check --output-format github .
6 changes: 2 additions & 4 deletions plateau_plugin/plateau/parse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,10 @@ def count_toplevel_cityobjs(self) -> int:
def iter_cityobjs(self) -> Iterable[tuple[int, CityObject]]:
"""都市オブジェクトをパースして返す"""

toplevel_count = 0
for city_object in self._doc.iterfind(
"./core:cityObjectMember/*", self._ns.nsmap
for toplevel_count, city_object in enumerate(
self._doc.iterfind("./core:cityObjectMember/*", self._ns.nsmap)
):
for cityobj in self._parser.process_cityobj_element(
city_object, parent=None
):
yield (toplevel_count, cityobj)
toplevel_count += 1

0 comments on commit 9cd182e

Please sign in to comment.