Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporal: Fixed bare except clauses in spatial_topology_dataset_connector.py #4950

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading