Skip to content

Commit

Permalink
temporal: Fixed bare 'except' PEP8 error (OSGeo#4670)
Browse files Browse the repository at this point in the history
  • Loading branch information
arohanajit authored Nov 8, 2024
1 parent 177f5b4 commit 4f5da02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ per-file-ignores =
python/grass/temporal/temporal_algebra.py: E722
python/grass/temporal/temporal_granularity.py: E722
python/grass/temporal/temporal_raster_base_algebra.py: E722
python/grass/temporal/temporal_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: E402, F821
Expand Down
22 changes: 11 additions & 11 deletions python/grass/temporal/temporal_topology_dataset_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,47 +160,47 @@ def get_number_of_temporal_relations(self):
relations = {}
try:
relations["equal"] = len(self._temporal_topology["EQUAL"])
except:
except KeyError:
relations["equal"] = 0
try:
relations["follows"] = len(self._temporal_topology["FOLLOWS"])
except:
except KeyError:
relations["follows"] = 0
try:
relations["precedes"] = len(self._temporal_topology["PRECEDES"])
except:
except KeyError:
relations["precedes"] = 0
try:
relations["overlaps"] = len(self._temporal_topology["OVERLAPS"])
except:
except KeyError:
relations["overlaps"] = 0
try:
relations["overlapped"] = len(self._temporal_topology["OVERLAPPED"])
except:
except KeyError:
relations["overlapped"] = 0
try:
relations["during"] = len(self._temporal_topology["DURING"])
except:
except KeyError:
relations["during"] = 0
try:
relations["contains"] = len(self._temporal_topology["CONTAINS"])
except:
except KeyError:
relations["contains"] = 0
try:
relations["starts"] = len(self._temporal_topology["STARTS"])
except:
except KeyError:
relations["starts"] = 0
try:
relations["started"] = len(self._temporal_topology["STARTED"])
except:
except KeyError:
relations["started"] = 0
try:
relations["finishes"] = len(self._temporal_topology["FINISHES"])
except:
except KeyError:
relations["finishes"] = 0
try:
relations["finished"] = len(self._temporal_topology["FINISHED"])
except:
except KeyError:
relations["finished"] = 0

return relations
Expand Down

0 comments on commit 4f5da02

Please sign in to comment.