Skip to content

Commit 5c4abde

Browse files
committed
Rename method name
1 parent 3b46160 commit 5c4abde

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drucker/drucker_dashboard_servicer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def on_error(self, error: Exception):
9999
self.logger.error(str(error))
100100
self.logger.error(traceback.format_exc())
101101

102-
def check_invalid_upload(self, filename: str) -> bool:
102+
def is_valid_upload_filename(self, filename: str) -> bool:
103103
if Path(filename).name == filename:
104104
return True
105105
return False
@@ -131,7 +131,7 @@ def UploadModel(self,
131131
model_data = request.data
132132
f.write(model_data)
133133
f.close()
134-
if not self.check_invalid_upload(save_path):
134+
if not self.is_valid_upload_filename(save_path):
135135
raise Exception(f'Error: Invalid model path specified -> {save_path}')
136136
model_path = self.app.get_model_path(save_path)
137137
Path(model_path).parent.mkdir(parents=True, exist_ok=True)
@@ -170,7 +170,7 @@ def EvaluateModel(self,
170170
"""
171171
first_req = next(request_iterator)
172172
save_path = first_req.data_path
173-
if not self.check_invalid_upload(save_path):
173+
if not self.is_valid_upload_filename(save_path):
174174
raise Exception(f'Error: Invalid evaluation file specified -> {save_path}')
175175

176176
test_data = b''.join([first_req.data] + [r.data for r in request_iterator])

0 commit comments

Comments
 (0)