sonar lint fixes
This commit is contained in:
parent
a660d9f1b1
commit
4f6574c88e
|
@ -157,8 +157,6 @@ def fetch_model(
|
|||
_filename, ext = path.splitext(ext)
|
||||
if ext is not None:
|
||||
cache_name = cache_name + ext
|
||||
else:
|
||||
cache_name = cache_name
|
||||
else:
|
||||
cache_name = f"{cache_name}.{format}"
|
||||
|
||||
|
|
|
@ -66,8 +66,8 @@ class OnnxNet:
|
|||
def half(self):
|
||||
return self
|
||||
|
||||
def load_state_dict(self, net, strict=True) -> None:
|
||||
def load_state_dict(self, _net, strict=True) -> None:
|
||||
pass
|
||||
|
||||
def to(self, device):
|
||||
def to(self, _device):
|
||||
return self
|
||||
|
|
|
@ -27,7 +27,7 @@ def output(context: ServerContext, filename: str):
|
|||
|
||||
|
||||
def register_static_routes(
|
||||
app: Flask, context: ServerContext, pool: DevicePoolExecutor
|
||||
app: Flask, context: ServerContext, _pool: DevicePoolExecutor
|
||||
):
|
||||
return [
|
||||
app.route("/")(wrap_route(index, context)),
|
||||
|
|
|
@ -121,7 +121,7 @@ def merge(a, b, path=None):
|
|||
elif a[key] == b[key]:
|
||||
pass # same leaf value
|
||||
else:
|
||||
raise Exception("Conflict at %s" % ".".join(path + [str(key)]))
|
||||
raise ValueError("conflict at %s" % ".".join(path + [str(key)]))
|
||||
else:
|
||||
a[key] = b[key]
|
||||
return a
|
||||
|
|
|
@ -341,7 +341,7 @@ def main():
|
|||
else:
|
||||
logger.warning("test failed: %s", test.name)
|
||||
failed.append(test.name)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
logger.exception("error running test for %s", test.name)
|
||||
failed.append(test.name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue