Skip to content

Commit

Permalink
temporal: Fixed bare except clauses in spatial_topology_dataset_conne…
Browse files Browse the repository at this point in the history
…ctor.py (#4950)
  • Loading branch information
arohanajit authored Jan 16, 2025
1 parent 6b42b8d commit e5bedcf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ per-file-ignores =
# TODO: Is this really needed?
python/grass/jupyter/__init__.py: E501
python/grass/pygrass/vector/__init__.py: E402
python/grass/temporal/spatial_topology_dataset_connector.py: E722
# Current benchmarks/tests are changing sys.path before import.
# Possibly, a different approach should be taken there anyway.
python/grass/pygrass/tests/benchmark.py: F821
Expand Down
14 changes: 7 additions & 7 deletions python/grass/temporal/spatial_topology_dataset_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,31 +118,31 @@ def get_number_of_spatial_relations(self):
relations = {}
try:
relations["equivalent"] = len(self._spatial_topology["EQUIVALENT"])
except:
except KeyError:
relations["equivalent"] = 0
try:
relations["overlap"] = len(self._spatial_topology["OVERLAP"])
except:
except KeyError:
relations["overlap"] = 0
try:
relations["in"] = len(self._spatial_topology["IN"])
except:
except KeyError:
relations["in"] = 0
try:
relations["contain"] = len(self._spatial_topology["CONTAIN"])
except:
except KeyError:
relations["contain"] = 0
try:
relations["meet"] = len(self._spatial_topology["MEET"])
except:
except KeyError:
relations["meet"] = 0
try:
relations["cover"] = len(self._spatial_topology["COVER"])
except:
except KeyError:
relations["cover"] = 0
try:
relations["covered"] = len(self._spatial_topology["COVERED"])
except:
except KeyError:
relations["covered"] = 0

return relations
Expand Down

0 comments on commit e5bedcf

Please sign in to comment.