Skip to content

Commit 617edc8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 92c41ae commit 617edc8

File tree

2 files changed

+94
-7
lines changed

2 files changed

+94
-7
lines changed

examples/sqla_multiple_pks/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from .config import ENGINE_URI
55

6-
__all__ = ["engine", "Base"]
6+
__all__ = ["Base", "engine"]
77

88
engine = create_engine(ENGINE_URI, connect_args={"check_same_thread": False}, echo=True)
99
Base = declarative_base()

i18n/main.py

Lines changed: 93 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,99 @@ def find_datatable_locale(locale: str) -> Optional[str]:
2929
Returns:
3030
Optional[str]: The matching DataTables locale, or None if not found.
3131
"""
32-
dt_locales = (
33-
"af,sq,am,ar,hy,az-AZ,bn,eu,be,bs-BA,bg,ca,zh,zh-HANT,co,hr,cs,da,nl-NL,en-GB,eo,et,fil,fi,fr-FR,gl,"
34-
"ka,de-DE,el,gu,he,hi,hu,is,id,id-ALT,ga,it-IT,ja,jv,kn,kk,km,ko,ku,ky,lo,lv,lt,ug,mk,ms,mr,mn,ne,"
35-
"no-NB,no-NO,ps,fa,pl,pt-PT,pt-BR,pa,ro,rm,ru,sr,sr-SP,snd,si,sk,sl,es-ES,es-AR,es-CL,es-CO,es-MX,"
36-
"sw,sv-SE,tg,ta,te,th,tr,tk,uk,ur,uz,uz-CR,vi,cy"
37-
).split(",")
32+
dt_locales = [
33+
"af",
34+
"sq",
35+
"am",
36+
"ar",
37+
"hy",
38+
"az-AZ",
39+
"bn",
40+
"eu",
41+
"be",
42+
"bs-BA",
43+
"bg",
44+
"ca",
45+
"zh",
46+
"zh-HANT",
47+
"co",
48+
"hr",
49+
"cs",
50+
"da",
51+
"nl-NL",
52+
"en-GB",
53+
"eo",
54+
"et",
55+
"fil",
56+
"fi",
57+
"fr-FR",
58+
"gl",
59+
"ka",
60+
"de-DE",
61+
"el",
62+
"gu",
63+
"he",
64+
"hi",
65+
"hu",
66+
"is",
67+
"id",
68+
"id-ALT",
69+
"ga",
70+
"it-IT",
71+
"ja",
72+
"jv",
73+
"kn",
74+
"kk",
75+
"km",
76+
"ko",
77+
"ku",
78+
"ky",
79+
"lo",
80+
"lv",
81+
"lt",
82+
"ug",
83+
"mk",
84+
"ms",
85+
"mr",
86+
"mn",
87+
"ne",
88+
"no-NB",
89+
"no-NO",
90+
"ps",
91+
"fa",
92+
"pl",
93+
"pt-PT",
94+
"pt-BR",
95+
"pa",
96+
"ro",
97+
"rm",
98+
"ru",
99+
"sr",
100+
"sr-SP",
101+
"snd",
102+
"si",
103+
"sk",
104+
"sl",
105+
"es-ES",
106+
"es-AR",
107+
"es-CL",
108+
"es-CO",
109+
"es-MX",
110+
"sw",
111+
"sv-SE",
112+
"tg",
113+
"ta",
114+
"te",
115+
"th",
116+
"tr",
117+
"tk",
118+
"uk",
119+
"ur",
120+
"uz",
121+
"uz-CR",
122+
"vi",
123+
"cy",
124+
]
38125
if locale in dt_locales:
39126
return locale
40127
locale = locale.lower()

0 commit comments

Comments
 (0)