Bump arrow from 1.2.1 to 1.2.2 (#1630)

* Bump arrow from 1.2.1 to 1.2.2

Bumps [arrow](https://github.com/arrow-py/arrow) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/arrow-py/arrow/releases)
- [Changelog](https://github.com/arrow-py/arrow/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/arrow-py/arrow/compare/1.2.1...1.2.2)

---
updated-dependencies:
- dependency-name: arrow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update arrow==1.2.2

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

[skip ci]
This commit is contained in:
dependabot[bot] 2022-02-07 21:57:11 -08:00 committed by GitHub
parent 8e6f8d7735
commit 2d9e109f97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 891 additions and 1304 deletions

View file

@ -1 +1 @@
__version__ = "1.2.1"
__version__ = "1.2.2"

View file

@ -759,7 +759,7 @@ class Arrow:
>>> start = datetime(2013, 5, 5, 12, 30)
>>> end = datetime(2013, 5, 5, 17, 15)
>>> for r in arrow.Arrow.interval('hour', start, end, 2):
... print r
... print(r)
...
(<Arrow [2013-05-05T12:00:00+00:00]>, <Arrow [2013-05-05T13:59:59.999999+00:00]>)
(<Arrow [2013-05-05T14:00:00+00:00]>, <Arrow [2013-05-05T15:59:59.999999+00:00]>)
@ -1384,7 +1384,7 @@ class Arrow:
search_string = search_string.format(r"\d+")
# Create search pattern and find within string
pattern = re.compile(fr"{search_string}")
pattern = re.compile(fr"(^|\b|\d){search_string}")
match = pattern.search(input_string)
# If there is no match continue to next iteration

View file

@ -73,7 +73,20 @@ DEHUMANIZE_LOCALES = {
"zh-hk",
"nl",
"nl-nl",
"be",
"be-by",
"pl",
"pl-pl",
"ru",
"ru-ru",
"af",
"bg",
"bg-bg",
"ua",
"uk",
"uk-ua",
"mk",
"mk-mk",
"de",
"de-de",
"de-ch",
@ -97,6 +110,10 @@ DEHUMANIZE_LOCALES = {
"da-dk",
"ml",
"hi",
"cs",
"cs-cz",
"sk",
"sk-sk",
"fa",
"fa-ir",
"mr",
@ -145,4 +162,6 @@ DEHUMANIZE_LOCALES = {
"ta-lk",
"ur",
"ur-pk",
"kk",
"kk-kz",
}

View file

@ -46,7 +46,7 @@ _TimeFrameElements = Union[
]
_locale_map: Dict[str, Type["Locale"]] = dict()
_locale_map: Dict[str, Type["Locale"]] = {}
def get_locale(name: str) -> "Locale":
@ -172,7 +172,16 @@ class Locale:
humanized = " ".join(parts)
if not only_distance:
humanized = self._format_relative(humanized, *timeframes[-1])
# Needed to determine the correct relative string to use
timeframe_value = 0
for _unit_name, unit_value in timeframes:
if trunc(unit_value) != 0:
timeframe_value = trunc(unit_value)
break
# Note it doesn't matter the timeframe unit we use on the call, only the value
humanized = self._format_relative(humanized, "seconds", timeframe_value)
return humanized
@ -951,7 +960,7 @@ class ChineseCNLocale(Locale):
timeframes = {
"now": "刚才",
"second": "",
"second": "1",
"seconds": "{0}",
"minute": "1分钟",
"minutes": "{0}分钟",
@ -959,7 +968,7 @@ class ChineseCNLocale(Locale):
"hours": "{0}小时",
"day": "1天",
"days": "{0}",
"week": "",
"week": "1",
"weeks": "{0}",
"month": "1个月",
"months": "{0}个月",
@ -1487,8 +1496,12 @@ class RussianLocale(SlavicBaseLocale):
timeframes: ClassVar[Mapping[TimeFrameLiteral, Union[str, Mapping[str, str]]]] = {
"now": "сейчас",
"second": "Второй",
"seconds": "{0} несколько секунд",
"second": "секунда",
"seconds": {
"singular": "{0} секунду",
"dual": "{0} секунды",
"plural": "{0} секунд",
},
"minute": "минуту",
"minutes": {
"singular": "{0} минуту",
@ -1511,6 +1524,12 @@ class RussianLocale(SlavicBaseLocale):
"dual": "{0} месяца",
"plural": "{0} месяцев",
},
"quarter": "квартал",
"quarters": {
"singular": "{0} квартал",
"dual": "{0} квартала",
"plural": "{0} кварталов",
},
"year": "год",
"years": {"singular": "{0} год", "dual": "{0} года", "plural": "{0} лет"},
}
@ -2037,6 +2056,8 @@ class NorwegianLocale(Locale):
"hours": "{0} timer",
"day": "en dag",
"days": "{0} dager",
"week": "en uke",
"weeks": "{0} uker",
"month": "en måned",
"months": "{0} måneder",
"year": "ett år",
@ -2086,6 +2107,9 @@ class NorwegianLocale(Locale):
]
day_abbreviations = ["", "ma", "ti", "on", "to", "fr", "", ""]
def _ordinal_number(self, n: int) -> str:
return f"{n}."
class NewNorwegianLocale(Locale):
@ -2104,7 +2128,9 @@ class NewNorwegianLocale(Locale):
"hours": "{0} timar",
"day": "ein dag",
"days": "{0} dagar",
"month": "en månad",
"week": "ei veke",
"weeks": "{0} veker",
"month": "ein månad",
"months": "{0} månader",
"year": "eitt år",
"years": "{0} år",
@ -2153,6 +2179,9 @@ class NewNorwegianLocale(Locale):
]
day_abbreviations = ["", "", "ty", "on", "to", "fr", "la", "su"]
def _ordinal_number(self, n: int) -> str:
return f"{n}."
class PortugueseLocale(Locale):
names = ["pt", "pt-pt"]
@ -3048,44 +3077,51 @@ class CzechLocale(Locale):
timeframes: ClassVar[Mapping[TimeFrameLiteral, Union[str, Mapping[str, str]]]] = {
"now": "Teď",
"second": {"past": "vteřina", "future": "vteřina", "zero": "vteřina"},
"second": {"past": "vteřina", "future": "vteřina"},
"seconds": {
"zero": "vteřina",
"past": "{0} sekundami",
"future-singular": "{0} sekundy",
"future-paucal": "{0} sekund",
},
"minute": {"past": "minutou", "future": "minutu", "zero": "{0} minut"},
"minute": {"past": "minutou", "future": "minutu"},
"minutes": {
"zero": "{0} minut",
"past": "{0} minutami",
"future-singular": "{0} minuty",
"future-paucal": "{0} minut",
},
"hour": {"past": "hodinou", "future": "hodinu", "zero": "{0} hodin"},
"hour": {"past": "hodinou", "future": "hodinu"},
"hours": {
"zero": "{0} hodin",
"past": "{0} hodinami",
"future-singular": "{0} hodiny",
"future-paucal": "{0} hodin",
},
"day": {"past": "dnem", "future": "den", "zero": "{0} dnů"},
"day": {"past": "dnem", "future": "den"},
"days": {
"zero": "{0} dnů",
"past": "{0} dny",
"future-singular": "{0} dny",
"future-paucal": "{0} dnů",
},
"week": {"past": "týdnem", "future": "týden", "zero": "{0} týdnů"},
"week": {"past": "týdnem", "future": "týden"},
"weeks": {
"zero": "{0} týdnů",
"past": "{0} týdny",
"future-singular": "{0} týdny",
"future-paucal": "{0} týdnů",
},
"month": {"past": "měsícem", "future": "měsíc", "zero": "{0} měsíců"},
"month": {"past": "měsícem", "future": "měsíc"},
"months": {
"zero": "{0} měsíců",
"past": "{0} měsíci",
"future-singular": "{0} měsíce",
"future-paucal": "{0} měsíců",
},
"year": {"past": "rokem", "future": "rok", "zero": "{0} let"},
"year": {"past": "rokem", "future": "rok"},
"years": {
"zero": "{0} let",
"past": "{0} lety",
"future-singular": "{0} roky",
"future-paucal": "{0} let",
@ -3171,44 +3207,51 @@ class SlovakLocale(Locale):
timeframes: ClassVar[Mapping[TimeFrameLiteral, Union[str, Mapping[str, str]]]] = {
"now": "Teraz",
"second": {"past": "sekundou", "future": "sekundu", "zero": "{0} sekúnd"},
"second": {"past": "sekundou", "future": "sekundu"},
"seconds": {
"zero": "{0} sekúnd",
"past": "{0} sekundami",
"future-singular": "{0} sekundy",
"future-paucal": "{0} sekúnd",
},
"minute": {"past": "minútou", "future": "minútu", "zero": "{0} minút"},
"minute": {"past": "minútou", "future": "minútu"},
"minutes": {
"zero": "{0} minút",
"past": "{0} minútami",
"future-singular": "{0} minúty",
"future-paucal": "{0} minút",
},
"hour": {"past": "hodinou", "future": "hodinu", "zero": "{0} hodín"},
"hour": {"past": "hodinou", "future": "hodinu"},
"hours": {
"zero": "{0} hodín",
"past": "{0} hodinami",
"future-singular": "{0} hodiny",
"future-paucal": "{0} hodín",
},
"day": {"past": "dňom", "future": "deň", "zero": "{0} dní"},
"day": {"past": "dňom", "future": "deň"},
"days": {
"zero": "{0} dní",
"past": "{0} dňami",
"future-singular": "{0} dni",
"future-paucal": "{0} dní",
},
"week": {"past": "týždňom", "future": "týždeň", "zero": "{0} týždňov"},
"week": {"past": "týždňom", "future": "týždeň"},
"weeks": {
"zero": "{0} týždňov",
"past": "{0} týždňami",
"future-singular": "{0} týždne",
"future-paucal": "{0} týždňov",
},
"month": {"past": "mesiacom", "future": "mesiac", "zero": "{0} mesiacov"},
"month": {"past": "mesiacom", "future": "mesiac"},
"months": {
"zero": "{0} mesiacov",
"past": "{0} mesiacmi",
"future-singular": "{0} mesiace",
"future-paucal": "{0} mesiacov",
},
"year": {"past": "rokom", "future": "rok", "zero": "{0} rokov"},
"year": {"past": "rokom", "future": "rok"},
"years": {
"zero": "{0} rokov",
"past": "{0} rokmi",
"future-singular": "{0} roky",
"future-paucal": "{0} rokov",
@ -4229,8 +4272,12 @@ class IndonesianLocale(Locale):
"hours": "{0} jam",
"day": "1 hari",
"days": "{0} hari",
"week": "1 minggu",
"weeks": "{0} minggu",
"month": "1 bulan",
"months": "{0} bulan",
"quarter": "1 kuartal",
"quarters": "{0} kuartal",
"year": "1 tahun",
"years": "{0} tahun",
}
@ -5706,7 +5753,7 @@ class SinhalaLocale(Locale):
}
# Sinhala: the general format to describe timeframe is different from past and future,
# so we do not copy the original timeframes dictionary
timeframes_only_distance = dict()
timeframes_only_distance = {}
timeframes_only_distance["second"] = "තත්පරයක්"
timeframes_only_distance["seconds"] = "තත්පර {0}"
timeframes_only_distance["minute"] = "මිනිත්තුවක්"
@ -5895,3 +5942,71 @@ class UrduLocale(Locale):
"ہفتہ",
"اتوار",
]
class KazakhLocale(Locale):
names = ["kk", "kk-kz"]
past = "{0} бұрын"
future = "{0} кейін"
timeframes = {
"now": "қазір",
"second": "бір секунд",
"seconds": "{0} секунд",
"minute": "бір минут",
"minutes": "{0} минут",
"hour": "бір сағат",
"hours": "{0} сағат",
"day": "бір күн",
"days": "{0} күн",
"week": "бір апта",
"weeks": "{0} апта",
"month": "бір ай",
"months": "{0} ай",
"year": "бір жыл",
"years": "{0} жыл",
}
month_names = [
"",
"Қаңтар",
"Ақпан",
"Наурыз",
"Сәуір",
"Мамыр",
"Маусым",
"Шілде",
"Тамыз",
"Қыркүйек",
"Қазан",
"Қараша",
"Желтоқсан",
]
month_abbreviations = [
"",
"Қан",
"Ақп",
"Нау",
"Сәу",
"Мам",
"Мау",
"Шіл",
"Там",
"Қыр",
"Қаз",
"Қар",
"Жел",
]
day_names = [
"",
"Дүйсембі",
"Сейсенбі",
"Сәрсенбі",
"Бейсенбі",
"Жұма",
"Сенбі",
"Жексенбі",
]
day_abbreviations = ["", "Дс", "Сс", "Ср", "Бс", "Жм", "Сб", "Жс"]

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
appdirs==1.4.4
apscheduler==3.8.0
arrow==1.2.1
arrow==1.2.2
backports.csv==1.0.7
backports.functools-lru-cache==1.6.4
backports.zoneinfo==0.2.1