Skip to content

Commit eee6180

Browse files
committed
Turn off formatter at the troublesome trailing comma
1 parent 27b87df commit eee6180

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.pre-commit-config.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ repos:
99
hooks:
1010
- id: isort
1111
name: isort (python)
12-
12+
- repo: https://github.com/astral-sh/ruff-pre-commit
13+
rev: v0.6.4
14+
hooks:
15+
- id: ruff-format

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ line-length = 88
3939
indent-width = 4
4040

4141
# Assume Python 3.9
42-
target-version = "py39"
42+
target-version = "py37"
4343

4444
[tool.ruff.lint]
4545
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.

shapefile.py

+2
Original file line numberDiff line numberDiff line change
@@ -2335,12 +2335,14 @@ def __shpRecord(self, s):
23352335
try:
23362336
if hasattr(s, "m"):
23372337
# if m values are stored in attribute
2338+
# fmt: off
23382339
f.write(
23392340
pack(
23402341
"<%sd" % len(s.m),
23412342
*[m if m is not None else NODATA for m in s.m]
23422343
)
23432344
)
2345+
# fmt: on
23442346
else:
23452347
# if m values are stored as 3rd/4th dimension
23462348
# 0-index position of m value is 3 if z type (x,y,z,m), or 2 if m type (x,y,m)

test_shapefile.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,9 @@ def test_shape_oid_no_shx():
10211021
for i, shaperec in enumerate(sf.iterShapeRecords()):
10221022
assert shaperec.shape.oid == i
10231023
shape_expected = sf_expected.shape(i)
1024-
assert shaperec.shape.__geo_interface__ == shape_expected.__geo_interface__
1024+
assert (
1025+
shaperec.shape.__geo_interface__ == shape_expected.__geo_interface__
1026+
)
10251027

10261028

10271029
def test_reader_offsets():

0 commit comments

Comments
 (0)