vacanza / holidays

Generate and work with holidays in Python
https://pypi.org/project/holidays
MIT License
1.45k stars 460 forks source link

Replace HolidayBase::country/market with HolidayBase::code #1865

Closed arkid15r closed 2 months ago

arkid15r commented 2 months ago

Proposed change

Another step in out v1 refactoring journey. Here I replaced HolidayBase::country and HolidayBase::market attributes with unified HolidayBase::code. I also added HolidayBase::scope to be able to identify entity's type easily.

In order to satisfy tests there is an unrelated change of HolidayBase::__repr__ that requires more opinions (keeping it that way for now).

Type of change

Checklist

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (79af62f) to head (7f9fe3d). Report is 8 commits behind head on v1.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## v1 #1865 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 182 184 +2 Lines 10473 10609 +136 Branches 1726 1719 -7 ========================================== + Hits 10473 10609 +136 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.