diff --git a/arcor2/docstring.py b/arcor2/docstring.py index eb82ad38..d74cff6f 100644 --- a/arcor2/docstring.py +++ b/arcor2/docstring.py @@ -59,7 +59,7 @@ def trim(docstring): def reindent(string): - return "\n".join(l.strip() for l in string.strip().split("\n")) + return "\n".join(line.strip() for line in string.strip().split("\n")) def parse_docstring(docstring): diff --git a/arcor2/helpers.py b/arcor2/helpers.py index a5017c5c..e08a88d0 100644 --- a/arcor2/helpers.py +++ b/arcor2/helpers.py @@ -308,6 +308,6 @@ def type_def_from_source(source: str, type_name: str, output_type: Type[T]) -> T raise TypeDefException(f"Source does not contain class named '{type_name}'.") if not issubclass(cls_def, output_type): - raise TypeDefException(f"Class is not of expected type.") + raise TypeDefException("Class is not of expected type.") return cls_def diff --git a/arcor2/nodes/build.py b/arcor2/nodes/build.py index ce7bbef0..8b04897b 100755 --- a/arcor2/nodes/build.py +++ b/arcor2/nodes/build.py @@ -228,7 +228,7 @@ def main(): swaggerui_blueprint = get_swaggerui_blueprint( SWAGGER_URL, # Swagger UI static files will be mapped to '{SWAGGER_URL}/dist/' - f"./api/swagger.json" + "./api/swagger.json" ) # Register blueprint at URL diff --git a/arcor2/nodes/execution_proxy.py b/arcor2/nodes/execution_proxy.py index 117e1a8f..be9ee5bd 100755 --- a/arcor2/nodes/execution_proxy.py +++ b/arcor2/nodes/execution_proxy.py @@ -412,7 +412,7 @@ def main(): swaggerui_blueprint = get_swaggerui_blueprint( SWAGGER_URL, # Swagger UI static files will be mapped to '{SWAGGER_URL}/dist/' - f"./api/swagger.json" + "./api/swagger.json" ) # Register blueprint at URL diff --git a/arcor2/rest.py b/arcor2/rest.py index 4f462443..e54c61a0 100644 --- a/arcor2/rest.py +++ b/arcor2/rest.py @@ -97,7 +97,7 @@ def _send(url: str, op: Callable, data: OptionalData = None, resp = op(url, data=json.dumps(d), timeout=TIMEOUT, headers={'Content-Type': 'application/json'}, params=params) except requests.exceptions.RequestException as e: - raise RestException(f"Catastrophic system error.", str(e)) from e + raise RestException("Catastrophic system error.", str(e)) from e handle_response(resp) @@ -162,7 +162,7 @@ def delete(url: str): try: resp = SESSION.delete(url, timeout=TIMEOUT) except requests.exceptions.RequestException as e: - raise RestException(f"Catastrophic system error.", str(e)) from e + raise RestException("Catastrophic system error.", str(e)) from e handle_response(resp) @@ -192,7 +192,7 @@ def _get_response(url: str, body: Optional[JsonSchemaMixin] = None, params: Para try: resp = SESSION.get(url, timeout=TIMEOUT, data=body_dict, params=params) except requests.exceptions.RequestException as e: - raise RestException(f"Catastrophic system error.", str(e)) from e + raise RestException("Catastrophic system error.", str(e)) from e handle_response(resp) diff --git a/arcor2/server/rpc/scene.py b/arcor2/server/rpc/scene.py index c51a80a0..f2c37b03 100644 --- a/arcor2/server/rpc/scene.py +++ b/arcor2/server/rpc/scene.py @@ -382,7 +382,7 @@ async def rename_object_cb(req: rpc.scene.RenameObjectRequest) -> \ for obj_name in glob.SCENE.object_names(): if obj_name == req.args.new_name: - return False, f"Object name already exists." + return False, "Object name already exists." target_obj.name = req.args.new_name