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