vacanza / holidays

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

Refactor `HolidayBase::__getattr__`: speed up _add_holiday_* methods #1764

Closed KJhellico closed 5 months ago

KJhellico commented 5 months ago

Proposed change

Refactor HolidayBase::__getattr__: speed up _addholiday* methods (remove regex use).

Test script result:

regex = 8.577 no regex = 2.879 (5000 times)

Type of change

Checklist

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 8851034115

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Totals Coverage Status
Change from base Build 8820337570: 0.0%
Covered Lines: 11005
Relevant Lines: 11005

💛 - Coveralls
sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud