Feat: packaging (#127)

- Add configuration files for packaging
- Precommit now uses ruff

Co-authored-by: bkfox <thomas bkfox net>
Reviewed-on: rc/aircox#127
This commit is contained in:
Thomas Kairos
2023-10-11 10:58:34 +02:00
parent 5ea092dba6
commit f7a61fe6c0
82 changed files with 332 additions and 935 deletions

View File

@ -10,11 +10,7 @@ sys.path.insert(1, os.path.dirname(os.path.realpath(__file__)))
PROJECT_ROOT = os.path.abspath(__file__ + "/../../../")
# DEBUG mode
DEBUG = (
(os.environ["AIRCOX_DEBUG"].lower() in ("true", 1))
if "AIRCOX_DEBUG" in os.environ
else False
)
DEBUG = (os.environ["AIRCOX_DEBUG"].lower() in ("true", 1)) if "AIRCOX_DEBUG" in os.environ else False
# Internationalization and timezones: thoses values may be set in order to
# have correct translation and timezone.
@ -74,9 +70,7 @@ try:
except Exception:
print(
"Can not set locale {LC}. Is it available on you system? Hint: "
"Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(
LC=LANGUAGE_CODE
)
"Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(LC=LANGUAGE_CODE)
)
pass

View File

@ -43,8 +43,6 @@ try:
except Exception:
print(
"Can not set locale {LC}. Is it available on you system? Hint: "
"Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(
LC=LANGUAGE_CODE
)
"Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(LC=LANGUAGE_CODE)
)
pass