mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
preserve abbreviated month spellings
This commit is contained in:
parent
f1cab7d9eb
commit
dcd688ee8b
2 changed files with 5 additions and 0 deletions
|
|
@ -46,7 +46,9 @@ _DURATION_UNIT_ALIASES: Final[dict[str, str]] = { # mutable-ok: constant lookup
|
|||
"week": "w",
|
||||
"weeks": "w",
|
||||
"mo": "mo",
|
||||
"mos": "mo",
|
||||
"mon": "mo",
|
||||
"mons": "mo",
|
||||
"month": "mo",
|
||||
"months": "mo",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -421,6 +421,9 @@ class TestDurationInSeconds(unittest.TestCase):
|
|||
with self.subTest(duration=duration):
|
||||
self.assertEqual(duration_in_seconds(duration), expected)
|
||||
|
||||
self.assertEqual(duration_in_seconds("1mos"), duration_in_seconds("1mo"))
|
||||
self.assertEqual(duration_in_seconds("2mons"), duration_in_seconds("2mo"))
|
||||
|
||||
def test_long_unit_spelling_sets_reset_interval(self):
|
||||
now = datetime(2023, 5, 15, 15, 0, 0, tzinfo=timezone.utc)
|
||||
self.assertEqual(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue