diff --git a/stubs/workalendar/workalendar/africa/algeria.pyi b/stubs/workalendar/workalendar/africa/algeria.pyi index af4957704954..957df97767d4 100644 --- a/stubs/workalendar/workalendar/africa/algeria.pyi +++ b/stubs/workalendar/workalendar/africa/algeria.pyi @@ -1,13 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import IslamicCalendar -class Algeria(IslamicCalendar): - include_labour_day: ClassVar[bool] - include_prophet_birthday: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - include_day_of_sacrifice: ClassVar[bool] - include_islamic_new_year: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - ISLAMIC_HOLIDAYS: Incomplete +class Algeria(IslamicCalendar): ... diff --git a/stubs/workalendar/workalendar/africa/angola.pyi b/stubs/workalendar/workalendar/africa/angola.pyi index 5c7b084357bb..a6832ca40b70 100644 --- a/stubs/workalendar/workalendar/africa/angola.pyi +++ b/stubs/workalendar/workalendar/africa/angola.pyi @@ -1,15 +1,6 @@ -from _typeshed import Incomplete from typing import ClassVar from ..core import WesternCalendar class Angola(WesternCalendar): - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - include_fat_tuesday: ClassVar[bool] fat_tuesday_label: ClassVar[str] - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_christmas: ClassVar[bool] - include_all_souls: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete diff --git a/stubs/workalendar/workalendar/africa/benin.pyi b/stubs/workalendar/workalendar/africa/benin.pyi index 9aa56341f3ac..00bd9e9c3b0e 100644 --- a/stubs/workalendar/workalendar/africa/benin.pyi +++ b/stubs/workalendar/workalendar/africa/benin.pyi @@ -1,18 +1,6 @@ -from _typeshed import Incomplete from typing import ClassVar from ..core import IslamoWesternCalendar class Benin(IslamoWesternCalendar): - include_labour_day: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_prophet_birthday: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - include_day_of_sacrifice: ClassVar[bool] include_day_of_sacrifice_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete - WEEKEND_DAYS: Incomplete diff --git a/stubs/workalendar/workalendar/africa/ivory_coast.pyi b/stubs/workalendar/workalendar/africa/ivory_coast.pyi index 4c205238d037..cec64961575f 100644 --- a/stubs/workalendar/workalendar/africa/ivory_coast.pyi +++ b/stubs/workalendar/workalendar/africa/ivory_coast.pyi @@ -1,18 +1,6 @@ -from _typeshed import Incomplete from typing import ClassVar from ..core import IslamoWesternCalendar class IvoryCoast(IslamoWesternCalendar): - include_labour_day: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_day_after_prophet_birthday: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - include_day_of_sacrifice: ClassVar[bool] include_day_of_sacrifice_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete - WEEKEND_DAYS: Incomplete diff --git a/stubs/workalendar/workalendar/africa/kenya.pyi b/stubs/workalendar/workalendar/africa/kenya.pyi index ffa19d6a6f04..c555fe0f9d1e 100644 --- a/stubs/workalendar/workalendar/africa/kenya.pyi +++ b/stubs/workalendar/workalendar/africa/kenya.pyi @@ -1,18 +1,8 @@ -from _typeshed import Incomplete -from collections.abc import Generator +from collections.abc import Generator, Iterable from typing import ClassVar -from ..core import IslamoWesternCalendar +from ..core import _D, IslamoWesternCalendar class Kenya(IslamoWesternCalendar): - include_labour_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - include_day_of_sacrifice: ClassVar[bool] shift_sunday_holidays: ClassVar[bool] - WEEKEND_DAYS: Incomplete - FIXED_HOLIDAYS: Incomplete - def get_fixed_holidays(self, year): ... - def get_shifted_holidays(self, dates) -> Generator[Incomplete, None, None]: ... - def get_calendar_holidays(self, year): ... + def get_shifted_holidays(self, dates: Iterable[tuple[_D, str]]) -> Generator[tuple[_D, str]]: ... diff --git a/stubs/workalendar/workalendar/africa/madagascar.pyi b/stubs/workalendar/workalendar/africa/madagascar.pyi index 56e9cfac956b..dbb6ae27ad5a 100644 --- a/stubs/workalendar/workalendar/africa/madagascar.pyi +++ b/stubs/workalendar/workalendar/africa/madagascar.pyi @@ -1,13 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Madagascar(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] +class Madagascar(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/africa/mozambique.pyi b/stubs/workalendar/workalendar/africa/mozambique.pyi index 316db2247457..8857c6e1d904 100644 --- a/stubs/workalendar/workalendar/africa/mozambique.pyi +++ b/stubs/workalendar/workalendar/africa/mozambique.pyi @@ -1,10 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Mozambique(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_christmas: ClassVar[bool] +class Mozambique(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/africa/nigeria.pyi b/stubs/workalendar/workalendar/africa/nigeria.pyi index 79bd16f7429c..97d2819a7f46 100644 --- a/stubs/workalendar/workalendar/africa/nigeria.pyi +++ b/stubs/workalendar/workalendar/africa/nigeria.pyi @@ -1,18 +1,6 @@ -from _typeshed import Incomplete from typing import ClassVar from ..core import IslamoWesternCalendar class Nigeria(IslamoWesternCalendar): - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - include_day_of_sacrifice: ClassVar[bool] shift_sunday_holidays: ClassVar[bool] - shift_new_years_day: ClassVar[bool] - WEEKEND_DAYS: Incomplete - FIXED_HOLIDAYS: Incomplete - def get_fixed_holidays(self, year): ... diff --git a/stubs/workalendar/workalendar/africa/sao_tome.pyi b/stubs/workalendar/workalendar/africa/sao_tome.pyi index 58e377fabfae..ac4dc6864fce 100644 --- a/stubs/workalendar/workalendar/africa/sao_tome.pyi +++ b/stubs/workalendar/workalendar/africa/sao_tome.pyi @@ -1,9 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class SaoTomeAndPrincipe(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - include_all_saints: ClassVar[bool] +class SaoTomeAndPrincipe(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/africa/south_africa.pyi b/stubs/workalendar/workalendar/africa/south_africa.pyi index a7c7afbd1dda..3823ba468140 100644 --- a/stubs/workalendar/workalendar/africa/south_africa.pyi +++ b/stubs/workalendar/workalendar/africa/south_africa.pyi @@ -1,12 +1,6 @@ -from typing import ClassVar +import datetime from ..core import WesternCalendar class SouthAfrica(WesternCalendar): - include_good_friday: ClassVar[bool] - include_christmas: ClassVar[bool] - def holidays(self, year=None): ... - def get_easter_monday_or_family_day(self, year): ... - def get_fixed_holidays(self, year): ... - def get_variable_days(self, year): ... - def get_calendar_holidays(self, year): ... + def get_easter_monday_or_family_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/africa/tunisia.pyi b/stubs/workalendar/workalendar/africa/tunisia.pyi index 5c620ea101cd..34e2e252b214 100644 --- a/stubs/workalendar/workalendar/africa/tunisia.pyi +++ b/stubs/workalendar/workalendar/africa/tunisia.pyi @@ -1,16 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import IslamicCalendar -class Tunisia(IslamicCalendar): - include_labour_day: ClassVar[bool] - include_prophet_birthday: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - length_eid_al_fitr: int - include_day_of_sacrifice: ClassVar[bool] - length_eid_al_adha: int - include_islamic_new_year: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - WEEKEND_DAYS: Incomplete - def get_fixed_holidays(self, year): ... +class Tunisia(IslamicCalendar): ... diff --git a/stubs/workalendar/workalendar/america/argentina.pyi b/stubs/workalendar/workalendar/america/argentina.pyi index 186728dc2385..775f9ab0cdac 100644 --- a/stubs/workalendar/workalendar/america/argentina.pyi +++ b/stubs/workalendar/workalendar/america/argentina.pyi @@ -1,23 +1,12 @@ -from _typeshed import Incomplete +import datetime from typing import ClassVar from ..core import WesternCalendar class Argentina(WesternCalendar): - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - include_fat_tuesday: ClassVar[bool] fat_tuesday_label: ClassVar[str] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_christmas: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - immaculate_conception_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete - def get_general_guemes_day(self, year): ... - def get_general_martin_day(self, year): ... - def get_soberania_day(self, year): ... - def get_diversidad_day(self, year): ... - def get_malvinas_day(self, year): ... - def get_variable_days(self, year): ... + def get_general_guemes_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_general_martin_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_soberania_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_diversidad_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_malvinas_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/america/barbados.pyi b/stubs/workalendar/workalendar/america/barbados.pyi index 4a8aa9520d20..718c73e9c121 100644 --- a/stubs/workalendar/workalendar/america/barbados.pyi +++ b/stubs/workalendar/workalendar/america/barbados.pyi @@ -1,18 +1,10 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar class Barbados(WesternCalendar): - include_labour_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_whit_monday: ClassVar[bool] - non_computable_holiday_dict: Incomplete - FIXED_HOLIDAYS: Incomplete - def get_kadooment_day(self, year): ... - def get_emancipation_day(self, year): ... - def get_variable_days(self, year): ... - def non_computable_holiday(self, year): ... - def get_fixed_holidays(self, year): ... + non_computable_holiday_dict: dict[int, list[tuple[datetime.date, str]]] + def get_kadooment_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_emancipation_day(self, year: int) -> tuple[datetime.date, str]: ... + def non_computable_holiday(self, year: int) -> list[tuple[datetime.date, str]] | None: ... + def get_fixed_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... diff --git a/stubs/workalendar/workalendar/america/brazil.pyi b/stubs/workalendar/workalendar/america/brazil.pyi index bbce7bae3db8..484666bd4817 100644 --- a/stubs/workalendar/workalendar/america/brazil.pyi +++ b/stubs/workalendar/workalendar/america/brazil.pyi @@ -1,268 +1,93 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime +from typing import ClassVar, Final from ..core import WesternCalendar class Brazil(WesternCalendar): - FIXED_HOLIDAYS: Incomplete include_sao_jose: ClassVar[bool] sao_jose_label: ClassVar[str] include_sao_pedro: ClassVar[bool] sao_pedro_label: ClassVar[str] include_sao_joao: ClassVar[bool] sao_joao_label: ClassVar[str] - include_labour_day: ClassVar[bool] include_servidor_publico: ClassVar[bool] servidor_publico_label: ClassVar[str] include_consciencia_negra: ClassVar[bool] - consciencia_negra_day: Incomplete + consciencia_negra_day: ClassVar[tuple[int, int]] consciencia_negra_label: ClassVar[str] - include_easter_sunday: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - immaculate_conception_label: ClassVar[str] - def get_variable_days(self, year): ... -class BrazilAcre(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilAlagoas(Brazil): - FIXED_HOLIDAYS: Incomplete - include_sao_pedro: ClassVar[bool] - include_sao_joao: ClassVar[bool] - include_consciencia_negra: ClassVar[bool] - -class BrazilAmapa(Brazil): - FIXED_HOLIDAYS: Incomplete - include_sao_jose: ClassVar[bool] - sao_jose_label: ClassVar[str] - include_consciencia_negra: ClassVar[bool] - -class BrazilAmazonas(Brazil): - FIXED_HOLIDAYS: Incomplete - include_consciencia_negra: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - -class BrazilBahia(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilCeara(Brazil): - FIXED_HOLIDAYS: Incomplete - include_sao_jose: ClassVar[bool] - -class BrazilDistritoFederal(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilEspiritoSanto(Brazil): - include_servidor_publico: ClassVar[bool] - -class BrazilGoias(Brazil): - include_servidor_publico: ClassVar[bool] - -class BrazilMaranhao(Brazil): - FIXED_HOLIDAYS: Incomplete - include_immaculate_conception: ClassVar[bool] - -class BrazilMinasGerais(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilMatoGrosso(Brazil): - include_consciencia_negra: ClassVar[bool] - consciencia_negra_day: Incomplete - -class BrazilMatoGrossoDoSul(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilPara(Brazil): - FIXED_HOLIDAYS: Incomplete - include_immaculate_conception: ClassVar[bool] - -class BrazilParaiba(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilPernambuco(Brazil): - FIXED_HOLIDAYS: Incomplete - include_sao_joao: ClassVar[bool] - -class BrazilPiaui(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilParana(Brazil): - FIXED_HOLIDAYS: Incomplete +class BrazilAcre(Brazil): ... +class BrazilAlagoas(Brazil): ... +class BrazilAmapa(Brazil): ... +class BrazilAmazonas(Brazil): ... +class BrazilBahia(Brazil): ... +class BrazilCeara(Brazil): ... +class BrazilDistritoFederal(Brazil): ... +class BrazilEspiritoSanto(Brazil): ... +class BrazilGoias(Brazil): ... +class BrazilMaranhao(Brazil): ... +class BrazilMinasGerais(Brazil): ... +class BrazilMatoGrosso(Brazil): ... +class BrazilMatoGrossoDoSul(Brazil): ... +class BrazilPara(Brazil): ... +class BrazilParaiba(Brazil): ... +class BrazilPernambuco(Brazil): ... +class BrazilPiaui(Brazil): ... +class BrazilParana(Brazil): ... class BrazilRioDeJaneiro(Brazil): - FIXED_HOLIDAYS: Incomplete - include_fat_tuesday: ClassVar[bool] fat_tuesday_label: ClassVar[str] - include_servidor_publico: ClassVar[bool] - servidor_publico_label: ClassVar[str] - include_consciencia_negra: ClassVar[bool] - consciencia_negra_label: ClassVar[str] - include_immaculate_conception: ClassVar[bool] - def get_dia_do_comercio(self, year): ... - def get_variable_days(self, year): ... - -class BrazilRioGrandeDoNorte(Brazil): - FIXED_HOLIDAYS: Incomplete - include_sao_pedro: ClassVar[bool] - sao_pedro_label: ClassVar[str] - -class BrazilRioGrandeDoSul(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilRondonia(Brazil): - FIXED_HOLIDAYS: Incomplete + def get_dia_do_comercio(self, year: int) -> datetime.date | None: ... -class BrazilRoraima(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilSantaCatarina(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilSaoPauloState(Brazil): - FIXED_HOLIDAYS: Incomplete +class BrazilRioGrandeDoNorte(Brazil): ... +class BrazilRioGrandeDoSul(Brazil): ... +class BrazilRondonia(Brazil): ... +class BrazilRoraima(Brazil): ... +class BrazilSantaCatarina(Brazil): ... +class BrazilSaoPauloState(Brazil): ... class BrazilSaoPauloCity(BrazilSaoPauloState): - FIXED_HOLIDAYS: Incomplete - include_fat_tuesday: ClassVar[bool] fat_tuesday_label: ClassVar[str] - include_easter_sunday: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_good_friday: ClassVar[bool] - good_friday_label: ClassVar[str] - include_consciencia_negra: ClassVar[bool] - consciencia_negra_label: ClassVar[str] - -class BrazilSergipe(Brazil): - FIXED_HOLIDAYS: Incomplete -class BrazilTocantins(Brazil): - FIXED_HOLIDAYS: Incomplete - -class BrazilVitoriaCity(BrazilEspiritoSanto): - FIXED_HOLIDAYS: Incomplete - include_corpus_christi: ClassVar[bool] - include_good_friday: ClassVar[bool] - good_friday_label: ClassVar[str] - -class BrazilVilaVelhaCity(BrazilEspiritoSanto): - FIXED_HOLIDAYS: Incomplete - -class BrazilCariacicaCity(BrazilEspiritoSanto): - FIXED_HOLIDAYS: Incomplete - include_corpus_christi: ClassVar[bool] - include_good_friday: ClassVar[bool] - good_friday_label: ClassVar[str] - include_sao_joao: ClassVar[bool] - sao_joao_label: ClassVar[str] - -class BrazilGuarapariCity(BrazilEspiritoSanto): - FIXED_HOLIDAYS: Incomplete - include_sao_pedro: ClassVar[bool] - include_consciencia_negra: ClassVar[bool] - consciencia_negra_day: Incomplete - include_immaculate_conception: ClassVar[bool] +class BrazilSergipe(Brazil): ... +class BrazilTocantins(Brazil): ... +class BrazilVitoriaCity(BrazilEspiritoSanto): ... +class BrazilVilaVelhaCity(BrazilEspiritoSanto): ... +class BrazilCariacicaCity(BrazilEspiritoSanto): ... +class BrazilGuarapariCity(BrazilEspiritoSanto): ... class BrazilSerraCity(BrazilEspiritoSanto): - FIXED_HOLIDAYS: Incomplete - include_fat_tuesday: ClassVar[bool] fat_tuesday_label: ClassVar[str] - include_ash_wednesday: ClassVar[bool] - ash_wednesday_label: ClassVar[str] - include_good_friday: ClassVar[bool] - good_friday_label: ClassVar[str] - include_sao_pedro: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - def get_variable_days(self, year): ... - -class BrazilRioBrancoCity(BrazilAcre): - FIXED_HOLIDAYS: Incomplete - -class BrazilMaceioCity(BrazilAlagoas): - FIXED_HOLIDAYS: Incomplete - -class BrazilManausCity(BrazilAmazonas): - FIXED_HOLIDAYS: Incomplete - -class BrazilMacapaCity(BrazilAmapa): - FIXED_HOLIDAYS: Incomplete - -class BrazilSalvadorCity(BrazilBahia): - FIXED_HOLIDAYS: Incomplete - -class BrazilFortalezaCity(BrazilCeara): - FIXED_HOLIDAYS: Incomplete - -class BrazilGoianiaCity(BrazilGoias): - FIXED_HOLIDAYS: Incomplete - -class BrazilBeloHorizonteCity(BrazilMinasGerais): - FIXED_HOLIDAYS: Incomplete - -class BrazilCampoGrandeCity(BrazilMatoGrossoDoSul): - FIXED_HOLIDAYS: Incomplete - -class BrazilCuiabaCity(BrazilMatoGrosso): - FIXED_HOLIDAYS: Incomplete - include_easter_sunday: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_good_friday: ClassVar[bool] - good_friday_label: ClassVar[str] - -class BrazilBelemCity(BrazilPara): - FIXED_HOLIDAYS: Incomplete - -class BrazilJoaoPessoaCity(BrazilParaiba): - FIXED_HOLIDAYS: Incomplete - -class BrazilRecifeCity(BrazilPernambuco): - FIXED_HOLIDAYS: Incomplete - -class BrazilTeresinaCity(BrazilPiaui): - FIXED_HOLIDAYS: Incomplete - -class BrazilCuritibaCity(BrazilParana): - FIXED_HOLIDAYS: Incomplete - -class BrazilNatalCity(BrazilRioGrandeDoNorte): - FIXED_HOLIDAYS: Incomplete - -class BrazilPortoVelhoCity(BrazilRondonia): - FIXED_HOLIDAYS: Incomplete - -class BrazilBoaVistaCity(BrazilRoraima): - FIXED_HOLIDAYS: Incomplete - -class BrazilPortoAlegreCity(BrazilRioGrandeDoSul): - FIXED_HOLIDAYS: Incomplete - -class BrazilChapecoCity(BrazilSantaCatarina): - FIXED_HOLIDAYS: Incomplete - -class BrazilFlorianopolisCity(BrazilSantaCatarina): - FIXED_HOLIDAYS: Incomplete - -class BrazilJoinvilleCity(BrazilSantaCatarina): - FIXED_HOLIDAYS: Incomplete - -class BrazilAracajuCity(BrazilSergipe): - FIXED_HOLIDAYS: Incomplete - -class BrazilSorocabaCity(BrazilSaoPauloState): - FIXED_HOLIDAYS: Incomplete -class BrazilPalmasCity(BrazilTocantins): - FIXED_HOLIDAYS: Incomplete +class BrazilRioBrancoCity(BrazilAcre): ... +class BrazilMaceioCity(BrazilAlagoas): ... +class BrazilManausCity(BrazilAmazonas): ... +class BrazilMacapaCity(BrazilAmapa): ... +class BrazilSalvadorCity(BrazilBahia): ... +class BrazilFortalezaCity(BrazilCeara): ... +class BrazilGoianiaCity(BrazilGoias): ... +class BrazilBeloHorizonteCity(BrazilMinasGerais): ... +class BrazilCampoGrandeCity(BrazilMatoGrossoDoSul): ... +class BrazilCuiabaCity(BrazilMatoGrosso): ... +class BrazilBelemCity(BrazilPara): ... +class BrazilJoaoPessoaCity(BrazilParaiba): ... +class BrazilRecifeCity(BrazilPernambuco): ... +class BrazilTeresinaCity(BrazilPiaui): ... +class BrazilCuritibaCity(BrazilParana): ... +class BrazilNatalCity(BrazilRioGrandeDoNorte): ... +class BrazilPortoVelhoCity(BrazilRondonia): ... +class BrazilBoaVistaCity(BrazilRoraima): ... +class BrazilPortoAlegreCity(BrazilRioGrandeDoSul): ... +class BrazilChapecoCity(BrazilSantaCatarina): ... +class BrazilFlorianopolisCity(BrazilSantaCatarina): ... +class BrazilJoinvilleCity(BrazilSantaCatarina): ... +class BrazilAracajuCity(BrazilSergipe): ... +class BrazilSorocabaCity(BrazilSaoPauloState): ... +class BrazilPalmasCity(BrazilTocantins): ... class BrazilBankCalendar(Brazil): - include_fat_tuesday: ClassVar[bool] fat_tuesday_label: ClassVar[str] - include_good_friday: ClassVar[bool] - include_ash_wednesday: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - def get_last_day_of_year_for_only_internal_bank_trans(self, year): ... - def get_variable_days(self, year): ... - def find_following_working_day(self, day): ... + def get_last_day_of_year_for_only_internal_bank_trans(self, year: int) -> datetime.date: ... -IBGE_TUPLE: Incomplete -IBGE_REGISTER: Incomplete +IBGE_TUPLE: Final[tuple[tuple[str, type[Brazil]], ...]] +IBGE_REGISTER: Final[dict[str, type[Brazil]]] diff --git a/stubs/workalendar/workalendar/america/canada.pyi b/stubs/workalendar/workalendar/america/canada.pyi index af6479b5118f..139cfe866e58 100644 --- a/stubs/workalendar/workalendar/america/canada.pyi +++ b/stubs/workalendar/workalendar/america/canada.pyi @@ -1,89 +1,45 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar -class Canada(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - shift_new_years_day: ClassVar[bool] - def get_variable_days(self, year): ... +class Canada(WesternCalendar): ... class LateFamilyDayMixin: - def get_family_day(self, year, label: str = "Family Day"): ... + def get_family_day(self, year: int, label: str = "Family Day") -> tuple[datetime.date, str]: ... class VictoriaDayMixin: - def get_victoria_day(self, year): ... + def get_victoria_day(self, year: int) -> tuple[datetime.date, str] | None: ... class AugustCivicHolidayMixin: - def get_civic_holiday(self, year, label: str = "Civic Holiday"): ... + def get_civic_holiday(self, year: int, label: str = "Civic Holiday") -> tuple[datetime.date, str]: ... class ThanksgivingMixin: - def get_thanksgiving(self, year): ... + def get_thanksgiving(self, year: int) -> tuple[datetime.date, str]: ... class BoxingDayMixin: - def get_boxing_day(self, year): ... + def get_boxing_day(self, year: int) -> list[tuple[datetime.date, str]]: ... class StJeanBaptisteMixin: - def get_st_jean(self, year): ... + def get_st_jean(self, year: int) -> list[tuple[datetime.date, str]]: ... class RemembranceDayShiftMixin: - def get_remembrance_day(self, year): ... + def get_remembrance_day(self, year: int) -> list[tuple[datetime.date, str]]: ... -class Ontario(BoxingDayMixin, ThanksgivingMixin, VictoriaDayMixin, LateFamilyDayMixin, AugustCivicHolidayMixin, Canada): - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... - -class Quebec(VictoriaDayMixin, StJeanBaptisteMixin, ThanksgivingMixin, Canada): - include_easter_monday: ClassVar[bool] - def get_variable_days(self, year): ... +class Ontario(BoxingDayMixin, ThanksgivingMixin, VictoriaDayMixin, LateFamilyDayMixin, AugustCivicHolidayMixin, Canada): ... +class Quebec(VictoriaDayMixin, StJeanBaptisteMixin, ThanksgivingMixin, Canada): ... class BritishColumbia(VictoriaDayMixin, AugustCivicHolidayMixin, ThanksgivingMixin, Canada): - include_good_friday: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_family_day(self, year): ... - def get_variable_days(self, year): ... - -class Alberta(LateFamilyDayMixin, VictoriaDayMixin, ThanksgivingMixin, Canada): - include_good_friday: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_variable_days(self, year): ... + def get_family_day(self, year: int) -> tuple[datetime.date, str]: ... +class Alberta(LateFamilyDayMixin, VictoriaDayMixin, ThanksgivingMixin, Canada): ... class Saskatchewan( LateFamilyDayMixin, VictoriaDayMixin, RemembranceDayShiftMixin, AugustCivicHolidayMixin, ThanksgivingMixin, Canada -): - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... - -class Manitoba(LateFamilyDayMixin, VictoriaDayMixin, AugustCivicHolidayMixin, ThanksgivingMixin, Canada): - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... - -class NewBrunswick(AugustCivicHolidayMixin, Canada): - FIXED_HOLIDAYS: Incomplete - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... - -class NovaScotia(RemembranceDayShiftMixin, LateFamilyDayMixin, Canada): - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... - -class PrinceEdwardIsland(LateFamilyDayMixin, RemembranceDayShiftMixin, Canada): - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... - -class Newfoundland(Canada): - include_good_friday: ClassVar[bool] - -class Yukon(VictoriaDayMixin, ThanksgivingMixin, Canada): - FIXED_HOLIDAYS: Incomplete - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... - -class NorthwestTerritories(RemembranceDayShiftMixin, VictoriaDayMixin, ThanksgivingMixin, Canada): - FIXED_HOLIDAYS: Incomplete - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... - -class Nunavut(VictoriaDayMixin, ThanksgivingMixin, RemembranceDayShiftMixin, Canada): - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... +): ... +class Manitoba(LateFamilyDayMixin, VictoriaDayMixin, AugustCivicHolidayMixin, ThanksgivingMixin, Canada): ... +class NewBrunswick(AugustCivicHolidayMixin, Canada): ... +class NovaScotia(RemembranceDayShiftMixin, LateFamilyDayMixin, Canada): ... +class PrinceEdwardIsland(LateFamilyDayMixin, RemembranceDayShiftMixin, Canada): ... +class Newfoundland(Canada): ... +class Yukon(VictoriaDayMixin, ThanksgivingMixin, Canada): ... +class NorthwestTerritories(RemembranceDayShiftMixin, VictoriaDayMixin, ThanksgivingMixin, Canada): ... +class Nunavut(VictoriaDayMixin, ThanksgivingMixin, RemembranceDayShiftMixin, Canada): ... diff --git a/stubs/workalendar/workalendar/america/chile.pyi b/stubs/workalendar/workalendar/america/chile.pyi index 852ae4114ecf..108d5b1ec3b7 100644 --- a/stubs/workalendar/workalendar/america/chile.pyi +++ b/stubs/workalendar/workalendar/america/chile.pyi @@ -1,14 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Chile(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - def get_variable_days(self, year): ... +class Chile(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/america/colombia.pyi b/stubs/workalendar/workalendar/america/colombia.pyi index 7208847832b1..6bbec83892fe 100644 --- a/stubs/workalendar/workalendar/america/colombia.pyi +++ b/stubs/workalendar/workalendar/america/colombia.pyi @@ -1,25 +1,14 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar class Colombia(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - include_palm_sunday: ClassVar[bool] - include_holy_thursday: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - def get_epiphany(self, year): ... - def get_saint_joseph(self, year): ... - def get_ascension(self, year): ... - def get_corpus_christi(self, year): ... - def get_sacred_heart(self, year): ... - def get_saint_peter_and_saint_paul(self, year): ... - def get_assumption(self, year): ... - def get_day_of_the_races(self, year): ... - def get_all_saints(self, year): ... - def get_cartagena_independence(self, year): ... - def get_variable_days(self, year): ... + def get_epiphany(self, year: int) -> datetime.date: ... + def get_saint_joseph(self, year: int) -> datetime.date: ... + def get_ascension(self, year: int) -> datetime.date: ... + def get_sacred_heart(self, year: int) -> datetime.date: ... + def get_saint_peter_and_saint_paul(self, year: int) -> datetime.date: ... + def get_assumption(self, year: int) -> datetime.date: ... + def get_day_of_the_races(self, year: int) -> datetime.date: ... + def get_all_saints(self, year: int) -> datetime.date: ... + def get_cartagena_independence(self, year: int) -> datetime.date: ... diff --git a/stubs/workalendar/workalendar/america/el_salvador.pyi b/stubs/workalendar/workalendar/america/el_salvador.pyi index 18d6d7f049b8..a2da75f1dfdc 100644 --- a/stubs/workalendar/workalendar/america/el_salvador.pyi +++ b/stubs/workalendar/workalendar/america/el_salvador.pyi @@ -1,11 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class ElSalvador(WesternCalendar): - include_labour_day: ClassVar[bool] - include_holy_thursday: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete +class ElSalvador(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/america/mexico.pyi b/stubs/workalendar/workalendar/america/mexico.pyi index 81f6da8d37fc..4dc4a13f4078 100644 --- a/stubs/workalendar/workalendar/america/mexico.pyi +++ b/stubs/workalendar/workalendar/america/mexico.pyi @@ -1,10 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Mexico(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - def get_variable_days(self, year): ... - def get_calendar_holidays(self, year): ... +class Mexico(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/america/panama.pyi b/stubs/workalendar/workalendar/america/panama.pyi index 934b98c41ee3..25264be406e4 100644 --- a/stubs/workalendar/workalendar/america/panama.pyi +++ b/stubs/workalendar/workalendar/america/panama.pyi @@ -1,12 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Panama(WesternCalendar): - include_labour_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_variable_days(self, year): ... +class Panama(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/america/paraguay.pyi b/stubs/workalendar/workalendar/america/paraguay.pyi index 18e42d7695cb..3758920404d8 100644 --- a/stubs/workalendar/workalendar/america/paraguay.pyi +++ b/stubs/workalendar/workalendar/america/paraguay.pyi @@ -1,17 +1,8 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar class Paraguay(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - include_holy_thursday: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - immaculate_conception_label: ClassVar[str] - def get_heroes_day(self, year): ... - def get_founding_of_asuncion(self, year): ... - def get_boqueron_battle_victory_day(self, year): ... - def get_fixed_holidays(self, year): ... + def get_heroes_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_founding_of_asuncion(self, year: int) -> tuple[datetime.date, str]: ... + def get_boqueron_battle_victory_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/asia/china.pyi b/stubs/workalendar/workalendar/asia/china.pyi index c9b89624abfb..e68bf5200f4f 100644 --- a/stubs/workalendar/workalendar/asia/china.pyi +++ b/stubs/workalendar/workalendar/asia/china.pyi @@ -1,18 +1,11 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime +from typing import Final from ..core import ChineseNewYearCalendar -holidays: Incomplete -workdays: Incomplete +holidays: Final[dict[int, dict[str, list[tuple[int, int]]]]] +workdays: Final[dict[int, dict[str, list[tuple[int, int]]]]] class China(ChineseNewYearCalendar): - shift_new_years_day: ClassVar[bool] - include_chinese_new_year_eve: ClassVar[bool] - extra_working_days: Incomplete + extra_working_days: list[datetime.date] def __init__(self, *args, **kwargs) -> None: ... - def get_calendar_holidays(self, year): ... - def get_variable_days(self, year): ... - def is_working_day(self, day, extra_working_days=None, extra_holidays=None): ... - def add_working_days(self, day, delta, extra_working_days=None, extra_holidays=None, keep_datetime: bool = False): ... - def sub_working_days(self, day, delta, extra_working_days=None, extra_holidays=None, keep_datetime: bool = False): ... diff --git a/stubs/workalendar/workalendar/asia/hong_kong.pyi b/stubs/workalendar/workalendar/asia/hong_kong.pyi index 14180c89e0fa..ff2c2d299e74 100644 --- a/stubs/workalendar/workalendar/asia/hong_kong.pyi +++ b/stubs/workalendar/workalendar/asia/hong_kong.pyi @@ -1,24 +1,4 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import ChineseNewYearCalendar, WesternMixin -class HongKong(WesternMixin, ChineseNewYearCalendar): - include_labour_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - WEEKEND_DAYS: Incomplete - FIXED_HOLIDAYS: Incomplete - chinese_new_year_label: ClassVar[str] - include_chinese_second_day: ClassVar[bool] - chinese_second_day_label: ClassVar[str] - include_chinese_third_day: ClassVar[bool] - chinese_third_day_label: ClassVar[str] - shift_sunday_holidays: ClassVar[bool] - shift_start_cny_sunday: ClassVar[bool] - def get_variable_days(self, year): ... - -class HongKongBank(HongKong): - WEEKEND_DAYS: Incomplete +class HongKong(WesternMixin, ChineseNewYearCalendar): ... +class HongKongBank(HongKong): ... diff --git a/stubs/workalendar/workalendar/asia/israel.pyi b/stubs/workalendar/workalendar/asia/israel.pyi index 5149ef1dbd69..7b55f6a1ec86 100644 --- a/stubs/workalendar/workalendar/asia/israel.pyi +++ b/stubs/workalendar/workalendar/asia/israel.pyi @@ -1,10 +1,10 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime +from typing import Any +from typing_extensions import TypeAlias from ..core import Calendar +_HebrewDate: TypeAlias = Any | datetime.date # from `pyluach.dates` package + class Israel(Calendar): - include_new_years_day: ClassVar[bool] - WEEKEND_DAYS: Incomplete - def get_variable_days(self, year): ... - def get_hebrew_independence_day(self, jewish_year): ... + def get_hebrew_independence_day(self, jewish_year: int) -> list[tuple[_HebrewDate, str]]: ... diff --git a/stubs/workalendar/workalendar/asia/japan.pyi b/stubs/workalendar/workalendar/asia/japan.pyi index 1f07fc708371..45fa40d1e6f6 100644 --- a/stubs/workalendar/workalendar/asia/japan.pyi +++ b/stubs/workalendar/workalendar/asia/japan.pyi @@ -1,12 +1,4 @@ -from _typeshed import Incomplete - from ..core import Calendar -class Japan(Calendar): - WEEKEND_DAYS: Incomplete - FIXED_HOLIDAYS: Incomplete - def get_fixed_holidays(self, year): ... - def get_variable_days(self, year): ... - -class JapanBank(Japan): - FIXED_HOLIDAYS: Incomplete +class Japan(Calendar): ... +class JapanBank(Japan): ... diff --git a/stubs/workalendar/workalendar/asia/kazakhstan.pyi b/stubs/workalendar/workalendar/asia/kazakhstan.pyi index 52bd885fd198..1208ecd52da9 100644 --- a/stubs/workalendar/workalendar/asia/kazakhstan.pyi +++ b/stubs/workalendar/workalendar/asia/kazakhstan.pyi @@ -1,30 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import IslamicCalendar, OrthodoxCalendar -class Kazakhstan(OrthodoxCalendar, IslamicCalendar): - include_christmas: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_new_years_day: ClassVar[bool] - include_orthodox_christmas: ClassVar[bool] - include_epiphany: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_prophet_birthday: ClassVar[bool] - include_day_after_prophet_birthday: ClassVar[bool] - include_start_ramadan: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - length_eid_al_fitr: int - include_eid_al_adha: ClassVar[bool] - length_eid_al_adha: int - include_day_of_sacrifice: ClassVar[bool] - day_of_sacrifice_label: ClassVar[str] - include_islamic_new_year: ClassVar[bool] - include_laylat_al_qadr: ClassVar[bool] - include_nuzul_al_quran: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_fixed_holidays(self, year): ... - def get_variable_days(self, year): ... +class Kazakhstan(OrthodoxCalendar, IslamicCalendar): ... diff --git a/stubs/workalendar/workalendar/asia/malaysia.pyi b/stubs/workalendar/workalendar/asia/malaysia.pyi index a56e7373b77d..94db84b4eb27 100644 --- a/stubs/workalendar/workalendar/asia/malaysia.pyi +++ b/stubs/workalendar/workalendar/asia/malaysia.pyi @@ -1,25 +1,8 @@ -from _typeshed import Incomplete +import datetime from typing import ClassVar from ..core import ChineseNewYearCalendar, IslamicMixin class Malaysia(IslamicMixin, ChineseNewYearCalendar): - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - include_nuzul_al_quran: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - length_eid_al_fitr: int - eid_al_fitr_label: ClassVar[str] - include_day_of_sacrifice: ClassVar[bool] - day_of_sacrifice_label: ClassVar[str] - include_islamic_new_year: ClassVar[bool] - include_prophet_birthday: ClassVar[bool] - WEEKEND_DAYS: Incomplete - FIXED_HOLIDAYS: Incomplete - MSIA_DEEPAVALI: Incomplete - MSIA_THAIPUSAM: Incomplete - chinese_new_year_label: ClassVar[str] - include_chinese_second_day: ClassVar[bool] - chinese_second_day_label: ClassVar[str] - shift_sunday_holidays: ClassVar[bool] - def get_variable_days(self, year): ... + MSIA_DEEPAVALI: ClassVar[dict[int, datetime.date]] + MSIA_THAIPUSAM: ClassVar[dict[int, datetime.date]] diff --git a/stubs/workalendar/workalendar/asia/philippines.pyi b/stubs/workalendar/workalendar/asia/philippines.pyi index af95cd4b3050..3b6c2f3f39ec 100644 --- a/stubs/workalendar/workalendar/asia/philippines.pyi +++ b/stubs/workalendar/workalendar/asia/philippines.pyi @@ -1,24 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import ChineseNewYearCalendar, IslamicMixin, WesternMixin -class Philippines(WesternMixin, IslamicMixin, ChineseNewYearCalendar): - include_labour_day: ClassVar[bool] - include_new_years_eve: ClassVar[bool] - include_holy_thursday: ClassVar[bool] - holy_thursday_label: ClassVar[str] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - easter_saturday_label: ClassVar[str] - include_all_saints: ClassVar[bool] - include_all_souls: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - eid_al_fitr_label: ClassVar[str] - include_eid_al_adha: ClassVar[bool] - day_of_sacrifice_label: ClassVar[str] - WEEKEND_DAYS: Incomplete - FIXED_HOLIDAYS: Incomplete +class Philippines(WesternMixin, IslamicMixin, ChineseNewYearCalendar): ... diff --git a/stubs/workalendar/workalendar/asia/qatar.pyi b/stubs/workalendar/workalendar/asia/qatar.pyi index 814b6f8a35a9..3facdbe1988c 100644 --- a/stubs/workalendar/workalendar/asia/qatar.pyi +++ b/stubs/workalendar/workalendar/asia/qatar.pyi @@ -1,13 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import IslamicCalendar -class Qatar(IslamicCalendar): - include_new_years_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_start_ramadan: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - length_eid_al_fitr: int - include_eid_al_adha: ClassVar[bool] - length_eid_al_adha: int +class Qatar(IslamicCalendar): ... diff --git a/stubs/workalendar/workalendar/asia/singapore.pyi b/stubs/workalendar/workalendar/asia/singapore.pyi index 5734c5120e80..7d8b7be62860 100644 --- a/stubs/workalendar/workalendar/asia/singapore.pyi +++ b/stubs/workalendar/workalendar/asia/singapore.pyi @@ -1,20 +1,7 @@ -from _typeshed import Incomplete +import datetime from typing import ClassVar from ..core import ChineseNewYearCalendar, IslamicMixin, WesternMixin class Singapore(WesternMixin, IslamicMixin, ChineseNewYearCalendar): - include_labour_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_eid_al_fitr: ClassVar[bool] - eid_al_fitr_label: ClassVar[str] - include_day_of_sacrifice: ClassVar[bool] - day_of_sacrifice_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete - WEEKEND_DAYS: Incomplete - DEEPAVALI: Incomplete - chinese_new_year_label: ClassVar[str] - include_chinese_second_day: ClassVar[bool] - chinese_second_day_label: ClassVar[str] - shift_sunday_holidays: ClassVar[bool] - def get_variable_days(self, year): ... + DEEPAVALI: ClassVar[dict[int, datetime.date]] diff --git a/stubs/workalendar/workalendar/asia/south_korea.pyi b/stubs/workalendar/workalendar/asia/south_korea.pyi index 12342a3b33be..8e2d1a3ebb43 100644 --- a/stubs/workalendar/workalendar/asia/south_korea.pyi +++ b/stubs/workalendar/workalendar/asia/south_korea.pyi @@ -1,13 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import ChineseNewYearCalendar -class SouthKorea(ChineseNewYearCalendar): - FIXED_HOLIDAYS: Incomplete - chinese_new_year_label: ClassVar[str] - include_chinese_new_year_eve: ClassVar[bool] - chinese_new_year_eve_label: ClassVar[str] - include_chinese_second_day: ClassVar[bool] - chinese_second_day_label: ClassVar[str] - def get_variable_days(self, year): ... +class SouthKorea(ChineseNewYearCalendar): ... diff --git a/stubs/workalendar/workalendar/asia/taiwan.pyi b/stubs/workalendar/workalendar/asia/taiwan.pyi index 72eecc63ede7..2a8966140ca0 100644 --- a/stubs/workalendar/workalendar/asia/taiwan.pyi +++ b/stubs/workalendar/workalendar/asia/taiwan.pyi @@ -1,11 +1,12 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime +from collections.abc import Iterable from ..core import ChineseNewYearCalendar class Taiwan(ChineseNewYearCalendar): - FIXED_HOLIDAYS: Incomplete - include_chinese_new_year_eve: ClassVar[bool] - include_chinese_second_day: ClassVar[bool] - def is_working_day(self, day, *args, **kwargs): ... - def get_variable_days(self, year): ... + def is_working_day( + self, + day: datetime.date | datetime.datetime, + extra_working_days: Iterable[datetime.date | datetime.datetime] | None = None, + extra_holidays: Iterable[datetime.date | datetime.datetime] | None = None, + ) -> bool: ... diff --git a/stubs/workalendar/workalendar/core.pyi b/stubs/workalendar/workalendar/core.pyi index 379712f18619..d11fdb5a509b 100644 --- a/stubs/workalendar/workalendar/core.pyi +++ b/stubs/workalendar/workalendar/core.pyi @@ -1,27 +1,34 @@ -from _typeshed import Incomplete -from collections.abc import Generator -from typing import ClassVar - -MON: Incomplete -TUE: Incomplete -WED: Incomplete -THU: Incomplete -FRI: Incomplete -SAT: Incomplete -SUN: Incomplete -ISO_MON: Incomplete -ISO_TUE: Incomplete -ISO_WED: Incomplete -ISO_THU: Incomplete -ISO_FRI: Incomplete -ISO_SAT: Incomplete -ISO_SUN: Incomplete - -def cleaned_date(day, keep_datetime: bool = False): ... -def daterange(start, end) -> Generator[Incomplete, None, None]: ... +import datetime +from _typeshed import Incomplete, StrPath +from collections.abc import Generator, Iterable +from typing import ClassVar, Final, Literal, TypeVar, overload + +_D = TypeVar("_D", datetime.date, datetime.datetime) +_DT = TypeVar("_DT", datetime.date, datetime.datetime, datetime.timedelta) + +MON: Final = 0 +TUE: Final = 1 +WED: Final = 2 +THU: Final = 3 +FRI: Final = 4 +SAT: Final = 5 +SUN: Final = 6 +ISO_MON: Final = 1 +ISO_TUE: Final = 2 +ISO_WED: Final = 3 +ISO_THU: Final = 4 +ISO_FRI: Final = 5 +ISO_SAT: Final = 6 +ISO_SUN: Final = 7 + +@overload +def cleaned_date(day: _D, keep_datetime: Literal[True]) -> _D: ... +@overload +def cleaned_date(day: datetime.date | datetime.datetime, keep_datetime: Literal[False] | None = False) -> datetime.date: ... +def daterange(start: _DT, end: _DT) -> Generator[_DT]: ... class ChristianMixin: - EASTER_METHOD: Incomplete + EASTER_METHOD: ClassVar[Literal[1, 2, 3] | None] include_epiphany: ClassVar[bool] include_clean_monday: ClassVar[bool] include_annunciation: ClassVar[bool] @@ -54,36 +61,36 @@ class ChristianMixin: include_boxing_day: ClassVar[bool] boxing_day_label: ClassVar[str] include_all_souls: ClassVar[bool] - def get_fat_tuesday(self, year): ... - def get_ash_wednesday(self, year): ... - def get_palm_sunday(self, year): ... - def get_holy_thursday(self, year): ... - def get_good_friday(self, year): ... - def get_clean_monday(self, year): ... - def get_easter_saturday(self, year): ... - def get_easter_sunday(self, year): ... - def get_easter_monday(self, year): ... - def get_ascension_thursday(self, year): ... - def get_whit_monday(self, year): ... - def get_whit_sunday(self, year): ... - def get_corpus_christi(self, year): ... - def shift_christmas_boxing_days(self, year): ... - def get_variable_days(self, year): ... + def get_fat_tuesday(self, year: int) -> datetime.date: ... + def get_ash_wednesday(self, year: int) -> datetime.date: ... + def get_palm_sunday(self, year: int) -> datetime.date: ... + def get_holy_thursday(self, year: int) -> datetime.date: ... + def get_good_friday(self, year: int) -> datetime.date: ... + def get_clean_monday(self, year: int) -> datetime.date: ... + def get_easter_saturday(self, year: int) -> datetime.date: ... + def get_easter_sunday(self, year: int) -> datetime.date: ... + def get_easter_monday(self, year: int) -> datetime.date: ... + def get_ascension_thursday(self, year: int) -> datetime.date: ... + def get_whit_monday(self, year: int) -> datetime.date: ... + def get_whit_sunday(self, year: int) -> datetime.date: ... + def get_corpus_christi(self, year: int) -> datetime.date: ... + def shift_christmas_boxing_days(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_variable_days(self, year: int) -> list[tuple[datetime.date, str]]: ... class WesternMixin(ChristianMixin): - EASTER_METHOD: Incomplete - WEEKEND_DAYS: Incomplete + EASTER_METHOD: ClassVar[Literal[1, 2, 3]] = 3 + WEEKEND_DAYS: ClassVar[tuple[int, ...]] class OrthodoxMixin(ChristianMixin): - EASTER_METHOD: Incomplete - WEEKEND_DAYS: Incomplete + EASTER_METHOD: ClassVar[Literal[1, 2, 3]] = 2 + WEEKEND_DAYS: ClassVar[tuple[int, ...]] include_orthodox_christmas: ClassVar[bool] orthodox_christmas_day_label: ClassVar[str] - def get_fixed_holidays(self, year): ... + def get_fixed_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... class LunarMixin: @staticmethod - def lunar(year, month, day): ... + def lunar(year: int, month: int, day: int) -> datetime.date: ... class ChineseNewYearMixin(LunarMixin): include_chinese_new_year_eve: ClassVar[bool] @@ -96,23 +103,23 @@ class ChineseNewYearMixin(LunarMixin): chinese_third_day_label: ClassVar[str] shift_sunday_holidays: ClassVar[bool] shift_start_cny_sunday: ClassVar[bool] - def get_chinese_new_year(self, year): ... - def get_variable_days(self, year): ... - def get_shifted_holidays(self, dates) -> Generator[Incomplete, None, None]: ... - def get_calendar_holidays(self, year): ... + def get_chinese_new_year(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_variable_days(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_shifted_holidays(self, dates: Iterable[tuple[_D, str]]) -> Generator[tuple[_D, str]]: ... + def get_calendar_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... class CalverterMixin: conversion_method: Incomplete - ISLAMIC_HOLIDAYS: Incomplete + ISLAMIC_HOLIDAYS: ClassVar[tuple[tuple[int, int, str], ...]] def __init__(self, *args, **kwargs) -> None: ... - def converted(self, year): ... - def calverted_years(self, year): ... - def get_islamic_holidays(self): ... - def get_delta_islamic_holidays(self, year) -> None: ... - def get_variable_days(self, year): ... + def converted(self, year: int) -> list[tuple[int, int, int]]: ... + def calverted_years(self, year: int) -> list[int]: ... + def get_islamic_holidays(self) -> tuple[tuple[int, int, str], ...]: ... + def get_delta_islamic_holidays(self, year: int) -> datetime.timedelta | None: ... + def get_variable_days(self, year: int) -> list[tuple[datetime.date, str]]: ... class IslamicMixin(CalverterMixin): - WEEKEND_DAYS: Incomplete + WEEKEND_DAYS: ClassVar[tuple[int, ...]] conversion_method: Incomplete include_prophet_birthday: ClassVar[bool] include_day_after_prophet_birthday: ClassVar[bool] @@ -128,35 +135,67 @@ class IslamicMixin(CalverterMixin): include_islamic_new_year: ClassVar[bool] include_laylat_al_qadr: ClassVar[bool] include_nuzul_al_quran: ClassVar[bool] - def get_islamic_holidays(self): ... + def get_islamic_holidays(self) -> tuple[tuple[int, int, str]]: ... class CoreCalendar: - FIXED_HOLIDAYS: Incomplete - WEEKEND_DAYS: Incomplete + FIXED_HOLIDAYS: ClassVar[tuple[tuple[int, int, str], ...]] + WEEKEND_DAYS: ClassVar[tuple[int, ...]] def __init__(self) -> None: ... - def name(cls): ... - def get_fixed_holidays(self, year): ... - def get_variable_days(self, year): ... - def get_calendar_holidays(self, year): ... - def holidays(self, year=None): ... - def get_holiday_label(self, day): ... - def holidays_set(self, year=None): ... - def get_weekend_days(self): ... - def is_working_day(self, day, extra_working_days=None, extra_holidays=None): ... - def is_holiday(self, day, extra_holidays=None): ... - def add_working_days(self, day, delta, extra_working_days=None, extra_holidays=None, keep_datetime: bool = False): ... - def sub_working_days(self, day, delta, extra_working_days=None, extra_holidays=None, keep_datetime: bool = False): ... - def find_following_working_day(self, day): ... + def name(cls) -> str: ... + def get_fixed_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_variable_days(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_calendar_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... + def holidays(self, year: int | None = None) -> list[tuple[datetime.date, str]]: ... + def get_holiday_label(self, day: datetime.date | datetime.datetime) -> str | None: ... + def holidays_set(self, year: int | None = None) -> set[datetime.date]: ... + def get_weekend_days(self) -> tuple[int, ...]: ... + def is_working_day( + self, + day: datetime.date | datetime.datetime, + extra_working_days: Iterable[datetime.date | datetime.datetime] | None = None, + extra_holidays: Iterable[datetime.date | datetime.datetime] | None = None, + ) -> bool: ... + def is_holiday( + self, day: datetime.date | datetime.datetime, extra_holidays: Iterable[datetime.date | datetime.datetime] | None = None + ) -> bool: ... + def add_working_days( + self, + day: datetime.date | datetime.datetime, + delta: int, + extra_working_days: Iterable[datetime.date | datetime.datetime] | None = None, + extra_holidays: Iterable[datetime.date | datetime.datetime] | None = None, + keep_datetime: bool = False, + ) -> datetime.date: ... + def sub_working_days( + self, + day: datetime.date | datetime.datetime, + delta: int, + extra_working_days: Iterable[datetime.date | datetime.datetime] | None = None, + extra_holidays: Iterable[datetime.date | datetime.datetime] | None = None, + keep_datetime: bool = False, + ) -> datetime.date: ... + def find_following_working_day(self, day: datetime.date) -> datetime.date: ... @staticmethod - def get_nth_weekday_in_month(year, month, weekday, n: int = 1, start=None): ... + def get_nth_weekday_in_month( + year: int, month: int, weekday: int, n: int = 1, start: datetime.date | Literal[False] | None = None + ) -> datetime.date | None: ... @staticmethod - def get_last_weekday_in_month(year, month, weekday): ... + def get_last_weekday_in_month(year: int, month: int, weekday: int) -> datetime.date: ... @staticmethod - def get_iso_week_date(year, week_nb, weekday=1): ... + def get_iso_week_date(year: int, week_nb: int, weekday: int = 1) -> datetime.date: ... @staticmethod - def get_first_weekday_after(day, weekday): ... - def get_working_days_delta(self, start, end, include_start: bool = False, extra_working_days=None, extra_holidays=None): ... - def export_to_ical(self, period=[2000, 2030], target_path=None): ... + def get_first_weekday_after(day: _D, weekday: int) -> _D: ... + def get_working_days_delta( + self, + start: datetime.date | datetime.datetime, + end: datetime.date | datetime.datetime, + include_start: bool = False, + extra_working_days: Iterable[datetime.date | datetime.datetime] | None = None, + extra_holidays: Iterable[datetime.date | datetime.datetime] | None = None, + ) -> int: ... + def export_to_ical( + self, period: tuple[int, int] | list[int] = [2000, 2030], target_path: StrPath | None = None + ) -> str | None: ... class Calendar(CoreCalendar): include_new_years_day: ClassVar[bool] @@ -165,16 +204,16 @@ class Calendar(CoreCalendar): include_labour_day: ClassVar[bool] labour_day_label: ClassVar[str] def __init__(self, **kwargs) -> None: ... - def get_fixed_holidays(self, year): ... - def get_variable_days(self, year): ... + def get_fixed_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_variable_days(self, year: int) -> list[tuple[datetime.date, str]]: ... class WesternCalendar(WesternMixin, Calendar): ... class OrthodoxCalendar(OrthodoxMixin, Calendar): ... class ChineseNewYearCalendar(ChineseNewYearMixin, Calendar): - WEEKEND_DAYS: Incomplete + WEEKEND_DAYS: ClassVar[tuple[int, ...]] class IslamicCalendar(IslamicMixin, Calendar): ... class IslamoWesternCalendar(IslamicMixin, WesternMixin, Calendar): - FIXED_HOLIDAYS: Incomplete + FIXED_HOLIDAYS: ClassVar[tuple[tuple[int, int, str], ...]] diff --git a/stubs/workalendar/workalendar/europe/austria.pyi b/stubs/workalendar/workalendar/europe/austria.pyi index 7501af31a351..a7d900914955 100644 --- a/stubs/workalendar/workalendar/europe/austria.pyi +++ b/stubs/workalendar/workalendar/europe/austria.pyi @@ -1,20 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Austria(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - include_epiphany: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - include_christmas: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] +class Austria(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/belarus.pyi b/stubs/workalendar/workalendar/europe/belarus.pyi index edf02354c9da..d9be8bca904f 100644 --- a/stubs/workalendar/workalendar/europe/belarus.pyi +++ b/stubs/workalendar/workalendar/europe/belarus.pyi @@ -1,13 +1,6 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import OrthodoxCalendar class Belarus(OrthodoxCalendar): - include_labour_day: ClassVar[bool] - include_christmas: ClassVar[bool] - christmas_day_label: ClassVar[str] - orthodox_christmas_day_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete - def get_radonitsa(self, year): ... - def get_variable_days(self, year): ... + def get_radonitsa(self, year: int) -> datetime.date: ... diff --git a/stubs/workalendar/workalendar/europe/belgium.pyi b/stubs/workalendar/workalendar/europe/belgium.pyi index c2a81a0f7743..dc0be69ccb33 100644 --- a/stubs/workalendar/workalendar/europe/belgium.pyi +++ b/stubs/workalendar/workalendar/europe/belgium.pyi @@ -1,13 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Belgium(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] +class Belgium(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/bulgaria.pyi b/stubs/workalendar/workalendar/europe/bulgaria.pyi index ca2f84092316..3bb6e1054d1b 100644 --- a/stubs/workalendar/workalendar/europe/bulgaria.pyi +++ b/stubs/workalendar/workalendar/europe/bulgaria.pyi @@ -1,24 +1,6 @@ -from _typeshed import Incomplete -from collections.abc import Generator -from typing import ClassVar +from collections.abc import Generator, Iterable -from ..core import OrthodoxCalendar +from ..core import _D, OrthodoxCalendar class Bulgaria(OrthodoxCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_christmas: ClassVar[bool] - include_boxing_day: ClassVar[bool] - include_orthodox_christmas: ClassVar[bool] - boxing_day_label: ClassVar[str] - - def get_shifted_holidays(self, days) -> Generator[Incomplete, None, None]: ... - def get_fixed_holidays(self, year): ... - def shift_christmas_boxing_days(self, year): ... - def get_variable_days(self, year): ... + def get_shifted_holidays(self, days: Iterable[tuple[_D, str]]) -> Generator[tuple[_D, str]]: ... diff --git a/stubs/workalendar/workalendar/europe/cayman_islands.pyi b/stubs/workalendar/workalendar/europe/cayman_islands.pyi index d85d7373213d..6ae982b1a808 100644 --- a/stubs/workalendar/workalendar/europe/cayman_islands.pyi +++ b/stubs/workalendar/workalendar/europe/cayman_islands.pyi @@ -1,19 +1,13 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime +from typing import Final from ..core import WesternCalendar -QUEENS_BIRTHDAY_EXCEPTIONS: Incomplete +QUEENS_BIRTHDAY_EXCEPTIONS: Final[dict[int, datetime.date]] class CaymanIslands(WesternCalendar): - include_ash_wednesday: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - shift_new_years_day: ClassVar[bool] - def get_variable_days(self, year): ... - def get_national_heroes_day(self, year): ... - def get_discovery_day(self, year): ... - def get_queens_birthday(self, year): ... - def get_constitution_day(self, year): ... - def get_remembrance_day(self, year): ... + def get_national_heroes_day(self, year: int) -> datetime.date: ... + def get_discovery_day(self, year: int) -> datetime.date: ... + def get_queens_birthday(self, year: int) -> datetime.date: ... + def get_constitution_day(self, year: int) -> datetime.date: ... + def get_remembrance_day(self, year: int) -> datetime.date: ... diff --git a/stubs/workalendar/workalendar/europe/croatia.pyi b/stubs/workalendar/workalendar/europe/croatia.pyi index 7fa2c682adf2..bca2b9da6589 100644 --- a/stubs/workalendar/workalendar/europe/croatia.pyi +++ b/stubs/workalendar/workalendar/europe/croatia.pyi @@ -1,19 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Croatia(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - include_epiphany: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_christmas: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - def get_fixed_holidays(self, year): ... +class Croatia(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/cyprus.pyi b/stubs/workalendar/workalendar/europe/cyprus.pyi index 279a51dab339..be487a07631f 100644 --- a/stubs/workalendar/workalendar/europe/cyprus.pyi +++ b/stubs/workalendar/workalendar/europe/cyprus.pyi @@ -1,20 +1,6 @@ -from _typeshed import Incomplete from typing import ClassVar from ..core import WesternCalendar class Cyprus(WesternCalendar): - include_labour_day: ClassVar[bool] - include_epiphany: ClassVar[bool] - include_clean_monday: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_whit_monday: ClassVar[bool] - whit_monday_label: ClassVar[str] - include_christmas_eve: ClassVar[bool] include_christmas_day: ClassVar[bool] - include_boxing_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_variable_days(self, year): ... diff --git a/stubs/workalendar/workalendar/europe/czech_republic.pyi b/stubs/workalendar/workalendar/europe/czech_republic.pyi index 7e0c3510df9f..9b4dbf79d1ae 100644 --- a/stubs/workalendar/workalendar/europe/czech_republic.pyi +++ b/stubs/workalendar/workalendar/europe/czech_republic.pyi @@ -1,11 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class CzechRepublic(WesternCalendar): - include_labour_day: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_good_friday: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_variable_days(self, year): ... +class CzechRepublic(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/denmark.pyi b/stubs/workalendar/workalendar/europe/denmark.pyi index 6832fcad8a1e..f215f481162f 100644 --- a/stubs/workalendar/workalendar/europe/denmark.pyi +++ b/stubs/workalendar/workalendar/europe/denmark.pyi @@ -1,19 +1,6 @@ -from typing import ClassVar +import datetime from ..core import WesternCalendar class Denmark(WesternCalendar): - include_holy_thursday: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - whit_sunday_label: ClassVar[str] - include_whit_monday: ClassVar[bool] - whit_monday_label: ClassVar[str] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - include_christmas_eve: ClassVar[bool] - def get_store_bededag(self, year): ... - def get_variable_days(self, year): ... + def get_store_bededag(self, year: int) -> datetime.date: ... diff --git a/stubs/workalendar/workalendar/europe/estonia.pyi b/stubs/workalendar/workalendar/europe/estonia.pyi index 27c6a99418c8..9ac7caeb6ed7 100644 --- a/stubs/workalendar/workalendar/europe/estonia.pyi +++ b/stubs/workalendar/workalendar/europe/estonia.pyi @@ -1,15 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Estonia(WesternCalendar): - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - whit_sunday_label: ClassVar[str] - include_christmas_eve: ClassVar[bool] - include_christmas: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete +class Estonia(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/european_central_bank.pyi b/stubs/workalendar/workalendar/europe/european_central_bank.pyi index 953382cb4640..a3da91e5fa23 100644 --- a/stubs/workalendar/workalendar/europe/european_central_bank.pyi +++ b/stubs/workalendar/workalendar/europe/european_central_bank.pyi @@ -1,10 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class EuropeanCentralBank(WesternCalendar): - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] +class EuropeanCentralBank(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/finland.pyi b/stubs/workalendar/workalendar/europe/finland.pyi index 1c831e52bf93..f87c7e930977 100644 --- a/stubs/workalendar/workalendar/europe/finland.pyi +++ b/stubs/workalendar/workalendar/europe/finland.pyi @@ -1,22 +1,8 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar class Finland(WesternCalendar): - include_epiphany: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - whit_sunday_label: ClassVar[str] - include_christmas_eve: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_midsummer_eve(self, year): ... - def get_midsummer_day(self, year): ... - def get_variable_all_saints(self, year): ... - def get_variable_days(self, year): ... + def get_midsummer_eve(self, year: int) -> datetime.date: ... + def get_midsummer_day(self, year: int) -> datetime.date: ... + def get_variable_all_saints(self, year: int) -> datetime.date: ... diff --git a/stubs/workalendar/workalendar/europe/france.pyi b/stubs/workalendar/workalendar/europe/france.pyi index eb5c6da6276e..d9e7821358a5 100644 --- a/stubs/workalendar/workalendar/europe/france.pyi +++ b/stubs/workalendar/workalendar/europe/france.pyi @@ -1,17 +1,4 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class France(WesternCalendar): - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_assumption: ClassVar[bool] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - -class FranceAlsaceMoselle(France): - include_good_friday: ClassVar[bool] - include_boxing_day: ClassVar[bool] +class France(WesternCalendar): ... +class FranceAlsaceMoselle(France): ... diff --git a/stubs/workalendar/workalendar/europe/georgia.pyi b/stubs/workalendar/workalendar/europe/georgia.pyi index cadc33c45c6b..c5999ef52dbc 100644 --- a/stubs/workalendar/workalendar/europe/georgia.pyi +++ b/stubs/workalendar/workalendar/europe/georgia.pyi @@ -1,16 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import OrthodoxCalendar -class Georgia(OrthodoxCalendar): - include_christmas: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_new_years_day: ClassVar[bool] - include_orthodox_christmas: ClassVar[bool] - include_epiphany: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete +class Georgia(OrthodoxCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/germany.pyi b/stubs/workalendar/workalendar/europe/germany.pyi index caad4bc70079..af79238df0e2 100644 --- a/stubs/workalendar/workalendar/europe/germany.pyi +++ b/stubs/workalendar/workalendar/europe/germany.pyi @@ -1,82 +1,34 @@ -from _typeshed import Incomplete +import datetime from typing import ClassVar from ..core import WesternCalendar class Germany(WesternCalendar): - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] all_time_include_reformation_day: ClassVar[bool] include_reformation_day_2018: ClassVar[bool] - def include_reformation_day(self, year): ... - def get_reformation_day(self, year): ... - def get_variable_days(self, year): ... + def include_reformation_day(self, year: int) -> bool: ... + def get_reformation_day(self, year: int) -> tuple[datetime.date, str]: ... -class BadenWurttemberg(Germany): - include_epiphany: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_all_saints: ClassVar[bool] - -class Bavaria(Germany): - include_epiphany: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_assumption: ClassVar[bool] +class BadenWurttemberg(Germany): ... +class Bavaria(Germany): ... class Berlin(Germany): - def get_international_womens_day(self, year): ... - def get_liberation_day(self, year): ... - def get_variable_days(self, year): ... - -class Brandenburg(Germany): - include_easter_sunday: ClassVar[bool] - all_time_include_reformation_day: ClassVar[bool] - -class Bremen(Germany): - include_reformation_day_2018: ClassVar[bool] - -class Hamburg(Germany): - include_reformation_day_2018: ClassVar[bool] - -class Hesse(Germany): - include_corpus_christi: ClassVar[bool] - -class MecklenburgVorpommern(Germany): - all_time_include_reformation_day: ClassVar[bool] - -class LowerSaxony(Germany): - include_reformation_day_2018: ClassVar[bool] - -class NorthRhineWestphalia(Germany): - include_corpus_christi: ClassVar[bool] - include_all_saints: ClassVar[bool] - -class RhinelandPalatinate(Germany): - include_corpus_christi: ClassVar[bool] - include_all_saints: ClassVar[bool] - -class Saarland(Germany): - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] + def get_international_womens_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_liberation_day(self, year: int) -> tuple[datetime.date, str]: ... + +class Brandenburg(Germany): ... +class Bremen(Germany): ... +class Hamburg(Germany): ... +class Hesse(Germany): ... +class MecklenburgVorpommern(Germany): ... +class LowerSaxony(Germany): ... +class NorthRhineWestphalia(Germany): ... +class RhinelandPalatinate(Germany): ... +class Saarland(Germany): ... class Saxony(Germany): - all_time_include_reformation_day: ClassVar[bool] - def get_repentance_day(self, year): ... - def get_variable_days(self, year): ... + def get_repentance_day(self, year: int) -> tuple[datetime.date, str]: ... -class SaxonyAnhalt(Germany): - include_epiphany: ClassVar[bool] - all_time_include_reformation_day: ClassVar[bool] - -class SchleswigHolstein(Germany): - include_reformation_day_2018: ClassVar[bool] - -class Thuringia(Germany): - all_time_include_reformation_day: ClassVar[bool] +class SaxonyAnhalt(Germany): ... +class SchleswigHolstein(Germany): ... +class Thuringia(Germany): ... diff --git a/stubs/workalendar/workalendar/europe/greece.pyi b/stubs/workalendar/workalendar/europe/greece.pyi index f8b81299b207..f00fd17fb909 100644 --- a/stubs/workalendar/workalendar/europe/greece.pyi +++ b/stubs/workalendar/workalendar/europe/greece.pyi @@ -1,21 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import OrthodoxCalendar -class Greece(OrthodoxCalendar): - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_epiphany: ClassVar[bool] - include_clean_monday: ClassVar[bool] - include_annunciation: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - whit_sunday_label: ClassVar[str] - include_whit_monday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - include_orthodox_christmas: ClassVar[bool] +class Greece(OrthodoxCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/guernsey.pyi b/stubs/workalendar/workalendar/europe/guernsey.pyi index bea31918fbb5..d7fdf695c15c 100644 --- a/stubs/workalendar/workalendar/europe/guernsey.pyi +++ b/stubs/workalendar/workalendar/europe/guernsey.pyi @@ -1,14 +1,9 @@ -from typing import ClassVar +import datetime from ..core import WesternCalendar class Guernsey(WesternCalendar): - include_easter_monday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - shift_new_years_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - def get_spring_bank_holiday(self, year): ... - def get_early_may_bank_holiday(self, year): ... - def get_summer_bank_holiday(self, year): ... - def get_liberation_day(self, year): ... - def get_variable_days(self, year): ... + def get_spring_bank_holiday(self, year: int) -> tuple[datetime.date, str]: ... + def get_early_may_bank_holiday(self, year: int) -> tuple[datetime.date, str]: ... + def get_summer_bank_holiday(self, year: int) -> tuple[datetime.date, str]: ... + def get_liberation_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/europe/hungary.pyi b/stubs/workalendar/workalendar/europe/hungary.pyi index 735695236350..5808cbd78eeb 100644 --- a/stubs/workalendar/workalendar/europe/hungary.pyi +++ b/stubs/workalendar/workalendar/europe/hungary.pyi @@ -1,19 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Hungary(WesternCalendar): - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - whit_sunday_label: ClassVar[str] - include_whit_monday: ClassVar[bool] - whit_monday_label: ClassVar[str] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - include_all_saints: ClassVar[bool] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... +class Hungary(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/iceland.pyi b/stubs/workalendar/workalendar/europe/iceland.pyi index 0465547bfe79..f9d03badf3cc 100644 --- a/stubs/workalendar/workalendar/europe/iceland.pyi +++ b/stubs/workalendar/workalendar/europe/iceland.pyi @@ -1,19 +1,7 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar class Iceland(WesternCalendar): - include_holy_thursday: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_first_day_of_summer(self, year): ... - def get_commerce_day(self, year): ... - def get_variable_days(self, year): ... + def get_first_day_of_summer(self, year: int) -> datetime.date: ... + def get_commerce_day(self, year: int) -> datetime.date: ... diff --git a/stubs/workalendar/workalendar/europe/ireland.pyi b/stubs/workalendar/workalendar/europe/ireland.pyi index a58fbf1380a7..b3df8c71eecf 100644 --- a/stubs/workalendar/workalendar/europe/ireland.pyi +++ b/stubs/workalendar/workalendar/europe/ireland.pyi @@ -1,13 +1,7 @@ -from typing import ClassVar +import datetime from ..core import WesternCalendar class Ireland(WesternCalendar): - include_easter_monday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - shift_new_years_day: ClassVar[bool] - def get_june_holiday(self, year): ... - def get_august_holiday(self, year): ... - include_whit_monday: ClassVar[bool] - def get_variable_days(self, year): ... + def get_june_holiday(self, year: int) -> tuple[datetime.date, str]: ... + def get_august_holiday(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/europe/italy.pyi b/stubs/workalendar/workalendar/europe/italy.pyi index 4948311d9587..03fb8f0172ef 100644 --- a/stubs/workalendar/workalendar/europe/italy.pyi +++ b/stubs/workalendar/workalendar/europe/italy.pyi @@ -1,16 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Italy(WesternCalendar): - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete - include_immaculate_conception: ClassVar[bool] - include_epiphany: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] +class Italy(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/latvia.pyi b/stubs/workalendar/workalendar/europe/latvia.pyi index 8e5b9ef2c093..f844c9bea2b0 100644 --- a/stubs/workalendar/workalendar/europe/latvia.pyi +++ b/stubs/workalendar/workalendar/europe/latvia.pyi @@ -1,17 +1,7 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar class Latvia(WesternCalendar): - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_christmas: ClassVar[bool] - include_boxing_day: ClassVar[bool] - def get_independence_days(self, year): ... - def get_republic_days(self, year): ... - def get_variable_days(self, year): ... + def get_independence_days(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_republic_days(self, year: int) -> list[tuple[datetime.date, str]]: ... diff --git a/stubs/workalendar/workalendar/europe/lithuania.pyi b/stubs/workalendar/workalendar/europe/lithuania.pyi index 80467c4dd415..cfc1c192af45 100644 --- a/stubs/workalendar/workalendar/europe/lithuania.pyi +++ b/stubs/workalendar/workalendar/europe/lithuania.pyi @@ -1,20 +1,7 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar class Lithuania(WesternCalendar): - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_christmas: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - def get_mothers_day(self, year): ... - def get_fathers_day(self, year): ... - include_all_souls: ClassVar[bool] - def get_variable_days(self, year): ... + def get_mothers_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_fathers_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/europe/luxembourg.pyi b/stubs/workalendar/workalendar/europe/luxembourg.pyi index 0fc559592ba3..82fdacd3ab99 100644 --- a/stubs/workalendar/workalendar/europe/luxembourg.pyi +++ b/stubs/workalendar/workalendar/europe/luxembourg.pyi @@ -1,15 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Luxembourg(WesternCalendar): - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_assumption: ClassVar[bool] - include_boxing_day: ClassVar[bool] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_fixed_holidays(self, year): ... +class Luxembourg(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/malta.pyi b/stubs/workalendar/workalendar/europe/malta.pyi index 887e960b42a0..8a3280041553 100644 --- a/stubs/workalendar/workalendar/europe/malta.pyi +++ b/stubs/workalendar/workalendar/europe/malta.pyi @@ -1,13 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Malta(WesternCalendar): - include_good_friday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - include_christmas: ClassVar[bool] - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete +class Malta(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/monaco.pyi b/stubs/workalendar/workalendar/europe/monaco.pyi index 7e76bbd4b8fa..23d66fad5b53 100644 --- a/stubs/workalendar/workalendar/europe/monaco.pyi +++ b/stubs/workalendar/workalendar/europe/monaco.pyi @@ -1,15 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Monaco(WesternCalendar): - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_assumption: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete +class Monaco(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/netherlands.pyi b/stubs/workalendar/workalendar/europe/netherlands.pyi index 82e262c304ef..db7b3e85c893 100644 --- a/stubs/workalendar/workalendar/europe/netherlands.pyi +++ b/stubs/workalendar/workalendar/europe/netherlands.pyi @@ -1,37 +1,32 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime +from typing import Final, Literal from ..core import WesternCalendar class Netherlands(WesternCalendar): - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_carnival: Incomplete + include_carnival: bool def __init__(self, include_carnival: bool = False) -> None: ... - def get_king_queen_day(self, year): ... - def get_carnival_days(self, year): ... - def get_variable_days(self, year): ... + def get_king_queen_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_carnival_days(self, year: int) -> list[tuple[datetime.date, str]]: ... -FALL_HOLIDAYS_EARLY_REGIONS: Incomplete -SPRING_HOLIDAYS_EARLY_REGIONS: Incomplete -SUMMER_HOLIDAYS_EARLY_REGIONS: Incomplete -SUMMER_HOLIDAYS_LATE_REGIONS: Incomplete +FALL_HOLIDAYS_EARLY_REGIONS: Final[dict[int, list[str]]] +SPRING_HOLIDAYS_EARLY_REGIONS: Final[dict[int, list[str]]] +SUMMER_HOLIDAYS_EARLY_REGIONS: Final[dict[int, list[str]]] +SUMMER_HOLIDAYS_LATE_REGIONS: Final[dict[int, list[str]]] class NetherlandsWithSchoolHolidays(Netherlands): - region: Incomplete - carnival_instead_of_spring: Incomplete - - def __init__(self, region, carnival_instead_of_spring: bool = False, **kwargs) -> None: ... - def get_fall_holidays(self, year): ... - def get_christmas_holidays(self, year): ... - def get_spring_holidays(self, year): ... - def get_carnival_holidays(self, year): ... - def get_may_holidays(self, year): ... - def get_summer_holidays(self, year): ... - def get_variable_days(self, year): ... + region: Literal["north", "middle", "south"] + carnival_instead_of_spring: bool + def __init__( + self, + region: Literal["north", "middle", "south"], + carnival_instead_of_spring: bool = False, + *, + include_carnival: bool = ..., + ) -> None: ... + def get_fall_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_christmas_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_spring_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_carnival_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_may_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_summer_holidays(self, year: int) -> list[tuple[datetime.date, str]]: ... diff --git a/stubs/workalendar/workalendar/europe/norway.pyi b/stubs/workalendar/workalendar/europe/norway.pyi index c969ad17d602..4a43cdf592cb 100644 --- a/stubs/workalendar/workalendar/europe/norway.pyi +++ b/stubs/workalendar/workalendar/europe/norway.pyi @@ -1,17 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Norway(WesternCalendar): - include_holy_thursday: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete +class Norway(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/poland.pyi b/stubs/workalendar/workalendar/europe/poland.pyi index a356e6a4c451..3a730c6d02e8 100644 --- a/stubs/workalendar/workalendar/europe/poland.pyi +++ b/stubs/workalendar/workalendar/europe/poland.pyi @@ -1,16 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Poland(WesternCalendar): - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - whit_sunday_label: ClassVar[str] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_boxing_day: ClassVar[bool] +class Poland(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/portugal.pyi b/stubs/workalendar/workalendar/europe/portugal.pyi index ed84921cf8c2..a96b52cea9e9 100644 --- a/stubs/workalendar/workalendar/europe/portugal.pyi +++ b/stubs/workalendar/workalendar/europe/portugal.pyi @@ -1,16 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Portugal(WesternCalendar): - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_christmas: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - immaculate_conception_label: ClassVar[str] - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete - def get_fixed_holidays(self, year): ... - def get_variable_days(self, year): ... +class Portugal(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/romania.pyi b/stubs/workalendar/workalendar/europe/romania.pyi index ab612a284dba..c3d30bbcbe74 100644 --- a/stubs/workalendar/workalendar/europe/romania.pyi +++ b/stubs/workalendar/workalendar/europe/romania.pyi @@ -1,21 +1,7 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import OrthodoxCalendar class Romania(OrthodoxCalendar): - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - whit_sunday_label: ClassVar[str] - include_whit_monday: ClassVar[bool] - include_christmas: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - include_orthodox_christmas: ClassVar[bool] - def get_childrens_day(self, year): ... - def get_liberation_day(self, year): ... - def get_variable_days(self, year): ... + def get_childrens_day(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_liberation_day(self, year: int) -> list[tuple[datetime.date, str]]: ... diff --git a/stubs/workalendar/workalendar/europe/russia.pyi b/stubs/workalendar/workalendar/europe/russia.pyi index e82ebdb8c709..12d0bace0ee3 100644 --- a/stubs/workalendar/workalendar/europe/russia.pyi +++ b/stubs/workalendar/workalendar/europe/russia.pyi @@ -1,15 +1,7 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import OrthodoxCalendar class Russia(OrthodoxCalendar): - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_christmas: ClassVar[bool] - covid19_2020_start: Incomplete - covid19_2020_end: Incomplete - labour_day_label: ClassVar[str] - def get_fixed_holidays(self, year): ... - def get_calendar_holidays(self, year): ... - def is_working_day(self, day, extra_working_days=None, extra_holidays=None): ... + covid19_2020_start: datetime.date + covid19_2020_end: datetime.date diff --git a/stubs/workalendar/workalendar/europe/scotland/__init__.pyi b/stubs/workalendar/workalendar/europe/scotland/__init__.pyi index b05bf3802070..51470690b6fe 100644 --- a/stubs/workalendar/workalendar/europe/scotland/__init__.pyi +++ b/stubs/workalendar/workalendar/europe/scotland/__init__.pyi @@ -1,4 +1,4 @@ -from _typeshed import Incomplete +import datetime from typing import ClassVar from ...core import WesternCalendar @@ -28,7 +28,6 @@ from .mixins import ( ) class Scotland(WesternCalendar): - FIXED_HOLIDAYS: Incomplete include_spring_holiday: ClassVar[bool] spring_holiday_label: ClassVar[str] include_fair_holiday: ClassVar[bool] @@ -36,112 +35,42 @@ class Scotland(WesternCalendar): include_saint_andrew: ClassVar[bool] include_victoria_day: ClassVar[bool] def __init__(self, *args, **kwargs) -> None: ... - def get_may_day(self, year): ... - def get_spring_holiday(self, year) -> None: ... - def get_fair_holiday(self, year) -> None: ... - def get_autumn_holiday(self, year) -> None: ... - def get_victoria_day(self, year) -> None: ... - def get_variable_days(self, year): ... - def get_fixed_holidays(self, year): ... - -class Aberdeen(FairHolidaySecondMondayJuly, AutumnHolidayLastMondaySeptember, Scotland): - include_good_friday: ClassVar[bool] - -class Angus(SpringHolidaySecondMondayApril, AutumnHolidayLastMondaySeptember, Scotland): - include_saint_andrew: ClassVar[bool] - + def get_may_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_spring_holiday(self, year: int) -> tuple[datetime.date, str]: ... + def get_fair_holiday(self, year: int) -> tuple[datetime.date, str]: ... + def get_autumn_holiday(self, year: int) -> tuple[datetime.date, str]: ... + def get_victoria_day(self, year: int) -> tuple[datetime.date, str]: ... + +class Aberdeen(FairHolidaySecondMondayJuly, AutumnHolidayLastMondaySeptember, Scotland): ... +class Angus(SpringHolidaySecondMondayApril, AutumnHolidayLastMondaySeptember, Scotland): ... class Arbroath(FairHolidayThirdMondayJuly, Scotland): ... - -class Ayr(SpringHolidayLastMondayMay, AyrGoldCup, Scotland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - +class Ayr(SpringHolidayLastMondayMay, AyrGoldCup, Scotland): ... class CarnoustieMonifieth(SpringHolidayFirstMondayApril, AutumnHolidayFirstMondayOctober, Scotland): ... class Clydebank(SpringHolidayTuesdayAfterFirstMondayMay, Scotland): ... - -class DumfriesGalloway(Scotland): - include_good_friday: ClassVar[bool] - +class DumfriesGalloway(Scotland): ... class Dundee( SpringHolidayFirstMondayApril, VictoriaDayLastMondayMay, FairHolidayLastMondayJuly, AutumnHolidayFirstMondayOctober, Scotland ): ... - -class EastDunbartonshire(SpringHolidayLastMondayMay, FairHolidayThirdMondayJuly, AutumnHolidayLastMondaySeptember, Scotland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - -class Edinburgh(Scotland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_spring_holiday: ClassVar[bool] - include_victoria_day: ClassVar[bool] - include_autumn_holiday: ClassVar[bool] - def get_spring_holiday(self, year): ... - def get_victoria_day(self, year): ... - def get_autumn_holiday(self, year): ... - +class EastDunbartonshire(SpringHolidayLastMondayMay, FairHolidayThirdMondayJuly, AutumnHolidayLastMondaySeptember, Scotland): ... +class Edinburgh(Scotland): ... class Elgin(SpringHolidaySecondMondayApril, FairHolidayLastMondayJune, LateSummer, AutumnHolidayThirdMondayOctober, Scotland): ... - -class Falkirk(FairHolidayFirstMondayJuly, BattleStirlingBridge, Scotland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - -class Fife(VictoriaDayFirstMondayJune, FairHolidayThirdMondayJuly, AutumnHolidayThirdMondayOctober, Scotland): - include_saint_andrew: ClassVar[bool] - def get_variable_days(self, year): ... - -class Galashiels(SpringHolidayFirstMondayJune, Scotland): - def get_variable_days(self, year): ... - -class Glasgow(SpringHolidayLastMondayMay, FairHolidayThirdMondayJuly, AutumnHolidayLastMondaySeptember, Scotland): - include_easter_monday: ClassVar[bool] - -class Hawick(Scotland): - def get_variable_days(self, year): ... - -class Inverclyde(LateSummer, Scotland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - def get_variable_days(self, year): ... - -class Inverness(SpringHolidayFirstMondayApril, FairHolidayFirstMondayJuly, AutumnHolidayFirstMondayOctober, Scotland): - def get_variable_days(self, year): ... - -class Kilmarnock(AyrGoldCup, Scotland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - -class Lanark(Scotland): - def get_variable_days(self, year): ... - -class Linlithgow(Scotland): - def get_variable_days(self, year): ... - -class Lochaber(Scotland): - def get_variable_days(self, year): ... - -class NorthLanarkshire(SpringHolidayLastMondayMay, FairHolidayThirdMondayJuly, AutumnHolidayLastMondaySeptember, Scotland): - include_easter_monday: ClassVar[bool] - -class Paisley(VictoriaDayLastMondayMay, FairHolidayFirstMondayAugust, AutumnHolidayLastMondaySeptember, Scotland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - +class Falkirk(FairHolidayFirstMondayJuly, BattleStirlingBridge, Scotland): ... +class Fife(VictoriaDayFirstMondayJune, FairHolidayThirdMondayJuly, AutumnHolidayThirdMondayOctober, Scotland): ... +class Galashiels(SpringHolidayFirstMondayJune, Scotland): ... +class Glasgow(SpringHolidayLastMondayMay, FairHolidayThirdMondayJuly, AutumnHolidayLastMondaySeptember, Scotland): ... +class Hawick(Scotland): ... +class Inverclyde(LateSummer, Scotland): ... +class Inverness(SpringHolidayFirstMondayApril, FairHolidayFirstMondayJuly, AutumnHolidayFirstMondayOctober, Scotland): ... +class Kilmarnock(AyrGoldCup, Scotland): ... +class Lanark(Scotland): ... +class Linlithgow(Scotland): ... +class Lochaber(Scotland): ... +class NorthLanarkshire(SpringHolidayLastMondayMay, FairHolidayThirdMondayJuly, AutumnHolidayLastMondaySeptember, Scotland): ... +class Paisley(VictoriaDayLastMondayMay, FairHolidayFirstMondayAugust, AutumnHolidayLastMondaySeptember, Scotland): ... class Perth( SpringHolidayFirstMondayApril, VictoriaDayFourthMondayMay, BattleStirlingBridge, AutumnHolidayFirstMondayOctober, Scotland ): ... - -class ScottishBorders(SpringHolidayFirstMondayApril, FairHolidayFourthFridayJuly, AutumnHolidaySecondMondayOctober, Scotland): - include_saint_andrew: ClassVar[bool] - -class SouthLanarkshire(SpringHolidayLastMondayMay, FairHolidayThirdMondayJuly, AutumnHolidayLastMondaySeptember, Scotland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - -class Stirling(SpringHolidayTuesdayAfterFirstMondayMay, BattleStirlingBridge, Scotland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - -class WestDunbartonshire(AutumnHolidayLastMondaySeptember, Scotland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] +class ScottishBorders(SpringHolidayFirstMondayApril, FairHolidayFourthFridayJuly, AutumnHolidaySecondMondayOctober, Scotland): ... +class SouthLanarkshire(SpringHolidayLastMondayMay, FairHolidayThirdMondayJuly, AutumnHolidayLastMondaySeptember, Scotland): ... +class Stirling(SpringHolidayTuesdayAfterFirstMondayMay, BattleStirlingBridge, Scotland): ... +class WestDunbartonshire(AutumnHolidayLastMondaySeptember, Scotland): ... diff --git a/stubs/workalendar/workalendar/europe/scotland/mixins/__init__.pyi b/stubs/workalendar/workalendar/europe/scotland/mixins/__init__.pyi index 07f6ebf86979..0c07a387747b 100644 --- a/stubs/workalendar/workalendar/europe/scotland/mixins/__init__.pyi +++ b/stubs/workalendar/workalendar/europe/scotland/mixins/__init__.pyi @@ -1,3 +1,5 @@ +import datetime + from .autumn_holiday import ( AutumnHolidayFirstMondayOctober as AutumnHolidayFirstMondayOctober, AutumnHolidayLastMondaySeptember as AutumnHolidayLastMondaySeptember, @@ -27,13 +29,13 @@ from .victoria_day import ( ) class LateSummer: - def get_variable_days(self, year): ... + def get_variable_days(self, year: int) -> list[tuple[datetime.date, str]]: ... class BattleStirlingBridge: - def get_variable_days(self, year): ... + def get_variable_days(self, year: int) -> list[tuple[datetime.date, str]]: ... class AyrGoldCup: - def get_variable_days(self, year): ... + def get_variable_days(self, year: int) -> list[tuple[datetime.date, str]]: ... # Names in __all__ with no definition: # VictoriaDayTuesdayAfterFirstMondayMay diff --git a/stubs/workalendar/workalendar/europe/scotland/mixins/autumn_holiday.pyi b/stubs/workalendar/workalendar/europe/scotland/mixins/autumn_holiday.pyi index a38964cd0714..fda6a3919b49 100644 --- a/stubs/workalendar/workalendar/europe/scotland/mixins/autumn_holiday.pyi +++ b/stubs/workalendar/workalendar/europe/scotland/mixins/autumn_holiday.pyi @@ -1,3 +1,4 @@ +import datetime from typing import ClassVar class AutumHoliday: @@ -5,13 +6,13 @@ class AutumHoliday: autumn_holiday_label: ClassVar[str] class AutumnHolidayLastMondaySeptember(AutumHoliday): - def get_autumn_holiday(self, year): ... + def get_autumn_holiday(self, year: int) -> tuple[datetime.date, str]: ... class AutumnHolidayFirstMondayOctober(AutumHoliday): - def get_autumn_holiday(self, year): ... + def get_autumn_holiday(self, year: int) -> tuple[datetime.date, str]: ... class AutumnHolidaySecondMondayOctober(AutumHoliday): - def get_autumn_holiday(self, year): ... + def get_autumn_holiday(self, year: int) -> tuple[datetime.date, str]: ... class AutumnHolidayThirdMondayOctober(AutumHoliday): - def get_autumn_holiday(self, year): ... + def get_autumn_holiday(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/europe/scotland/mixins/fair_holiday.pyi b/stubs/workalendar/workalendar/europe/scotland/mixins/fair_holiday.pyi index d9ac0ca7ab47..3011c24d7989 100644 --- a/stubs/workalendar/workalendar/europe/scotland/mixins/fair_holiday.pyi +++ b/stubs/workalendar/workalendar/europe/scotland/mixins/fair_holiday.pyi @@ -1,3 +1,4 @@ +import datetime from typing import ClassVar class FairHoliday: @@ -5,22 +6,22 @@ class FairHoliday: fair_holiday_label: ClassVar[str] class FairHolidayLastMondayJune(FairHoliday): - def get_fair_holiday(self, year): ... + def get_fair_holiday(self, year: int) -> tuple[datetime.date, str]: ... class FairHolidayFirstMondayJuly(FairHoliday): - def get_fair_holiday(self, year): ... + def get_fair_holiday(self, year: int) -> tuple[datetime.date, str]: ... class FairHolidaySecondMondayJuly(FairHoliday): - def get_fair_holiday(self, year): ... + def get_fair_holiday(self, year: int) -> tuple[datetime.date, str]: ... class FairHolidayThirdMondayJuly(FairHoliday): - def get_fair_holiday(self, year): ... + def get_fair_holiday(self, year: int) -> tuple[datetime.date, str]: ... class FairHolidayLastMondayJuly(FairHoliday): - def get_fair_holiday(self, year): ... + def get_fair_holiday(self, year: int) -> tuple[datetime.date, str]: ... class FairHolidayFourthFridayJuly(FairHoliday): - def get_fair_holiday(self, year): ... + def get_fair_holiday(self, year: int) -> tuple[datetime.date, str]: ... class FairHolidayFirstMondayAugust(FairHoliday): - def get_fair_holiday(self, year): ... + def get_fair_holiday(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/europe/scotland/mixins/spring_holiday.pyi b/stubs/workalendar/workalendar/europe/scotland/mixins/spring_holiday.pyi index 31a017952d0a..dbb1919b08d0 100644 --- a/stubs/workalendar/workalendar/europe/scotland/mixins/spring_holiday.pyi +++ b/stubs/workalendar/workalendar/europe/scotland/mixins/spring_holiday.pyi @@ -1,19 +1,20 @@ +import datetime from typing import ClassVar class SpringHoliday: include_spring_holiday: ClassVar[bool] class SpringHolidayFirstMondayApril(SpringHoliday): - def get_spring_holiday(self, year): ... + def get_spring_holiday(self, year: int) -> tuple[datetime.date, str]: ... class SpringHolidaySecondMondayApril(SpringHoliday): - def get_spring_holiday(self, year): ... + def get_spring_holiday(self, year: int) -> tuple[datetime.date, str]: ... class SpringHolidayTuesdayAfterFirstMondayMay(SpringHoliday): - def get_spring_holiday(self, year): ... + def get_spring_holiday(self, year: int) -> tuple[datetime.date, str]: ... class SpringHolidayLastMondayMay(SpringHoliday): - def get_spring_holiday(self, year): ... + def get_spring_holiday(self, year: int) -> tuple[datetime.date, str]: ... class SpringHolidayFirstMondayJune(SpringHoliday): - def get_spring_holiday(self, year): ... + def get_spring_holiday(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/europe/scotland/mixins/victoria_day.pyi b/stubs/workalendar/workalendar/europe/scotland/mixins/victoria_day.pyi index 8e9b93e6793a..b82efc552697 100644 --- a/stubs/workalendar/workalendar/europe/scotland/mixins/victoria_day.pyi +++ b/stubs/workalendar/workalendar/europe/scotland/mixins/victoria_day.pyi @@ -1,3 +1,4 @@ +import datetime from typing import ClassVar class VictoriaDayMixin: @@ -5,10 +6,10 @@ class VictoriaDayMixin: victoria_day_label: ClassVar[str] class VictoriaDayFourthMondayMay(VictoriaDayMixin): - def get_victoria_day(self, year): ... + def get_victoria_day(self, year: int) -> tuple[datetime.date, str]: ... class VictoriaDayLastMondayMay(VictoriaDayMixin): - def get_victoria_day(self, year): ... + def get_victoria_day(self, year: int) -> tuple[datetime.date, str]: ... class VictoriaDayFirstMondayJune(VictoriaDayMixin): - def get_victoria_day(self, year): ... + def get_victoria_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/europe/serbia.pyi b/stubs/workalendar/workalendar/europe/serbia.pyi index dba579bc5bbf..eae4958f414d 100644 --- a/stubs/workalendar/workalendar/europe/serbia.pyi +++ b/stubs/workalendar/workalendar/europe/serbia.pyi @@ -1,12 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import OrthodoxCalendar -class Serbia(OrthodoxCalendar): - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_christmas: ClassVar[bool] +class Serbia(OrthodoxCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/slovakia.pyi b/stubs/workalendar/workalendar/europe/slovakia.pyi index 799bd8ea388e..4cd11f145020 100644 --- a/stubs/workalendar/workalendar/europe/slovakia.pyi +++ b/stubs/workalendar/workalendar/europe/slovakia.pyi @@ -1,15 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Slovakia(WesternCalendar): - include_epiphany: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete +class Slovakia(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/slovenia.pyi b/stubs/workalendar/workalendar/europe/slovenia.pyi index b3335af5f69c..c4a84236188f 100644 --- a/stubs/workalendar/workalendar/europe/slovenia.pyi +++ b/stubs/workalendar/workalendar/europe/slovenia.pyi @@ -1,14 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Slovenia(WesternCalendar): - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_christmas: ClassVar[bool] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_variable_days(self, year): ... +class Slovenia(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/europe/spain.pyi b/stubs/workalendar/workalendar/europe/spain.pyi index ec1bbeccfb7a..ad5c06ca23a1 100644 --- a/stubs/workalendar/workalendar/europe/spain.pyi +++ b/stubs/workalendar/workalendar/europe/spain.pyi @@ -1,86 +1,20 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class Spain(WesternCalendar): - include_epiphany: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete - -class Andalusia(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class Aragon(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class CastileAndLeon(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class CastillaLaMancha(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class CanaryIslands(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class Catalonia(Spain): - include_easter_monday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete - -class Extremadura(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class Galicia(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class BalearicIslands(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - -class LaRioja(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class CommunityofMadrid(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class Murcia(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class Navarre(Spain): - include_holy_thursday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - -class Asturias(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class BasqueCountry(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - -class Cantabria(Spain): - FIXED_HOLIDAYS: Incomplete - include_holy_thursday: ClassVar[bool] - -class ValencianCommunity(Spain): - FIXED_HOLIDAYS: Incomplete - include_easter_monday: ClassVar[bool] +class Spain(WesternCalendar): ... +class Andalusia(Spain): ... +class Aragon(Spain): ... +class CastileAndLeon(Spain): ... +class CastillaLaMancha(Spain): ... +class CanaryIslands(Spain): ... +class Catalonia(Spain): ... +class Extremadura(Spain): ... +class Galicia(Spain): ... +class BalearicIslands(Spain): ... +class LaRioja(Spain): ... +class CommunityofMadrid(Spain): ... +class Murcia(Spain): ... +class Navarre(Spain): ... +class Asturias(Spain): ... +class BasqueCountry(Spain): ... +class Cantabria(Spain): ... +class ValencianCommunity(Spain): ... diff --git a/stubs/workalendar/workalendar/europe/sweden.pyi b/stubs/workalendar/workalendar/europe/sweden.pyi index 5ae11735c93b..37eb241b749a 100644 --- a/stubs/workalendar/workalendar/europe/sweden.pyi +++ b/stubs/workalendar/workalendar/europe/sweden.pyi @@ -1,22 +1,8 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar class Sweden(WesternCalendar): - include_epiphany: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - whit_sunday_label: ClassVar[str] - include_christmas_eve: ClassVar[bool] - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_midsummer_eve(self, year): ... - def get_midsummer_day(self, year): ... - def get_variable_all_saints(self, year): ... - def get_variable_days(self, year): ... + def get_midsummer_eve(self, year: int) -> datetime.date: ... + def get_midsummer_day(self, year: int) -> datetime.date: ... + def get_variable_all_saints(self, year: int) -> datetime.date: ... diff --git a/stubs/workalendar/workalendar/europe/switzerland.pyi b/stubs/workalendar/workalendar/europe/switzerland.pyi index af9ab65cdbef..028994e07b5e 100644 --- a/stubs/workalendar/workalendar/europe/switzerland.pyi +++ b/stubs/workalendar/workalendar/europe/switzerland.pyi @@ -1,188 +1,40 @@ -from _typeshed import Incomplete +import datetime from typing import ClassVar from ..core import WesternCalendar class Switzerland(WesternCalendar): - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_ascension: ClassVar[bool] - include_whit_sunday: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_christmas: ClassVar[bool] - include_boxing_day: ClassVar[bool] - include_epiphany: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] include_berchtolds_day: ClassVar[bool] include_st_josephs_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def has_berchtolds_day(self, year): ... - def get_federal_thanksgiving_monday(self, year): ... - def get_variable_days(self, year): ... + def has_berchtolds_day(self, year: int) -> bool: ... + def get_federal_thanksgiving_monday(self, year: int) -> tuple[datetime.date, str]: ... -class Aargau(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - -class AppenzellInnerrhoden(Switzerland): - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - -class AppenzellAusserrhoden(Switzerland): - include_labour_day: ClassVar[bool] - -class Bern(Switzerland): - include_berchtolds_day: ClassVar[bool] - -class BaselLandschaft(Switzerland): - include_labour_day: ClassVar[bool] - -class BaselStadt(Switzerland): - include_labour_day: ClassVar[bool] - -class Fribourg(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_labour_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] +class Aargau(Switzerland): ... +class AppenzellInnerrhoden(Switzerland): ... +class AppenzellAusserrhoden(Switzerland): ... +class Bern(Switzerland): ... +class BaselLandschaft(Switzerland): ... +class BaselStadt(Switzerland): ... +class Fribourg(Switzerland): ... class Geneva(Switzerland): - include_boxing_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_genevan_fast(self, year): ... - def get_variable_days(self, year): ... - -class Glarus(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_all_saints: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - -class Graubunden(Switzerland): - include_epiphany: ClassVar[bool] - include_st_josephs_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - -class Jura(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_labour_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_boxing_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - -class Luzern(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_epiphany: ClassVar[bool] - include_st_josephs_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - -class Neuchatel(Switzerland): - include_boxing_day: ClassVar[bool] - include_labour_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def has_berchtolds_day(self, year): ... - def get_variable_days(self, year): ... - -class Nidwalden(Switzerland): - include_st_josephs_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - -class Obwalden(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - -class StGallen(Switzerland): - include_all_saints: ClassVar[bool] - -class Schaffhausen(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_labour_day: ClassVar[bool] - -class Solothurn(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_st_josephs_day: ClassVar[bool] - include_labour_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - -class Schwyz(Switzerland): - include_epiphany: ClassVar[bool] - include_st_josephs_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - -class Thurgau(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_labour_day: ClassVar[bool] - -class Ticino(Switzerland): - include_good_friday: ClassVar[bool] - include_epiphany: ClassVar[bool] - include_st_josephs_day: ClassVar[bool] - include_labour_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - -class Uri(Switzerland): - include_epiphany: ClassVar[bool] - include_st_josephs_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - -class Vaud(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_boxing_day: ClassVar[bool] - def get_variable_days(self, year): ... - -class Valais(Switzerland): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_whit_monday: ClassVar[bool] - include_st_josephs_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - include_boxing_day: ClassVar[bool] - -class Zug(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_corpus_christi: ClassVar[bool] - include_assumption: ClassVar[bool] - include_all_saints: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - -class Zurich(Switzerland): - include_berchtolds_day: ClassVar[bool] - include_labour_day: ClassVar[bool] + def get_genevan_fast(self, year: int) -> tuple[datetime.date, str]: ... + +class Glarus(Switzerland): ... +class Graubunden(Switzerland): ... +class Jura(Switzerland): ... +class Luzern(Switzerland): ... +class Neuchatel(Switzerland): ... +class Nidwalden(Switzerland): ... +class Obwalden(Switzerland): ... +class StGallen(Switzerland): ... +class Schaffhausen(Switzerland): ... +class Solothurn(Switzerland): ... +class Schwyz(Switzerland): ... +class Thurgau(Switzerland): ... +class Ticino(Switzerland): ... +class Uri(Switzerland): ... +class Vaud(Switzerland): ... +class Valais(Switzerland): ... +class Zug(Switzerland): ... +class Zurich(Switzerland): ... diff --git a/stubs/workalendar/workalendar/europe/turkey.pyi b/stubs/workalendar/workalendar/europe/turkey.pyi index 565866dbf52f..beed8658e57d 100644 --- a/stubs/workalendar/workalendar/europe/turkey.pyi +++ b/stubs/workalendar/workalendar/europe/turkey.pyi @@ -1,16 +1,6 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import IslamicCalendar class Turkey(IslamicCalendar): - shift_new_years_day: ClassVar[bool] - WEEKEND_DAYS: Incomplete - include_eid_al_fitr: ClassVar[bool] - length_eid_al_fitr: int - include_eid_al_adha: ClassVar[bool] - length_eid_al_adha: int - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - FIXED_HOLIDAYS: Incomplete - def get_delta_islamic_holidays(self, year): ... + def get_delta_islamic_holidays(self, year: int) -> datetime.timedelta: ... diff --git a/stubs/workalendar/workalendar/europe/ukraine.pyi b/stubs/workalendar/workalendar/europe/ukraine.pyi index ab6c353edd88..015af1b446de 100644 --- a/stubs/workalendar/workalendar/europe/ukraine.pyi +++ b/stubs/workalendar/workalendar/europe/ukraine.pyi @@ -1,17 +1,6 @@ -from _typeshed import Incomplete from typing import ClassVar from ..core import OrthodoxCalendar class Ukraine(OrthodoxCalendar): shift_sunday_holidays: ClassVar[bool] - shift_new_years_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - include_labour_day: ClassVar[bool] - labour_day_label: ClassVar[str] - include_christmas: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_whit_monday: ClassVar[bool] - def get_variable_days(self, year): ... diff --git a/stubs/workalendar/workalendar/europe/united_kingdom.pyi b/stubs/workalendar/workalendar/europe/united_kingdom.pyi index 8165013b15d2..ed3e2a03b74d 100644 --- a/stubs/workalendar/workalendar/europe/united_kingdom.pyi +++ b/stubs/workalendar/workalendar/europe/united_kingdom.pyi @@ -1,20 +1,12 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar class UnitedKingdom(WesternCalendar): - include_good_friday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - shift_new_years_day: ClassVar[bool] - non_computable_holiday_dict: Incomplete - def get_early_may_bank_holiday(self, year): ... - def get_spring_bank_holiday(self, year): ... - def get_late_summer_bank_holiday(self, year): ... - def non_computable_holiday(self, year): ... - def get_variable_days(self, year): ... + non_computable_holiday_dict: dict[int, list[tuple[datetime.date, str]]] + def get_early_may_bank_holiday(self, year: int) -> tuple[datetime.date, str]: ... + def get_spring_bank_holiday(self, year: int) -> tuple[datetime.date, str]: ... + def get_late_summer_bank_holiday(self, year: int) -> tuple[datetime.date, str]: ... + def non_computable_holiday(self, year: int) -> tuple[datetime.date, str] | None: ... -class UnitedKingdomNorthernIreland(UnitedKingdom): - def get_variable_days(self, year): ... +class UnitedKingdomNorthernIreland(UnitedKingdom): ... diff --git a/stubs/workalendar/workalendar/oceania/australia.pyi b/stubs/workalendar/workalendar/oceania/australia.pyi index 5074cf393565..94fed084347d 100644 --- a/stubs/workalendar/workalendar/oceania/australia.pyi +++ b/stubs/workalendar/workalendar/oceania/australia.pyi @@ -1,93 +1,48 @@ -from _typeshed import Incomplete +import datetime from typing import ClassVar from ..core import WesternCalendar class Australia(WesternCalendar): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] include_queens_birthday: ClassVar[bool] include_labour_day_october: ClassVar[bool] - include_boxing_day: ClassVar[bool] shift_anzac_day: ClassVar[bool] - ANZAC_SHIFT_DAYS: Incomplete - FIXED_HOLIDAYS: Incomplete - def get_canberra_day(self, year): ... - def get_queens_birthday(self, year): ... - def get_labour_day_october(self, year): ... - def get_anzac_day(self, year): ... - def get_variable_days(self, year): ... + ANZAC_SHIFT_DAYS: ClassVar[tuple[int, ...]] + def get_canberra_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_queens_birthday(self, year: int) -> tuple[datetime.date, str]: ... + def get_labour_day_october(self, year: int) -> tuple[datetime.date, str]: ... + def get_anzac_day(self, year: int) -> tuple[datetime.date, str]: ... class AustralianCapitalTerritory(Australia): - include_easter_saturday: ClassVar[bool] - include_queens_birthday: ClassVar[bool] - include_labour_day_october: ClassVar[bool] - include_boxing_day: ClassVar[bool] - def get_family_community_day(self, year): ... - def get_reconciliation_day(self, year): ... - def get_variable_days(self, year): ... + def get_family_community_day(self, year: int) -> tuple[datetime.date, str] | None: ... + def get_reconciliation_day(self, year: int) -> tuple[datetime.date, str] | None: ... -class NewSouthWales(Australia): - include_queens_birthday: ClassVar[bool] - include_easter_saturday: ClassVar[bool] - include_easter_sunday: ClassVar[bool] - include_labour_day_october: ClassVar[bool] - include_boxing_day: ClassVar[bool] - ANZAC_SHIFT_DAYS: Incomplete +class NewSouthWales(Australia): ... class NorthernTerritory(Australia): - include_easter_saturday: ClassVar[bool] - include_queens_birthday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - ANZAC_SHIFT_DAYS: Incomplete - def get_may_day(self, year): ... - def get_picnic_day(self, year): ... - def get_variable_days(self, year): ... + def get_may_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_picnic_day(self, year: int) -> tuple[datetime.date, str]: ... class Queensland(Australia): - include_easter_saturday: ClassVar[bool] - include_queens_birthday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - ANZAC_SHIFT_DAYS: Incomplete - def get_labour_day_may(self, year): ... - def get_variable_days(self, year): ... + def get_labour_day_may(self, year: int) -> tuple[datetime.date, str]: ... class SouthAustralia(Australia): - include_easter_saturday: ClassVar[bool] - include_queens_birthday: ClassVar[bool] - include_labour_day_october: ClassVar[bool] - ANZAC_SHIFT_DAYS: Incomplete - def get_adelaides_cup(self, year): ... - def get_proclamation_day(self, year): ... - def get_variable_days(self, year): ... + def get_adelaides_cup(self, year: int) -> tuple[datetime.date, str]: ... + def get_proclamation_day(self, year: int) -> tuple[datetime.date, str]: ... class Tasmania(Australia): - include_queens_birthday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - shift_anzac_day: ClassVar[bool] @property - def has_recreation_day(self): ... - def get_eight_hours_day(self, year): ... - def get_recreation_day(self, year): ... - def get_variable_days(self, year): ... + def has_recreation_day(self) -> bool: ... + def get_eight_hours_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_recreation_day(self, year: int) -> tuple[datetime.date, str]: ... class Hobart(Tasmania): - @property - def has_recreation_day(self): ... - def get_hobart(self, year): ... - def get_variable_days(self, year): ... + def get_hobart(self, year: int) -> tuple[datetime.date, str]: ... class Victoria(Australia): - include_easter_saturday: ClassVar[bool] - include_queens_birthday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - shift_anzac_day: ClassVar[bool] - def get_labours_day_in_march(self, year): ... - def get_melbourne_cup(self, year): ... - def get_variable_days(self, year): ... + def get_labours_day_in_march(self, year: int) -> tuple[datetime.date, str]: ... + def get_melbourne_cup(self, year: int) -> tuple[datetime.date, str]: ... class WesternAustralia(Australia): - include_boxing_day: ClassVar[bool] - def get_labours_day_in_march(self, year): ... - def get_western_australia_day(self, year): ... - def get_variable_days(self, year): ... + def get_labours_day_in_march(self, year: int) -> tuple[datetime.date, str]: ... + def get_western_australia_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/oceania/marshall_islands.pyi b/stubs/workalendar/workalendar/oceania/marshall_islands.pyi index 869776ae05d0..44624b086a9c 100644 --- a/stubs/workalendar/workalendar/oceania/marshall_islands.pyi +++ b/stubs/workalendar/workalendar/oceania/marshall_islands.pyi @@ -1,9 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from ..core import WesternCalendar -class MarshallIslands(WesternCalendar): - FIXED_HOLIDAYS: Incomplete - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... +class MarshallIslands(WesternCalendar): ... diff --git a/stubs/workalendar/workalendar/oceania/new_zealand.pyi b/stubs/workalendar/workalendar/oceania/new_zealand.pyi index b92eeda3bb24..023cb2f5ba3d 100644 --- a/stubs/workalendar/workalendar/oceania/new_zealand.pyi +++ b/stubs/workalendar/workalendar/oceania/new_zealand.pyi @@ -1,13 +1,7 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from ..core import WesternCalendar class NewZealand(WesternCalendar): - include_good_friday: ClassVar[bool] - include_easter_monday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_queens_birthday(self, year): ... - def get_labour_day(self, year): ... - def get_variable_days(self, year): ... + def get_queens_birthday(self, year: int) -> tuple[datetime.date, str]: ... + def get_labour_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/precomputed_astronomy.pyi b/stubs/workalendar/workalendar/precomputed_astronomy.pyi index 2a87f3cb35f2..73da0c8459e4 100644 --- a/stubs/workalendar/workalendar/precomputed_astronomy.pyi +++ b/stubs/workalendar/workalendar/precomputed_astronomy.pyi @@ -1,14 +1,15 @@ import datetime -from _typeshed import Incomplete +import pathlib from collections.abc import Callable +from typing import Final TZAwareDate = datetime.date -YEAR_INTERVAL: int -TIME_ZONES: Incomplete -pre_computed_equinoxes_path: Incomplete -pre_computed_solar_terms_path: Incomplete +YEAR_INTERVAL: Final = 30 +TIME_ZONES: Final = ("America/Santiago", "Asia/Hong_Kong", "Asia/Taipei", "Asia/Tokyo") +pre_computed_equinoxes_path: Final[pathlib.Path] +pre_computed_solar_terms_path: Final[pathlib.Path] -def fromisoformat(iso): ... -def create_astronomical_data(progress: Callable[[int], int] | None = None): ... +def fromisoformat(iso: str) -> datetime.date: ... +def create_astronomical_data(progress: Callable[[int], int] | None = None) -> None: ... def calculate_equinoxes(year: int, timezone: str = "UTC") -> tuple[TZAwareDate, TZAwareDate]: ... def solar_term(year: int, degrees: int, timezone: str = "UTC") -> TZAwareDate: ... diff --git a/stubs/workalendar/workalendar/registry.pyi b/stubs/workalendar/workalendar/registry.pyi index b918ce9438a3..29f32214bafd 100644 --- a/stubs/workalendar/workalendar/registry.pyi +++ b/stubs/workalendar/workalendar/registry.pyi @@ -1,15 +1,18 @@ -from _typeshed import Incomplete +from collections.abc import Iterable +from typing import ClassVar from .core import Calendar class IsoRegistry: - STANDARD_MODULES: Incomplete - region_registry: dict[str, Calendar] - def __init__(self, load_standard_modules: bool = True) -> None: ... - def register(self, iso_code, cls) -> None: ... - def load_module_from_items(self, module_name, items) -> None: ... - def get(self, iso_code): ... - def get_subregions(self, iso_code): ... - def get_calendars(self, region_codes=None, include_subregions: bool = False): ... + STANDARD_MODULES: ClassVar[tuple[str, ...]] + region_registry: dict[str, type[Calendar]] + def __init__(self, load_standard_modules: bool | None = True) -> None: ... + def register(self, iso_code: str, cls: type[Calendar]) -> None: ... + def load_module_from_items(self, module_name: str, items: Iterable[str]) -> None: ... + def get(self, iso_code: str) -> type[Calendar]: ... + def get_subregions(self, iso_code: str) -> dict[str, type[Calendar]]: ... + def get_calendars( + self, region_codes: Iterable[str] | None = None, include_subregions: bool | None = False + ) -> dict[str, type[Calendar]]: ... registry: IsoRegistry diff --git a/stubs/workalendar/workalendar/registry_tools.pyi b/stubs/workalendar/workalendar/registry_tools.pyi index 8730de758539..57324fa02478 100644 --- a/stubs/workalendar/workalendar/registry_tools.pyi +++ b/stubs/workalendar/workalendar/registry_tools.pyi @@ -1 +1,6 @@ -def iso_register(iso_code): ... +from collections.abc import Callable +from typing import TypeVar + +_T = TypeVar("_T", bound=type) + +def iso_register(iso_code: str) -> Callable[[_T], _T]: ... diff --git a/stubs/workalendar/workalendar/skyfield_astronomy.pyi b/stubs/workalendar/workalendar/skyfield_astronomy.pyi index b7b5d7450782..fa73cc93a317 100644 --- a/stubs/workalendar/workalendar/skyfield_astronomy.pyi +++ b/stubs/workalendar/workalendar/skyfield_astronomy.pyi @@ -1,12 +1,15 @@ +import datetime from _typeshed import Incomplete +from math import _SupportsFloatOrIndex +from typing import Final -hour: Incomplete -minute: Incomplete -second: Incomplete -newton_precision: Incomplete +hour: Final[float] +minute: Final[float] +second: Final[float] +newton_precision: Final[float] -def calculate_equinoxes(year, timezone: str = ...): ... +def calculate_equinoxes(year, timezone: str = "UTC") -> tuple[Incomplete, Incomplete]: ... def get_current_longitude(current_date, earth, sun): ... def newton(f, x0, x1, precision=..., **func_kwargs): ... def newton_angle_function(t, ts, target_angle, body1, body2): ... -def solar_term(year, degrees, timezone: str = ...): ... +def solar_term(year: int, degrees: _SupportsFloatOrIndex, timezone: str = "UTC") -> datetime.date: ... diff --git a/stubs/workalendar/workalendar/usa/alabama.pyi b/stubs/workalendar/workalendar/usa/alabama.pyi index 790c0ebe34ef..bc2fed49ea8a 100644 --- a/stubs/workalendar/workalendar/usa/alabama.pyi +++ b/stubs/workalendar/workalendar/usa/alabama.pyi @@ -1,20 +1,10 @@ -from typing import ClassVar +import datetime from .core import UnitedStates -class Alabama(UnitedStates): - include_confederation_day: ClassVar[bool] - martin_luther_king_label: ClassVar[str] - presidents_day_label: ClassVar[str] - columbus_day_label: ClassVar[str] - include_jefferson_davis_birthday: ClassVar[bool] - -class AlabamaBaldwinCounty(Alabama): - include_fat_tuesday: ClassVar[bool] - -class AlabamaMobileCounty(Alabama): - include_fat_tuesday: ClassVar[bool] +class Alabama(UnitedStates): ... +class AlabamaBaldwinCounty(Alabama): ... +class AlabamaMobileCounty(Alabama): ... class AlabamaPerryCounty(Alabama): - def get_obama_day(self, year): ... - def get_variable_days(self, year): ... + def get_obama_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/usa/alaska.pyi b/stubs/workalendar/workalendar/usa/alaska.pyi index f304b601a0cf..1451fcd4d84e 100644 --- a/stubs/workalendar/workalendar/usa/alaska.pyi +++ b/stubs/workalendar/workalendar/usa/alaska.pyi @@ -1,9 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from .core import UnitedStates -class Alaska(UnitedStates): - FIXED_HOLIDAYS: Incomplete - include_columbus_day: ClassVar[bool] - def get_variable_days(self, year): ... +class Alaska(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/american_samoa.pyi b/stubs/workalendar/workalendar/usa/american_samoa.pyi index b13477739164..21d22fea7699 100644 --- a/stubs/workalendar/workalendar/usa/american_samoa.pyi +++ b/stubs/workalendar/workalendar/usa/american_samoa.pyi @@ -1,9 +1,6 @@ -from typing import ClassVar +import datetime from .core import UnitedStates class AmericanSamoa(UnitedStates): - include_boxing_day: ClassVar[bool] - boxing_day_label: ClassVar[str] - def get_flag_day(self, year): ... - def get_variable_days(self, year): ... + def get_flag_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/usa/arizona.pyi b/stubs/workalendar/workalendar/usa/arizona.pyi index fb95adc76afb..e48276f5f45c 100644 --- a/stubs/workalendar/workalendar/usa/arizona.pyi +++ b/stubs/workalendar/workalendar/usa/arizona.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Arizona(UnitedStates): - martin_luther_king_label: ClassVar[str] - presidents_day_label: ClassVar[str] +class Arizona(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/arkansas.pyi b/stubs/workalendar/workalendar/usa/arkansas.pyi index 1ef2a55fde7a..7b67dd03f873 100644 --- a/stubs/workalendar/workalendar/usa/arkansas.pyi +++ b/stubs/workalendar/workalendar/usa/arkansas.pyi @@ -1,8 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Arkansas(UnitedStates): - include_christmas_eve: ClassVar[bool] - presidents_day_label: ClassVar[str] - include_columbus_day: ClassVar[bool] +class Arkansas(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/california.pyi b/stubs/workalendar/workalendar/usa/california.pyi index ff92d94aab06..d5795a02563b 100644 --- a/stubs/workalendar/workalendar/usa/california.pyi +++ b/stubs/workalendar/workalendar/usa/california.pyi @@ -1,30 +1,11 @@ -from _typeshed import Incomplete from typing import ClassVar from .core import UnitedStates class California(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - include_cesar_chavez_day: ClassVar[bool] - include_columbus_day: ClassVar[bool] - shift_exceptions: Incomplete - def get_cesar_chavez_days(self, year): ... + shift_exceptions: ClassVar[list[tuple[int, int]]] -class CaliforniaEducation(California): - def get_variable_days(self, year): ... - -class CaliforniaBerkeley(California): - FIXED_HOLIDAYS: Incomplete - include_cesar_chavez_day: ClassVar[bool] - include_lincoln_birthday: ClassVar[bool] - include_columbus_day: ClassVar[bool] - columbus_day_label: ClassVar[str] - -class CaliforniaSanFrancisco(California): - include_cesar_chavez_day: ClassVar[bool] - include_columbus_day: ClassVar[bool] - -class CaliforniaWestHollywood(California): - FIXED_HOLIDAYS: Incomplete - include_cesar_chavez_day: ClassVar[bool] - include_thanksgiving_friday: ClassVar[bool] +class CaliforniaEducation(California): ... +class CaliforniaBerkeley(California): ... +class CaliforniaSanFrancisco(California): ... +class CaliforniaWestHollywood(California): ... diff --git a/stubs/workalendar/workalendar/usa/connecticut.pyi b/stubs/workalendar/workalendar/usa/connecticut.pyi index b8e396f986d1..29d97d803d17 100644 --- a/stubs/workalendar/workalendar/usa/connecticut.pyi +++ b/stubs/workalendar/workalendar/usa/connecticut.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Connecticut(UnitedStates): - include_good_friday: ClassVar[bool] - include_lincoln_birthday: ClassVar[bool] +class Connecticut(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/core.pyi b/stubs/workalendar/workalendar/usa/core.pyi index 404a701aa422..b0afdca07dfb 100644 --- a/stubs/workalendar/workalendar/usa/core.pyi +++ b/stubs/workalendar/workalendar/usa/core.pyi @@ -1,10 +1,9 @@ -from _typeshed import Incomplete +import datetime from typing import ClassVar from ..core import WesternCalendar class UnitedStates(WesternCalendar): - FIXED_HOLIDAYS: Incomplete include_veterans_day: ClassVar[bool] veterans_day_label: ClassVar[str] martin_luther_king_label: ClassVar[str] @@ -19,38 +18,32 @@ class UnitedStates(WesternCalendar): include_jefferson_davis_birthday: ClassVar[bool] include_cesar_chavez_day: ClassVar[bool] include_patriots_day: ClassVar[bool] - boxing_day_label: ClassVar[str] include_election_day_every_year: ClassVar[bool] include_election_day_even: ClassVar[bool] election_day_label: ClassVar[str] include_inauguration_day: ClassVar[bool] national_memorial_day_label: ClassVar[str] - include_fat_tuesday: ClassVar[bool] fat_tuesday_label: ClassVar[str] include_juneteenth: ClassVar[bool] - shift_exceptions: Incomplete - def shift(self, holidays, year): ... + shift_exceptions: ClassVar[tuple[tuple[int, int], ...] | list[tuple[int, int]]] + def shift(self, holidays: list[tuple[datetime.date, str]], year: int) -> list[tuple[datetime.date, str]]: ... @staticmethod - def is_presidential_year(year): ... - def get_election_date(self, year): ... - def get_election_day(self, year): ... - def get_thanksgiving_friday(self, year): ... - def get_confederate_day(self, year): ... - def get_jefferson_davis_birthday(self, year): ... - def get_martin_luther_king_date(self, year): ... - def get_martin_luther_king_day(self, year): ... - def get_presidents_day(self, year): ... - def get_cesar_chavez_days(self, year): ... - def get_patriots_day(self, year): ... - def get_columbus_day(self, year): ... - def get_lincoln_birthday(self, year): ... - def get_inauguration_date(self, year): ... - def get_national_memorial_day(self, year): ... - def get_juneteenth_day(self, year): ... - def get_variable_days(self, year): ... - def get_veterans_day(self, year): ... - def get_fixed_holidays(self, year): ... - def get_calendar_holidays(self, year): ... + def is_presidential_year(year: int) -> bool: ... + def get_election_date(self, year: int) -> datetime.date: ... + def get_election_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_thanksgiving_friday(self, year: int) -> tuple[datetime.date, str]: ... + def get_confederate_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_jefferson_davis_birthday(self, year: int) -> tuple[datetime.date, str]: ... + def get_martin_luther_king_date(self, year: int) -> datetime.date: ... + def get_martin_luther_king_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_presidents_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_cesar_chavez_days(self, year: int) -> list[tuple[datetime.date, str]]: ... + def get_patriots_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_columbus_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_lincoln_birthday(self, year: int) -> tuple[datetime.date, str]: ... + def get_inauguration_date(self, year: int) -> datetime.date: ... + def get_national_memorial_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_juneteenth_day(self, year: int) -> tuple[datetime.date, str]: ... + def get_veterans_day(self, year: int) -> tuple[datetime.date, str]: ... -class FederalReserveSystem(UnitedStates): - include_juneteenth: ClassVar[bool] +class FederalReserveSystem(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/delaware.pyi b/stubs/workalendar/workalendar/usa/delaware.pyi index 6ec1882bcb0a..928ad9fe7284 100644 --- a/stubs/workalendar/workalendar/usa/delaware.pyi +++ b/stubs/workalendar/workalendar/usa/delaware.pyi @@ -1,10 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Delaware(UnitedStates): - include_good_friday: ClassVar[bool] - include_thanksgiving_friday: ClassVar[bool] - include_federal_presidents_day: ClassVar[bool] - include_columbus_day: ClassVar[bool] - include_election_day_even: ClassVar[bool] +class Delaware(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/district_columbia.pyi b/stubs/workalendar/workalendar/usa/district_columbia.pyi index a8e5d5d72329..4ed0f9b245fe 100644 --- a/stubs/workalendar/workalendar/usa/district_columbia.pyi +++ b/stubs/workalendar/workalendar/usa/district_columbia.pyi @@ -1,8 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from .core import UnitedStates -class DistrictOfColumbia(UnitedStates): - include_inauguration_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete +class DistrictOfColumbia(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/florida.pyi b/stubs/workalendar/workalendar/usa/florida.pyi index 1de35de8b919..127f679fc4e6 100644 --- a/stubs/workalendar/workalendar/usa/florida.pyi +++ b/stubs/workalendar/workalendar/usa/florida.pyi @@ -1,45 +1,26 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime +from typing import Any +from typing_extensions import TypeAlias from .core import UnitedStates +_HebrewDate: TypeAlias = Any # from `pyluach.dates` package + class HebrewHolidays: - hebrew_calendars: Incomplete + hebrew_calendars: dict[int, list[tuple[_HebrewDate | None, datetime.date]]] @classmethod - def get_hebrew_calendar(cls, gregorian_year): ... + def get_hebrew_calendar(cls, gregorian_year: int) -> list[tuple[_HebrewDate | None, datetime.date]]: ... @classmethod - def search_hebrew_calendar(cls, gregorian_year, hebrew_month, hebrew_day): ... + def search_hebrew_calendar(cls, gregorian_year: int, hebrew_month: int, hebrew_day: int) -> datetime.date: ... @classmethod - def get_rosh_hashanah(cls, year): ... + def get_rosh_hashanah(cls, year: int) -> datetime.date: ... @classmethod - def get_yom_kippur(cls, year): ... + def get_yom_kippur(cls, year: int) -> datetime.date: ... -class Florida(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - thanksgiving_friday_label: ClassVar[str] - include_columbus_day: ClassVar[bool] - include_federal_presidents_day: ClassVar[bool] +class Florida(UnitedStates): ... class FloridaLegal(Florida): - FIXED_HOLIDAYS: Incomplete - include_fat_tuesday: ClassVar[bool] - include_lincoln_birthday: ClassVar[bool] - include_federal_presidents_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_confederation_day: ClassVar[bool] - include_jefferson_davis_birthday: ClassVar[bool] - include_columbus_day: ClassVar[bool] - columbus_day_label: ClassVar[str] - include_election_day_every_year: ClassVar[bool] def __init__(self, *args, **kwargs) -> None: ... - def get_confederate_day(self, year): ... - def get_jefferson_davis_birthday(self, year): ... - -class FloridaCircuitCourts(HebrewHolidays, Florida): - include_federal_presidents_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - def get_variable_days(self, year): ... -class FloridaMiamiDade(Florida): - include_federal_presidents_day: ClassVar[bool] - include_columbus_day: ClassVar[bool] +class FloridaCircuitCourts(HebrewHolidays, Florida): ... +class FloridaMiamiDade(Florida): ... diff --git a/stubs/workalendar/workalendar/usa/georgia.pyi b/stubs/workalendar/workalendar/usa/georgia.pyi index d2589c5a5f06..3c766c916f92 100644 --- a/stubs/workalendar/workalendar/usa/georgia.pyi +++ b/stubs/workalendar/workalendar/usa/georgia.pyi @@ -1,13 +1,9 @@ +import datetime from typing import ClassVar from .core import UnitedStates class Georgia(UnitedStates): - include_confederation_day: ClassVar[bool] - include_federal_presidents_day: ClassVar[bool] label_washington_birthday_december: ClassVar[str] - thanksgiving_friday_label: ClassVar[str] - def get_washington_birthday_december(self, year): ... - def get_confederate_day(self, year): ... - def get_robert_lee_birthday(self, year): ... - def get_variable_days(self, year): ... + def get_washington_birthday_december(self, year: int) -> tuple[datetime.date, str]: ... + def get_robert_lee_birthday(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/usa/guam.pyi b/stubs/workalendar/workalendar/usa/guam.pyi index 4c6a8da20d3c..bece44d92005 100644 --- a/stubs/workalendar/workalendar/usa/guam.pyi +++ b/stubs/workalendar/workalendar/usa/guam.pyi @@ -1,10 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from .core import UnitedStates -class Guam(UnitedStates): - FIXED_HOLIDAYS: Incomplete - include_all_souls: ClassVar[bool] - include_immaculate_conception: ClassVar[bool] - immaculate_conception_label: ClassVar[str] +class Guam(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/hawaii.pyi b/stubs/workalendar/workalendar/usa/hawaii.pyi index 6026a3ff7c13..b465b374b8b1 100644 --- a/stubs/workalendar/workalendar/usa/hawaii.pyi +++ b/stubs/workalendar/workalendar/usa/hawaii.pyi @@ -1,12 +1,6 @@ -from _typeshed import Incomplete -from typing import ClassVar +import datetime from .core import UnitedStates class Hawaii(UnitedStates): - include_good_friday: ClassVar[bool] - include_columbus_day: ClassVar[bool] - include_election_day_even: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - def get_statehood_day(self, year): ... - def get_variable_days(self, year): ... + def get_statehood_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/usa/idaho.pyi b/stubs/workalendar/workalendar/usa/idaho.pyi index 81d36b57ea49..24b867d87cf6 100644 --- a/stubs/workalendar/workalendar/usa/idaho.pyi +++ b/stubs/workalendar/workalendar/usa/idaho.pyi @@ -1,6 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Idaho(UnitedStates): - martin_luther_king_label: ClassVar[str] +class Idaho(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/illinois.pyi b/stubs/workalendar/workalendar/usa/illinois.pyi index 0bf8abaf8313..329491d0e8d0 100644 --- a/stubs/workalendar/workalendar/usa/illinois.pyi +++ b/stubs/workalendar/workalendar/usa/illinois.pyi @@ -1,13 +1,8 @@ -from typing import ClassVar +import datetime from .core import UnitedStates -class Illinois(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - include_lincoln_birthday: ClassVar[bool] - include_election_day_even: ClassVar[bool] +class Illinois(UnitedStates): ... class ChicagoIllinois(Illinois): - include_thanksgiving_friday: ClassVar[bool] - def get_pulaski_day(self, year): ... - def get_variable_days(self, year): ... + def get_pulaski_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/usa/indiana.pyi b/stubs/workalendar/workalendar/usa/indiana.pyi index d083dcac3789..8bdb8237aa59 100644 --- a/stubs/workalendar/workalendar/usa/indiana.pyi +++ b/stubs/workalendar/workalendar/usa/indiana.pyi @@ -1,15 +1,9 @@ +import datetime from typing import ClassVar from .core import UnitedStates class Indiana(UnitedStates): - include_good_friday: ClassVar[bool] - include_thanksgiving_friday: ClassVar[bool] - thanksgiving_friday_label: ClassVar[str] - include_federal_presidents_day: ClassVar[bool] label_washington_birthday_december: ClassVar[str] - include_election_day_even: ClassVar[bool] - election_day_label: ClassVar[str] - def get_washington_birthday_december(self, year): ... - def get_primary_election_day(self, year): ... - def get_variable_days(self, year): ... + def get_washington_birthday_december(self, year: int) -> tuple[datetime.date, str]: ... + def get_primary_election_day(self, year: int) -> tuple[datetime.date, str]: ... diff --git a/stubs/workalendar/workalendar/usa/iowa.pyi b/stubs/workalendar/workalendar/usa/iowa.pyi index b41b4bcba60e..dbefcdba5dd9 100644 --- a/stubs/workalendar/workalendar/usa/iowa.pyi +++ b/stubs/workalendar/workalendar/usa/iowa.pyi @@ -1,8 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Iowa(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - include_columbus_day: ClassVar[bool] - include_federal_presidents_day: ClassVar[bool] +class Iowa(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/kansas.pyi b/stubs/workalendar/workalendar/usa/kansas.pyi index 512e3d464fcb..9a7d363617ad 100644 --- a/stubs/workalendar/workalendar/usa/kansas.pyi +++ b/stubs/workalendar/workalendar/usa/kansas.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Kansas(UnitedStates): - include_federal_presidents_day: ClassVar[bool] - include_columbus_day: ClassVar[bool] +class Kansas(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/kentucky.pyi b/stubs/workalendar/workalendar/usa/kentucky.pyi index 4d9bcb5b2203..c7bb6ebd9461 100644 --- a/stubs/workalendar/workalendar/usa/kentucky.pyi +++ b/stubs/workalendar/workalendar/usa/kentucky.pyi @@ -1,12 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from .core import UnitedStates -class Kentucky(UnitedStates): - include_good_friday: ClassVar[bool] - include_thanksgiving_friday: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_columbus_day: ClassVar[bool] - include_federal_presidents_day: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete +class Kentucky(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/louisiana.pyi b/stubs/workalendar/workalendar/usa/louisiana.pyi index 8b30f5010736..3db58ac68fa0 100644 --- a/stubs/workalendar/workalendar/usa/louisiana.pyi +++ b/stubs/workalendar/workalendar/usa/louisiana.pyi @@ -1,9 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Louisiana(UnitedStates): - include_good_friday: ClassVar[bool] - include_election_day_even: ClassVar[bool] - include_columbus_day: ClassVar[bool] - include_fat_tuesday: ClassVar[bool] +class Louisiana(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/maine.pyi b/stubs/workalendar/workalendar/usa/maine.pyi index 48aaac4550e6..e23cdfaf217d 100644 --- a/stubs/workalendar/workalendar/usa/maine.pyi +++ b/stubs/workalendar/workalendar/usa/maine.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Maine(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - include_patriots_day: ClassVar[bool] +class Maine(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/maryland.pyi b/stubs/workalendar/workalendar/usa/maryland.pyi index 6cd1972eff29..150924c8aa77 100644 --- a/stubs/workalendar/workalendar/usa/maryland.pyi +++ b/stubs/workalendar/workalendar/usa/maryland.pyi @@ -1,8 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Maryland(UnitedStates): - thanksgiving_friday_label: ClassVar[str] - include_thanksgiving_friday: ClassVar[bool] - def get_variable_days(self, year): ... +class Maryland(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/massachusetts.pyi b/stubs/workalendar/workalendar/usa/massachusetts.pyi index 667526855dbf..fed0da8d9f17 100644 --- a/stubs/workalendar/workalendar/usa/massachusetts.pyi +++ b/stubs/workalendar/workalendar/usa/massachusetts.pyi @@ -1,10 +1,4 @@ -from _typeshed import Incomplete -from typing import ClassVar - from .core import UnitedStates -class Massachusetts(UnitedStates): - include_patriots_day: ClassVar[bool] - -class SuffolkCountyMassachusetts(Massachusetts): - FIXED_HOLIDAYS: Incomplete +class Massachusetts(UnitedStates): ... +class SuffolkCountyMassachusetts(Massachusetts): ... diff --git a/stubs/workalendar/workalendar/usa/michigan.pyi b/stubs/workalendar/workalendar/usa/michigan.pyi index aa92a34b750b..0513248eb036 100644 --- a/stubs/workalendar/workalendar/usa/michigan.pyi +++ b/stubs/workalendar/workalendar/usa/michigan.pyi @@ -1,10 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Michigan(UnitedStates): - include_christmas_eve: ClassVar[bool] - include_thanksgiving_friday: ClassVar[bool] - include_election_day_even: ClassVar[bool] - include_columbus_day: ClassVar[bool] - def get_fixed_holidays(self, year): ... +class Michigan(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/minnesota.pyi b/stubs/workalendar/workalendar/usa/minnesota.pyi index 2f69b2da3c86..0f60c68fb03f 100644 --- a/stubs/workalendar/workalendar/usa/minnesota.pyi +++ b/stubs/workalendar/workalendar/usa/minnesota.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Minnesota(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - include_columbus_day: ClassVar[bool] +class Minnesota(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/mississippi.pyi b/stubs/workalendar/workalendar/usa/mississippi.pyi index 7649c4ac5fd3..e97b6fd78073 100644 --- a/stubs/workalendar/workalendar/usa/mississippi.pyi +++ b/stubs/workalendar/workalendar/usa/mississippi.pyi @@ -1,11 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Mississippi(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - include_confederation_day: ClassVar[bool] - include_columbus_day: ClassVar[bool] - martin_luther_king_label: ClassVar[str] - veterans_day_label: ClassVar[str] - national_memorial_day_label: ClassVar[str] +class Mississippi(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/missouri.pyi b/stubs/workalendar/workalendar/usa/missouri.pyi index aa2d32fa9e0d..f5b8a4bfef0b 100644 --- a/stubs/workalendar/workalendar/usa/missouri.pyi +++ b/stubs/workalendar/workalendar/usa/missouri.pyi @@ -1,8 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from .core import UnitedStates -class Missouri(UnitedStates): - FIXED_HOLIDAYS: Incomplete - include_lincoln_birthday: ClassVar[bool] +class Missouri(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/montana.pyi b/stubs/workalendar/workalendar/usa/montana.pyi index a2477dc6145e..745105471d2b 100644 --- a/stubs/workalendar/workalendar/usa/montana.pyi +++ b/stubs/workalendar/workalendar/usa/montana.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Montana(UnitedStates): - include_election_day_even: ClassVar[bool] - def get_variable_days(self, year): ... +class Montana(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/nebraska.pyi b/stubs/workalendar/workalendar/usa/nebraska.pyi index 1135ea26f656..0671b3645827 100644 --- a/stubs/workalendar/workalendar/usa/nebraska.pyi +++ b/stubs/workalendar/workalendar/usa/nebraska.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Nebraska(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - def get_variable_days(self, year): ... +class Nebraska(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/nevada.pyi b/stubs/workalendar/workalendar/usa/nevada.pyi index 5023243d9323..6715aba6c32d 100644 --- a/stubs/workalendar/workalendar/usa/nevada.pyi +++ b/stubs/workalendar/workalendar/usa/nevada.pyi @@ -1,9 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Nevada(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - thanksgiving_friday_label: ClassVar[str] - include_columbus_day: ClassVar[bool] - def get_variable_days(self, year): ... +class Nevada(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/new_hampshire.pyi b/stubs/workalendar/workalendar/usa/new_hampshire.pyi index 4e21201e646e..d8f4fb92c628 100644 --- a/stubs/workalendar/workalendar/usa/new_hampshire.pyi +++ b/stubs/workalendar/workalendar/usa/new_hampshire.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class NewHampshire(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - martin_luther_king_label: ClassVar[str] +class NewHampshire(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/new_jersey.pyi b/stubs/workalendar/workalendar/usa/new_jersey.pyi index 1f3c8df2602a..d20470bc7bcc 100644 --- a/stubs/workalendar/workalendar/usa/new_jersey.pyi +++ b/stubs/workalendar/workalendar/usa/new_jersey.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class NewJersey(UnitedStates): - include_good_friday: ClassVar[bool] - include_election_day_every_year: ClassVar[bool] +class NewJersey(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/new_mexico.pyi b/stubs/workalendar/workalendar/usa/new_mexico.pyi index 64fdf11e17cd..68759642ae64 100644 --- a/stubs/workalendar/workalendar/usa/new_mexico.pyi +++ b/stubs/workalendar/workalendar/usa/new_mexico.pyi @@ -1,8 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class NewMexico(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - thanksgiving_friday_label: ClassVar[str] - include_federal_presidents_day: ClassVar[bool] +class NewMexico(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/new_york.pyi b/stubs/workalendar/workalendar/usa/new_york.pyi index 0ad604845b2c..1c3bd50f379c 100644 --- a/stubs/workalendar/workalendar/usa/new_york.pyi +++ b/stubs/workalendar/workalendar/usa/new_york.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class NewYork(UnitedStates): - include_lincoln_birthday: ClassVar[bool] - include_election_day_every_year: ClassVar[bool] +class NewYork(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/north_carolina.pyi b/stubs/workalendar/workalendar/usa/north_carolina.pyi index 9b4c3208908c..210c2ee6fddd 100644 --- a/stubs/workalendar/workalendar/usa/north_carolina.pyi +++ b/stubs/workalendar/workalendar/usa/north_carolina.pyi @@ -1,13 +1,6 @@ -from typing import ClassVar +import datetime from .core import UnitedStates class NorthCarolina(UnitedStates): - include_good_friday: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_thanksgiving_friday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - include_federal_presidents_day: ClassVar[bool] - include_columbus_day: ClassVar[bool] - def get_christmas_shifts(self, year): ... - def get_variable_days(self, year): ... + def get_christmas_shifts(self, year: int) -> list[tuple[datetime.date, str]]: ... diff --git a/stubs/workalendar/workalendar/usa/north_dakota.pyi b/stubs/workalendar/workalendar/usa/north_dakota.pyi index 3010c52f056c..8584c50b67f0 100644 --- a/stubs/workalendar/workalendar/usa/north_dakota.pyi +++ b/stubs/workalendar/workalendar/usa/north_dakota.pyi @@ -1,7 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class NorthDakota(UnitedStates): - include_columbus_day: ClassVar[bool] - include_good_friday: ClassVar[bool] +class NorthDakota(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/oklahoma.pyi b/stubs/workalendar/workalendar/usa/oklahoma.pyi index 30309f73744b..29c5cbffe5f4 100644 --- a/stubs/workalendar/workalendar/usa/oklahoma.pyi +++ b/stubs/workalendar/workalendar/usa/oklahoma.pyi @@ -1,8 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Oklahoma(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - include_columbus_day: ClassVar[bool] +class Oklahoma(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/oregon.pyi b/stubs/workalendar/workalendar/usa/oregon.pyi index e9c626e59f0a..8e5c420af91c 100644 --- a/stubs/workalendar/workalendar/usa/oregon.pyi +++ b/stubs/workalendar/workalendar/usa/oregon.pyi @@ -1,6 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Oregon(UnitedStates): - include_columbus_day: ClassVar[bool] +class Oregon(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/pennsylvania.pyi b/stubs/workalendar/workalendar/usa/pennsylvania.pyi index d58509664fcf..90e36dede951 100644 --- a/stubs/workalendar/workalendar/usa/pennsylvania.pyi +++ b/stubs/workalendar/workalendar/usa/pennsylvania.pyi @@ -1,8 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Pennsylvania(UnitedStates): - include_good_friday: ClassVar[bool] - include_thanksgiving_friday: ClassVar[bool] - include_election_day_every_year: ClassVar[bool] +class Pennsylvania(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/rhode_island.pyi b/stubs/workalendar/workalendar/usa/rhode_island.pyi index 1bed3bd1d9b1..cf7ec4384111 100644 --- a/stubs/workalendar/workalendar/usa/rhode_island.pyi +++ b/stubs/workalendar/workalendar/usa/rhode_island.pyi @@ -1,8 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class RhodeIsland(UnitedStates): - include_federal_presidents_day: ClassVar[bool] - include_election_day_even: ClassVar[bool] - def get_variable_days(self, year): ... +class RhodeIsland(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/south_carolina.pyi b/stubs/workalendar/workalendar/usa/south_carolina.pyi index 54877f149242..4702aea2c0ca 100644 --- a/stubs/workalendar/workalendar/usa/south_carolina.pyi +++ b/stubs/workalendar/workalendar/usa/south_carolina.pyi @@ -1,11 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from .core import UnitedStates -class SouthCarolina(UnitedStates): - FIXED_HOLIDAYS: Incomplete - include_thanksgiving_friday: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_boxing_day: ClassVar[bool] - include_columbus_day: ClassVar[bool] +class SouthCarolina(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/south_dakota.pyi b/stubs/workalendar/workalendar/usa/south_dakota.pyi index 3ed2cb52da3f..56cb998a6ae0 100644 --- a/stubs/workalendar/workalendar/usa/south_dakota.pyi +++ b/stubs/workalendar/workalendar/usa/south_dakota.pyi @@ -1,6 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class SouthDakota(UnitedStates): - columbus_day_label: ClassVar[str] +class SouthDakota(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/tennessee.pyi b/stubs/workalendar/workalendar/usa/tennessee.pyi index 2e63b1a6ca2f..0ca5c9c197bd 100644 --- a/stubs/workalendar/workalendar/usa/tennessee.pyi +++ b/stubs/workalendar/workalendar/usa/tennessee.pyi @@ -1,8 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Tennessee(UnitedStates): - include_columbus_day: ClassVar[bool] - include_good_friday: ClassVar[bool] - include_christmas_eve: ClassVar[bool] +class Tennessee(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/texas.pyi b/stubs/workalendar/workalendar/usa/texas.pyi index 49e69f48f6f3..95de54ac7ab7 100644 --- a/stubs/workalendar/workalendar/usa/texas.pyi +++ b/stubs/workalendar/workalendar/usa/texas.pyi @@ -3,23 +3,10 @@ from typing import ClassVar from .core import UnitedStates class TexasBase(UnitedStates): - include_columbus_day: ClassVar[bool] texas_include_confederate_heroes: ClassVar[bool] texas_include_independance_day: ClassVar[bool] texas_san_jacinto_day: ClassVar[bool] texas_emancipation_day: ClassVar[bool] texas_lyndon_johnson_day: ClassVar[bool] - include_thanksgiving_friday: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_boxing_day: ClassVar[bool] - def get_fixed_holidays(self, year): ... -class Texas(TexasBase): - texas_include_confederate_heroes: ClassVar[bool] - texas_include_independance_day: ClassVar[bool] - texas_san_jacinto_day: ClassVar[bool] - texas_emancipation_day: ClassVar[bool] - texas_lyndon_johnson_day: ClassVar[bool] - include_thanksgiving_friday: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - include_boxing_day: ClassVar[bool] +class Texas(TexasBase): ... diff --git a/stubs/workalendar/workalendar/usa/utah.pyi b/stubs/workalendar/workalendar/usa/utah.pyi index 42512bcd4970..d021d437072a 100644 --- a/stubs/workalendar/workalendar/usa/utah.pyi +++ b/stubs/workalendar/workalendar/usa/utah.pyi @@ -1,6 +1,3 @@ -from _typeshed import Incomplete - from .core import UnitedStates -class Utah(UnitedStates): - FIXED_HOLIDAYS: Incomplete +class Utah(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/vermont.pyi b/stubs/workalendar/workalendar/usa/vermont.pyi index 34bb02ea4ee0..09ecac3852fb 100644 --- a/stubs/workalendar/workalendar/usa/vermont.pyi +++ b/stubs/workalendar/workalendar/usa/vermont.pyi @@ -1,9 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from .core import UnitedStates -class Vermont(UnitedStates): - FIXED_HOLIDAYS: Incomplete - include_columbus_day: ClassVar[bool] - def get_variable_days(self, year): ... +class Vermont(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/virginia.pyi b/stubs/workalendar/workalendar/usa/virginia.pyi index 8fcbc0c20f3c..fff0bf03e5f5 100644 --- a/stubs/workalendar/workalendar/usa/virginia.pyi +++ b/stubs/workalendar/workalendar/usa/virginia.pyi @@ -3,9 +3,4 @@ from typing import ClassVar from .core import UnitedStates class Virginia(UnitedStates): - include_christmas_eve: ClassVar[bool] - include_thanksgiving_friday: ClassVar[bool] - include_boxing_day: ClassVar[bool] - presidents_day_label: ClassVar[str] include_thanksgiving_wednesday: ClassVar[bool] - def get_variable_days(self, year): ... diff --git a/stubs/workalendar/workalendar/usa/washington.pyi b/stubs/workalendar/workalendar/usa/washington.pyi index 4fe6def92372..601ae6e897cf 100644 --- a/stubs/workalendar/workalendar/usa/washington.pyi +++ b/stubs/workalendar/workalendar/usa/washington.pyi @@ -1,6 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Washington(UnitedStates): - include_columbus_day: ClassVar[bool] +class Washington(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/west_virginia.pyi b/stubs/workalendar/workalendar/usa/west_virginia.pyi index de2f05ff216c..86534593c152 100644 --- a/stubs/workalendar/workalendar/usa/west_virginia.pyi +++ b/stubs/workalendar/workalendar/usa/west_virginia.pyi @@ -1,14 +1,7 @@ -from _typeshed import Incomplete from typing import ClassVar from .core import UnitedStates class WestVirginia(UnitedStates): - include_thanksgiving_friday: ClassVar[bool] - include_election_day_even: ClassVar[bool] - election_day_label: ClassVar[str] west_virginia_include_christmas_eve: ClassVar[bool] west_virginia_include_nye: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete - shift_exceptions: Incomplete - def get_fixed_holidays(self, year): ... diff --git a/stubs/workalendar/workalendar/usa/wisconsin.pyi b/stubs/workalendar/workalendar/usa/wisconsin.pyi index 1b364dd4de88..1b983a429dc4 100644 --- a/stubs/workalendar/workalendar/usa/wisconsin.pyi +++ b/stubs/workalendar/workalendar/usa/wisconsin.pyi @@ -1,10 +1,3 @@ -from _typeshed import Incomplete -from typing import ClassVar - from .core import UnitedStates -class Wisconsin(UnitedStates): - include_columbus_day: ClassVar[bool] - include_federal_presidents_day: ClassVar[bool] - include_christmas_eve: ClassVar[bool] - FIXED_HOLIDAYS: Incomplete +class Wisconsin(UnitedStates): ... diff --git a/stubs/workalendar/workalendar/usa/wyoming.pyi b/stubs/workalendar/workalendar/usa/wyoming.pyi index acefb66f6439..fe927c5a49b4 100644 --- a/stubs/workalendar/workalendar/usa/wyoming.pyi +++ b/stubs/workalendar/workalendar/usa/wyoming.pyi @@ -1,6 +1,3 @@ -from typing import ClassVar - from .core import UnitedStates -class Wyoming(UnitedStates): - martin_luther_king_label: ClassVar[str] +class Wyoming(UnitedStates): ...