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

chore: upgrade to Ruff v0.9 #1026

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

chore: upgrade to Ruff v0.9 #1026

wants to merge 1 commit into from

Conversation

vdusek
Copy link
Collaborator

@vdusek vdusek commented Feb 25, 2025

Description

  • Fix the incorrect usage of Decimal in tests.
  • Rename internal modules because of stdlib-module-shadowing.
  • Turn-off stdlib-module-shadowing for public modules.
  • Codebase auto-format with a new version.

@vdusek vdusek requested a review from Pijukatel February 25, 2025 15:40
@github-actions github-actions bot added this to the 109th sprint - Tooling team milestone Feb 25, 2025
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Feb 25, 2025
@vdusek vdusek added the adhoc Ad-hoc unplanned task added during the sprint. label Feb 25, 2025
@@ -514,12 +514,12 @@ def _calculate_order_no(self, request: Request, forefront: bool | None) -> Decim
return None

# Get the current timestamp in milliseconds
timestamp = Decimal(datetime.now(timezone.utc).timestamp()) * 1000
timestamp = Decimal(str(datetime.now(tz=timezone.utc).timestamp())) * Decimal('1000')
Copy link
Contributor

Choose a reason for hiding this comment

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

Super tiny detail. Decimal('1000') == Decimal(1000). Not needed to use strings instead of ints. (For floats we need strings)

In docs they do not use it for int either https://docs.python.org/3/library/decimal.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants