Compare commits

...
Author SHA1 Message Date
imcompiling f744d0d387 Merge branch '52-update-packages'
build_latest / build (push) Failing after 30s
build_release / build (push) Failing after 28s
2024-05-24 13:39:56 -04:00
imcompiling 9c71d24fe3 Unneeded file.
build_develop / build (push) Failing after 36s
2024-05-24 13:36:56 -04:00
imcompiling cdc335936c update dependencies
build_develop / build (push) Failing after 30s
2024-05-22 23:35:40 -04:00
imcompiling 303f0aa804 Update python, sqlalchemy, pandas, and nextcord. 2024-05-22 23:16:22 -04:00
imcompiling bc743cbb1a Merge branch 'fix-ruff-lint-smells'
build_latest / build (push) Successful in 18s
build_release / build (push) Successful in 19s
build_develop / build (push) Successful in 16s
2024-05-22 23:01:08 -04:00
3 changed files with 14 additions and 15 deletions
+11 -10
View File
@@ -7,16 +7,17 @@ readme = "README.md"
package-mode = false package-mode = false
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.11" python = "^3.12"
gitpython = "3.1.43" gitpython = "^3.1.43"
fastapi = "0.111.0" fastapi = "^0.111.0"
hydra-core = "1.3.2" hydra-core = "^1.3.2"
nextcord = "2.4.2" nextcord = "^2.6.0"
pandas = "1.5.2" pandas = "^2.2.2"
python-dotenv = "1.0.0" python-dotenv = "^1.0.1"
pytz = "2022.7.1" pytz = "^2024.1"
sqlalchemy = "1.4.46" sqlalchemy = "^2.0.30"
aiofiles = "^23.2.1" aiofiles = "^23.2.1"
setuptools = "^70.0.0"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
@@ -63,7 +64,7 @@ line-length = 120
indent-width = 4 indent-width = 4
# Assume Python 3.8 # Assume Python 3.8
target-version = "py311" target-version = "py312"
[tool.ruff.lint] [tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
-1
View File
@@ -1 +0,0 @@
python-3.10.4
+3 -4
View File
@@ -1,5 +1,6 @@
"""File contains util functions.""" """File contains util functions."""
import calendar
import os import os
from collections.abc import Sequence from collections.abc import Sequence
from datetime import UTC, datetime from datetime import UTC, datetime
@@ -46,12 +47,10 @@ def get_datetime(day: str) -> datetime:
day = int(day.split("/")[1]) day = int(day.split("/")[1])
# ensure that year rolls over if current month is December and the next month is less than 12. # ensure that year rolls over if current month is December and the next month is less than 12.
# TODO(imcompiling): replace with Calendar.DECEMBER when updating to python 3.12 if today.month == calendar.DECEMBER and month < calendar.DECEMBER:
# https://gitea.cheezers.org/imcompiling/dakiny-bot/issues/52
if today.month == 12 and month < 12:
year += 1 year += 1
if today.month == 1 and month > 1: if today.month == calendar.JANUARY and month > calendar.JANUARY:
year -= 1 year -= 1
return datetime(year, month, day, tzinfo=UTC) return datetime(year, month, day, tzinfo=UTC)