vacanza / holidays

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

Remove deprecated `fix-encoding-pragma`, add `pyupgrade` #2007

Closed PPsyrius closed 2 weeks ago

PPsyrius commented 2 weeks ago

Proposed change

This PR switches out fix-encoding-pragma hook for pyupgrade.

I noticed that the fix-encoding-pragma used in make pre-commit is listed as deprecated, as seen here: Screenshot 2024-09-20 102351

As written in pre-commit-hooks pypl page:

fix-encoding-pragma Deprecated since py2 is EOL - use pyupgrade instead.

Add # -- coding: utf-8 -- to the top of python files. To remove the coding pragma pass --remove (useful in a python3-only codebase)

Type of change

Checklist

PPsyrius commented 2 weeks ago

Unlike the pre-commit results here, I can ascertain that these changes run correctly on my machine. image

KJhellico commented 2 weeks ago

It's great update! But we also need to fix tests/test_i10n.py.

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

codecov[bot] commented 2 weeks ago

Codecov Report

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

Project coverage is 100.00%. Comparing base (34dc910) to head (2ddb2c3). Report is 2 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #2007 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 188 188 Lines 11409 11409 Branches 1791 1791 ========================================= Hits 11409 11409 ```

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