Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
anikaweinmann committed Oct 17, 2024
1 parent e3c8a54 commit 49b4418
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ def _check_mapset(self, mapset):
)
else:
raise AsyncProcessError(
"Unable to access global project <%s>"
% self.project_name
"Unable to access global project <%s>" % self.project_name
)

# Always check if the target mapset already exists and set the flag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -909,9 +909,7 @@ def _create_temp_database(self, mapsets=None):
# temporary project
for mapset_path, mapset in mapsets_to_link:
if (
os.path.isdir(
os.path.join(self.temp_project_path, mapset)
)
os.path.isdir(os.path.join(self.temp_project_path, mapset))
is False
):
os.symlink(
Expand Down Expand Up @@ -1027,13 +1025,10 @@ def _list_all_available_mapsets(
else:
if global_db is True:
msg = (
"Unable to access global project <%s>"
% self.project_name
"Unable to access global project <%s>" % self.project_name
)
else:
msg = (
"Unable to access user project <%s>" % self.project_name
)
msg = "Unable to access user project <%s>" % self.project_name
raise AsyncProcessError(msg)
return mapsets, mapsets_to_link

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ def _execute(self):

self._execute_process_list(process_list)

if os.path.isdir(
os.path.join(self.temp_grass_data_base, new_project)
):
if os.path.isdir(os.path.join(self.temp_grass_data_base, new_project)):
shutil.move(
os.path.join(self.temp_grass_data_base, new_project),
self.grass_user_data_base,
Expand All @@ -91,6 +89,4 @@ def _execute(self):
"Unable to create project <%s>" % new_project
)

self.finish_message = (
"Project <%s> successfully created" % new_project
)
self.finish_message = "Project <%s> successfully created" % new_project
3 changes: 1 addition & 2 deletions tests/test_job_resumption.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,8 +1086,7 @@ def tearDown(self):
if self.mapset_created is True:
rv = self.server.delete(
URL_PREFIX
+ "/projects/%s/mapsets/%s/lock"
% (self.project, self.mapset),
+ "/projects/%s/mapsets/%s/lock" % (self.project, self.mapset),
headers=self.admin_auth_header,
)
self.waitAsyncStatusAssertHTTP(rv, headers=self.admin_auth_header)
Expand Down
3 changes: 1 addition & 2 deletions tests/test_raster_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ def create_raster_layer(self, mapset_name, raster_name):

def test_list_raster_layers(self):
rv = self.server.get(
URL_PREFIX
+ "/projects/nc_spm_08/mapsets/PERMANENT/raster_layers",
URL_PREFIX + "/projects/nc_spm_08/mapsets/PERMANENT/raster_layers",
headers=self.user_auth_header,
)
print(rv.data.decode())
Expand Down
4 changes: 1 addition & 3 deletions tests/test_strds_raster_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@


class STRDSTestCase(ActiniaResourceTestCaseBase):
def create_raster_layer(
self, project_name, mapset_name, raster_name, val
):
def create_raster_layer(self, project_name, mapset_name, raster_name, val):
# Remove potentially existing raster layer
rv = self.server.delete(
URL_PREFIX
Expand Down
4 changes: 1 addition & 3 deletions tests/test_strds_raster_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@


class STRDSRenderTestCase(ActiniaResourceTestCaseBase):
def create_raster_layer(
self, project_name, mapset_name, raster_name, val
):
def create_raster_layer(self, project_name, mapset_name, raster_name, val):
# Remove potentially existing raster layer
rv = self.server.delete(
URL_PREFIX
Expand Down
6 changes: 2 additions & 4 deletions tests/test_vector_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ def test_creation_1(self):

def test_layer_info(self):
rv = self.server.get(
URL_PREFIX
+ "/projects/nc_spm_08/mapsets/PERMANENT/vector_layers/"
URL_PREFIX + "/projects/nc_spm_08/mapsets/PERMANENT/vector_layers/"
"boundary_county",
headers=self.user_auth_header,
)
Expand All @@ -178,8 +177,7 @@ def test_layer_info(self):
def test_layer_info_error_1(self):
# Raster does not exist
rv = self.server.get(
URL_PREFIX
+ "/projects/nc_spm_08/mapsets/PERMANENT/vector_layers/"
URL_PREFIX + "/projects/nc_spm_08/mapsets/PERMANENT/vector_layers/"
"boundary_county_nope",
headers=self.user_auth_header,
)
Expand Down
3 changes: 1 addition & 2 deletions tests/test_vector_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
class VectorLayersTestCase(ActiniaResourceTestCaseBase):
def test_list_vector_layers(self):
rv = self.server.get(
URL_PREFIX
+ "/projects/nc_spm_08/mapsets/PERMANENT/vector_layers",
URL_PREFIX + "/projects/nc_spm_08/mapsets/PERMANENT/vector_layers",
headers=self.user_auth_header,
)
print(rv.data)
Expand Down

0 comments on commit 49b4418

Please sign in to comment.