Skip to content

Commit

Permalink
style: Manual fixes of if-else-block-instead-of-if-exp (SIM108) in te…
Browse files Browse the repository at this point in the history
…mporal/
  • Loading branch information
echoix committed Oct 20, 2024
1 parent 3dc6bf7 commit da1eb35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
7 changes: 2 additions & 5 deletions temporal/t.vect.observe.strds/t.vect.observe.strds.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,8 @@ def main():
vector_db = gs.vector.vector_db(input)

# We copy the vector table and create the new layers
if vector_db:
# Use the first layer to copy the categories from
layers = "1,"
else:
layers = ""
# If vector_db, use the first layer to copy the categories from
layers = "1," if vector_db else ""
first = True
for layer in range(num_samples):
layer += 1
Expand Down
9 changes: 3 additions & 6 deletions temporal/t.vect.what.strds/t.vect.what.strds.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,9 @@ def main():
raster_maps = (new_map.get_id(),)

for rastermap in raster_maps:
if column:
col_name = column
else:
# Create a new column with the SQL compliant
# name of the sampled raster map
col_name = rastermap.split("@")[0].replace(".", "_")
# Create a new column with the SQL compliant
# name of the sampled raster map if not column
col_name = column or rastermap.split("@")[0].replace(".", "_")

coltype = "DOUBLE PRECISION"
# Get raster type
Expand Down

0 comments on commit da1eb35

Please sign in to comment.