Skip to content

chore: run pyupgrade on codebase #483

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

aaronsteers
Copy link
Contributor

This PR targets the following PR:


chore: run pyupgrade on codebase

What

Added UP rules to Ruff configuration to enforce modern Python syntax, and ran pyupgrade to upgrade Python syntax to be compatible with Python 3.10+.

Why

Keep the codebase using modern Python syntax and features. Adding the rules to Ruff will prevent old patterns from re-emerging.

How

  • Added UP rules to Ruff configuration to enforce modern Python syntax
  • Used Ruff's auto-fix to address issues first
  • Ran pyupgrade manually to catch any remaining issues
  • Fixed an issue with InterpolatedString equality comparison that was affected by the syntax modernization

Link to Devin run: https://app.devin.ai/sessions/b7644d2fc961450f81aeef7c10e062a5
Author: Aaron ("AJ") Steers ([email protected])

@Copilot Copilot AI review requested due to automatic review settings April 14, 2025 20:59
Copy link
Contributor

Original prompt from Aaron:

@Devin - Create a CDK PR an run pyupgrade on it. Use me as the PR author. You'll need my PAT to create the PR.

Copy link
Contributor

devin-ai-integration bot commented Apr 14, 2025

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 346 out of 346 changed files in this pull request and generated no comments.

@github-actions github-actions bot added the chore label Apr 14, 2025
@aaronsteers
Copy link
Contributor Author

aaronsteers commented Apr 14, 2025

/autofix

Auto-Fix Job Info

This job attempts to auto-fix any linting or formating issues. If any fixes are made,
those changes will be automatically committed and pushed back to the PR.

Note: This job can only be run by maintainers. On PRs from forks, this command requires
that the PR author has enabled the Allow edits from maintainers option.

PR auto-fix job started... Check job output.

✅ Changes applied successfully.

@aaronsteers
Copy link
Contributor Author

aaronsteers commented Apr 15, 2025

/autofix

Auto-Fix Job Info

This job attempts to auto-fix any linting or formating issues. If any fixes are made,
those changes will be automatically committed and pushed back to the PR.

Note: This job can only be run by maintainers. On PRs from forks, this command requires
that the PR author has enabled the Allow edits from maintainers option.

PR auto-fix job started... Check job output.

✅ Changes applied successfully.

@aaronsteers
Copy link
Contributor Author

/format-fix

@aaronsteers
Copy link
Contributor Author

aaronsteers commented Apr 15, 2025

/autofix

Auto-Fix Job Info

This job attempts to auto-fix any linting or formating issues. If any fixes are made,
those changes will be automatically committed and pushed back to the PR.

Note: This job can only be run by maintainers. On PRs from forks, this command requires
that the PR author has enabled the Allow edits from maintainers option.

PR auto-fix job started... Check job output.

🟦 Job completed successfully (no changes).

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

Successfully merging this pull request may close these issues.

1 participant