Fix return type is_in_edit_mode, cosmetics + type hints

This commit is contained in:
Roy Nieterau 2024-03-12 09:21:02 +01:00
parent 27053f3f8b
commit 9bc0fa9f00

View file

@ -82,7 +82,8 @@ def execute_zscript_and_wait(zscript,
)
def get_workdir():
def get_workdir() -> str:
"""Return the currently active work directory"""
return os.environ["AYON_WORKDIR"]
@ -109,7 +110,7 @@ def export_tool(filepath: str, sub_level: int):
sub_level=sub_level)
def is_in_edit_mode():
def is_in_edit_mode() -> bool:
"""Return whether transform edit mode is currently enabled.
Certain actions can't be performed if Zbrush is currently not within
@ -135,7 +136,7 @@ def is_in_edit_mode():
content = str(mode.read())
bool_mode = content.rstrip('\x00')
return bool_mode
return bool(int(bool_mode))
def remove_subtool(basename):