@@ -436,7 +436,7 @@ def test_empty_shape_geo_interface():
436
436
"""
437
437
shape = shapefile .Shape ()
438
438
with pytest .raises (Exception ):
439
- shape . __geo_interface__
439
+ getattr ( shape , " __geo_interface__" )
440
440
441
441
442
442
@pytest .mark .parametrize ("typ,points,parts,expected" , geo_interface_tests )
@@ -486,14 +486,14 @@ def test_reader_url():
486
486
# test with extension
487
487
url = "https://github.com/nvkelso/natural-earth-vector/blob/master/110m_cultural/ne_110m_admin_0_tiny_countries.shp?raw=true"
488
488
with shapefile .Reader (url ) as sf :
489
- for recShape in sf .iterShapeRecords ():
489
+ for __recShape in sf .iterShapeRecords ():
490
490
pass
491
491
assert sf .shp .closed is sf .shx .closed is sf .dbf .closed is True
492
492
493
493
# test without extension
494
494
url = "https://github.com/nvkelso/natural-earth-vector/blob/master/110m_cultural/ne_110m_admin_0_tiny_countries?raw=true"
495
495
with shapefile .Reader (url ) as sf :
496
- for recShape in sf .iterShapeRecords ():
496
+ for __recShape in sf .iterShapeRecords ():
497
497
pass
498
498
assert len (sf ) > 0
499
499
assert sf .shp .closed is sf .shx .closed is sf .dbf .closed is True
@@ -507,7 +507,7 @@ def test_reader_url():
507
507
# test reading zipfile from url
508
508
url = "https://github.com/JamesParrott/PyShp_test_shapefile/raw/main/gis_osm_natural_a_free_1.zip"
509
509
with shapefile .Reader (url ) as sf :
510
- for recShape in sf .iterShapeRecords ():
510
+ for __recShape in sf .iterShapeRecords ():
511
511
pass
512
512
assert len (sf ) > 0
513
513
assert sf .shp .closed is sf .shx .closed is sf .dbf .closed is True
@@ -519,7 +519,7 @@ def test_reader_zip():
519
519
"""
520
520
# test reading zipfile only
521
521
with shapefile .Reader ("shapefiles/blockgroups.zip" ) as sf :
522
- for recShape in sf .iterShapeRecords ():
522
+ for __recShape in sf .iterShapeRecords ():
523
523
pass
524
524
assert len (sf ) > 0
525
525
assert sf .shp .closed is sf .shx .closed is sf .dbf .closed is True
@@ -533,7 +533,7 @@ def test_reader_zip():
533
533
with shapefile .Reader (
534
534
"shapefiles/blockgroups_multishapefile.zip/blockgroups2.shp"
535
535
) as sf :
536
- for recShape in sf .iterShapeRecords ():
536
+ for __recShape in sf .iterShapeRecords ():
537
537
pass
538
538
assert len (sf ) > 0
539
539
assert sf .shp .closed is sf .shx .closed is sf .dbf .closed is True
@@ -542,7 +542,7 @@ def test_reader_zip():
542
542
with shapefile .Reader (
543
543
"shapefiles/blockgroups_multishapefile.zip/blockgroups2"
544
544
) as sf :
545
- for recShape in sf .iterShapeRecords ():
545
+ for __recShape in sf .iterShapeRecords ():
546
546
pass
547
547
assert len (sf ) > 0
548
548
assert sf .shp .closed is sf .shx .closed is sf .dbf .closed is True
@@ -1032,7 +1032,7 @@ def test_reader_offsets():
1032
1032
# shx offsets should not be read during loading
1033
1033
assert not sf ._offsets
1034
1034
# reading a shape index should trigger reading offsets from shx file
1035
- __shape = sf .shape (3 )
1035
+ sf .shape (3 )
1036
1036
assert len (sf ._offsets ) == len (sf .shapes ())
1037
1037
1038
1038
@@ -1049,7 +1049,7 @@ def test_reader_offsets_no_shx():
1049
1049
assert not sf ._offsets
1050
1050
# reading a shape index should iterate to the shape
1051
1051
# but the list of offsets should remain empty
1052
- __shape = sf .shape (3 )
1052
+ sf .shape (3 )
1053
1053
assert not sf ._offsets
1054
1054
# reading all the shapes should build the list of offsets
1055
1055
shapes = sf .shapes ()
0 commit comments