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

Numbers and core type fixes #966

Merged
merged 2 commits into from
Feb 7, 2023

Conversation

DenverCoder1
Copy link
Contributor

Type annotation improvements:

  1. Changed Locale.parse to always return a Locale (this fixes type issues in multiple places where the return type is assumed to not be None)
  2. Fixed Pyright type errors and added type: ignore in certain places in core.py and numbers.py

Note: Changing Locale.parse to always return a Locale simplifies the logic, but it also can potentially be a breaking change if people are relying on passing None not raising an exception. It is a bit of a stretch though, since passing None has no functional effect in the use of the lib.

These changes have been separated from #961

@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Merging #966 (053c242) into master (25e4360) will decrease coverage by 0.02%.
The diff coverage is 91.30%.

@@            Coverage Diff             @@
##           master     #966      +/-   ##
==========================================
- Coverage   90.89%   90.88%   -0.02%     
==========================================
  Files          25       25              
  Lines        4340     4334       -6     
==========================================
- Hits         3945     3939       -6     
  Misses        395      395              
Impacted Files Coverage Δ
babel/core.py 96.52% <90.00%> (+0.20%) ⬆️
babel/numbers.py 97.79% <92.30%> (-0.24%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@akx akx self-requested a review February 7, 2023 13:50
Copy link
Member

@akx akx left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants