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: onboard to use ruff #1029

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

fix: onboard to use ruff #1029

wants to merge 24 commits into from

Conversation

math411
Copy link
Contributor

@math411 math411 commented Sep 3, 2024

Issue #, if available:

Description of changes:
An example of how to onboard to ruff with most rules enabled.

For use when upgrading to Python 3.10

Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@math411 math411 requested a review from a team as a code owner September 3, 2024 17:28
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5534034) to head (8dec2ce).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1029   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          135       135           
  Lines         9033      8999   -34     
  Branches      2029      2020    -9     
=========================================
- Hits          9033      8999   -34     

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

Copy link
Member

@speller26 speller26 left a comment

Choose a reason for hiding this comment

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

Since this changes the code itself, it should be at least fix, rather than infra

Comment on lines -105 to -111
device_parameters: dict[str, Any] | None = None,
device_parameters: Optional[dict[str, Any]] = None, # noqa: UP007
disable_qubit_rewiring: bool = False,
tags: dict[str, str] | None = None,
inputs: dict[str, float] | None = None,
gate_definitions: dict[tuple[Gate, QubitSet], PulseSequence] | None = None,
tags: Optional[dict[str, str]] = None, # noqa: UP007
inputs: Optional[dict[str, float]] = None, # noqa: UP007
gate_definitions: Optional[dict[tuple[Gate, QubitSet], PulseSequence]] = None, # noqa: UP007
quiet: bool = False,
reservation_arn: str | None = None,
Copy link
Member

Choose a reason for hiding this comment

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

This used to work, why not anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It still does, I am changing this back in the 3.10 pr

src/braket/aws/aws_quantum_task.py Outdated Show resolved Hide resolved
aws_session: AwsSession,
create_task_kwargs: dict[str, Any],
device_arn: str,
device_parameters: Union[dict, BraketSchemaBase],
device_parameters: Union[dict[str, str], BraketSchemaBase], # noqa: UP007
Copy link
Member

Choose a reason for hiding this comment

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

Should this be updated to 3.10 syntax?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This gets updated in the 3.10 PR

@math411 math411 changed the title infra: onboard to use ruff fix: onboard to use ruff Sep 10, 2024
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