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

Fix pydecimal handling of positive keyword #2080

Merged
merged 4 commits into from
Aug 23, 2024
Merged

Conversation

tahzeer
Copy link
Contributor

@tahzeer tahzeer commented Aug 1, 2024

What does this change

  • pydecimal now handles positive keyword as expected
  • random.Random now takes in expected type int for parameter

What was wrong

How this fixes it

  • Now it is checked weather positive is None by default (in which case sign assigning is random) or it has been explicitly passed a s True/Flase (handled in else block)
  • Explicit typecasting from Hashable to int

Fixes #2051

@tahzeer tahzeer changed the title Fix pydecimal handeling of positive param Fix pydecimal handling of positive param Aug 2, 2024
@tahzeer tahzeer changed the title Fix pydecimal handling of positive param Fix pydecimal handling of positive keyword Aug 2, 2024
faker/providers/python/__init__.py Outdated Show resolved Hide resolved
Co-authored-by: Flavio Curella <89607+fcurella@users.noreply.github.com>
@tahzeer tahzeer requested a review from fcurella August 13, 2024 05:18
@fcurella fcurella merged commit 88ec368 into joke2k:master Aug 23, 2024
28 checks passed
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.

pydecimal does not properly handle positive keyword
2 participants