fix: Correct indentation and formatting issues in totally_reset_cursor.py

- Fixed indentation in the get_cursor_paths function for better readability.
- Adjusted the else statement in the MachineIDResetter class to maintain consistent formatting.
- Ensured proper newline at the end of the file for compliance with coding standards.
This commit is contained in:
yeongpin 2025-04-06 17:31:10 +08:00
parent 07bed23848
commit 3424f49a57

View File

@ -111,7 +111,7 @@ def get_cursor_paths(translator=None) -> Tuple[str, str]:
# For Linux, try to find the first existing path if the configured one doesn't exist
if system == "Linux" and not os.path.exists(base_path):
for path in default_paths["Linux"]:
if os.path.exists(path):
if os.path.exists(path):
base_path = path
# Update config with the found path
config.set(section, 'cursor_path', path)
@ -529,7 +529,7 @@ class MachineIDResetter:
self.db_path = config.get('LinuxPaths', 'storage_path')
self.sqlite_path = config.get('LinuxPaths', 'sqlite_path')
else:
else:
raise NotImplementedError(f"Not Supported OS: {sys.platform}")
# Save any changes to config file
@ -811,4 +811,4 @@ def run(translator=None):
if __name__ == "__main__":
from main import translator as main_translator
run(main_translator)
run(main_translator)