mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-17 21:33:56 +08:00
Code cleanup (#234)
This commit is contained in:
1 parent
8b414bafab
commit
e35781fe85
14 files changed
+46
-68
No files matched your search
@@ -29,7 +29,7 @@ def load_from_json(filename: str):
|
||||
filename: The filename to load from.
|
||||
"""
|
||||
assert filename.endswith(".json")
|
||||
with open(filename, "r", encoding="UTF-8") as file:
|
||||
with open(filename, encoding="UTF-8") as file:
|
||||
return json.load(file)
|
||||
|
||||
|
||||
@@ -102,10 +102,8 @@ def get_project_root(path: str) -> str:
|
||||
project_root = os.getenv("PROJECT_ROOT")
|
||||
if project_root is None:
|
||||
logging.info(
|
||||
(
|
||||
"Please set PROJECT_ROOT to the root directory of this repo. "
|
||||
"Going to try calling get_git_root(path) instead."
|
||||
)
|
||||
"Please set PROJECT_ROOT to the root directory of this repo. "
|
||||
"Going to try calling get_git_root(path) instead."
|
||||
)
|
||||
project_root = get_git_root(path)
|
||||
return project_root
|
||||
|
||||
Reference in new issue
Block a user