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

@ -72,9 +72,7 @@ def date_or_default(date, into=None):
def to_timedelta(time):
"""Transform a datetime or a time instance to a timedelta, only using time
info."""
return datetime.timedelta(
hours=time.hour, minutes=time.minute, seconds=time.second
)
return datetime.timedelta(hours=time.hour, minutes=time.minute, seconds=time.second)
def to_seconds(time):