Skip to content

Commit f28717d

Browse files
committed
ruff check --fix --unsafe-fixes
1 parent 143b483 commit f28717d

File tree

3 files changed

+202
-210
lines changed

3 files changed

+202
-210
lines changed

run_benchmarks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import functools
77
import os
88
import timeit
9-
from collections.abc import Callable
9+
from collections.abc import Callable, Iterable
1010
from os import PathLike
1111
from pathlib import Path
1212
from tempfile import TemporaryFile as TempF
13-
from typing import Iterable, Union, cast
13+
from typing import cast
1414

1515
import shapefile
1616

@@ -51,14 +51,14 @@ def benchmark(
5151
shapeRecords = collections.defaultdict(list)
5252

5353

54-
def open_shapefile_with_PyShp(target: Union[str, PathLike]):
54+
def open_shapefile_with_PyShp(target: str | PathLike):
5555
with shapefile.Reader(target) as r:
5656
fields[target] = r.fields
5757
for shapeRecord in r.iterShapeRecords():
5858
shapeRecords[target].append(shapeRecord)
5959

6060

61-
def write_shapefile_with_PyShp(target: Union[str, PathLike]):
61+
def write_shapefile_with_PyShp(target: str | PathLike):
6262
with TempF("wb") as shp, TempF("wb") as dbf, TempF("wb") as shx:
6363
with shapefile.Writer(shp=shp, dbf=dbf, shx=shx) as w: # type: ignore [arg-type]
6464
for field_info_tuple in fields[target]:

0 commit comments

Comments
 (0)