mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 19:33:46 +08:00
update lint
This commit is contained in:
1 parent
fc282f8857
commit
3507467bf4
1 file changed
+3
-3
@@ -32,9 +32,9 @@ def get_color(color: Union[str, list, ListConfig]) -> TensorType[3]:
|
||||
if color not in COLORS_DICT:
|
||||
raise ValueError(f"{color} is not a valid preset color")
|
||||
return COLORS_DICT[color]
|
||||
elif isinstance(color, list) or isinstance(color, ListConfig):
|
||||
if isinstance(color, list) or isinstance(color, ListConfig):
|
||||
if len(color) != 3:
|
||||
raise ValueError(f"Color should be 3 values (RGB) instead got {color}")
|
||||
return torch.tensor(color)
|
||||
else:
|
||||
raise ValueError(f"Color should be an RGB list or string, instead got {type(color)}")
|
||||
|
||||
raise ValueError(f"Color should be an RGB list or string, instead got {type(color)}")
|
||||
Reference in new issue
Block a user