feat: add date_format and hour_format settings (#904)

* feat: add date_format and hour_format settings

* fix: fix ruff validation errors

* fix: use ruff format command

* fix: Refactor code and improve some logic

* fix: remove unused import

* Added zero padding setting and implement some comments

* Add test assert property

* fix: Unclutter selector and clarify zero-padding literal

* fix: Use static strings

Co-authored-by: Tony <1414927+zfbx@users.noreply.github.com>

---------

Co-authored-by: Tony <1414927+zfbx@users.noreply.github.com>
This commit is contained in:
JCC1998
2025-05-04 19:46:26 +02:00
committed by GitHub
parent 97ee43c875
commit f770614c4e
6 changed files with 87 additions and 2 deletions

View File

@@ -16,6 +16,9 @@ def test_read_settings():
page_size = 1337
show_filepath = 0
dark_mode = 2
date_format = "%x"
hour_format = true
zero_padding = true
""")
settings = GlobalSettings.read_settings(settings_path)
@@ -26,3 +29,6 @@ def test_read_settings():
assert settings.page_size == 1337
assert settings.show_filepath == 0
assert settings.theme == Theme.SYSTEM
assert settings.date_format == "%x"
assert settings.hour_format
assert settings.zero_padding