Skip to content

Commit 6c37937

Browse files
author
Taher Chegini
committed
ENH: Address issues raised by refurb. [skip ci]
1 parent 9349c39 commit 6c37937

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

conftest.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ def _add_standard_imports(doctest_namespace):
2222
@pytest.fixture()
2323
def wms_resp():
2424
"""Return a WMS response."""
25-
wms = WMS(
25+
return WMS(
2626
ServiceURL().wms.mrlc,
2727
layers="nlcd_tcc_conus_2011_v2021-4",
2828
outformat="image/geotiff",
2929
crs=DEF_CRS,
3030
validation=False,
3131
ssl=False,
32-
)
33-
return wms.getmap_bybox(
32+
).getmap_bybox(
3433
GEO_NAT.bounds,
3534
1e3,
3635
box_crs=DEF_CRS,
@@ -40,15 +39,14 @@ def wms_resp():
4039
@pytest.fixture()
4140
def gtiff_list():
4241
"""Return a WMS response."""
43-
wms = WMS(
42+
return WMS(
4443
ServiceURL().wms.mrlc,
4544
layers="NLCD_2019_Land_Cover_Science_Product_L48",
4645
outformat="image/geotiff",
4746
crs=DEF_CRS,
4847
validation=False,
4948
ssl=False,
50-
)
51-
return wms.getmap_bybox(
49+
).getmap_bybox(
5250
GEO_NAT.bounds,
5351
1e3,
5452
box_crs=DEF_CRS,

pygeoutils/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class MissingColumnError(Exception):
1414
"""
1515

1616
def __init__(self, missing: list[str]) -> None:
17-
self.message = "The following columns are missing:\n" + f"{', '.join(missing)}"
17+
self.message = f"The following columns are missing:\n{', '.join(missing)}"
1818
super().__init__(self.message)
1919

2020
def __str__(self) -> str:

pygeoutils/geotools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,9 @@ def break_lines(lines: GDFTYPE, points: gpd.GeoDataFrame, tol: float = 0.0) -> G
786786
crs=crs_proj,
787787
index=idx,
788788
)
789-
out = lines.loc[idx].drop(columns="geometry")
790-
out = gpd.GeoDataFrame(out, geometry=broken_lines, crs=crs_proj)
791-
return out.to_crs(lines.crs)
789+
return gpd.GeoDataFrame(
790+
lines.loc[idx].drop(columns="geometry"), geometry=broken_lines, crs=crs_proj
791+
).to_crs(lines.crs)
792792

793793

794794
def geometry_list(geometry: GEOM) -> list[Polygon] | list[Point] | list[LineString]:

0 commit comments

Comments
 (0)