Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Sep 20, 2024

Conversation

PPsyrius
Copy link
Collaborator

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

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new python-holidays functionality in general)

Checklist

  • I've followed the contributing guidelines
  • I've run make pre-commit, it didn't generate any changes
  • I've run make test, all tests passed locally

@PPsyrius
Copy link
Collaborator Author

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

@KJhellico
Copy link
Collaborator

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

Copy link

sonarcloud bot commented Sep 20, 2024

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff, thanks @PPsyrius !

@arkid15r arkid15r changed the title Removes deprecated fix-encoding-pragma, migrates to pyupgrade Remove deprecated fix-encoding-pragma, add pyupgrade Sep 20, 2024
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arkid15r arkid15r added this pull request to the merge queue Sep 20, 2024
Merged via the queue into vacanza:dev with commit ac7bd8d Sep 20, 2024
32 checks passed
@PPsyrius PPsyrius deleted the fix-encoding-pragma-to-pyupgrade branch September 21, 2024 05:18
@arkid15r arkid15r mentioned this pull request Oct 7, 2024
mstuttgart pushed a commit to multidadosti-erp/python-holidays that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants