-
Notifications
You must be signed in to change notification settings - Fork 21
✨ Introduce Hatchling
and dependency-groups
#530
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
Conversation
target_directory: str = "./", | ||
target_filename: str = "", | ||
qasm_format: str = "qasm3", | ||
) -> bool: ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we need to replace the ellipsis (...
) with the correct return type annotation for the function overload. The function get_indep_level
has two overloads, one returning a QuantumCircuit
and the other returning a bool
. The ellipsis should be replaced with the appropriate return type annotation for the second overload.
-
Copy modified line R323
@@ -322,3 +322,3 @@ | ||
qasm_format: str = "qasm3", | ||
) -> bool: ... | ||
) -> bool: pass | ||
|
target_directory: str = "./", | ||
target_filename: str = "", | ||
qasm_format: str = "qasm3", | ||
) -> QuantumCircuit: ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we need to remove the ellipsis (...
) from the function overload definition. The ellipsis is not serving any purpose and is causing a "statement has no effect" error. Removing it will clean up the code and eliminate the error without changing the existing functionality.
-
Copy modified line R378
@@ -377,3 +377,3 @@ | ||
qasm_format: str = "qasm3", | ||
) -> QuantumCircuit: ... | ||
) -> QuantumCircuit: | ||
|
target_directory: str = "./", | ||
target_filename: str = "", | ||
qasm_format: str = "qasm3", | ||
) -> bool: ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we need to remove the ellipsis (...
) from line 392. This will eliminate the statement that has no effect and clean up the code. The ellipsis is not serving any purpose in this context, so its removal will not affect the existing functionality of the code.
-
Copy modified line R378 -
Copy modified line R392
@@ -377,3 +377,3 @@ | ||
qasm_format: str = "qasm3", | ||
) -> QuantumCircuit: ... | ||
) -> QuantumCircuit: | ||
|
||
@@ -391,3 +391,3 @@ | ||
qasm_format: str = "qasm3", | ||
) -> bool: ... | ||
) -> bool: | ||
|
target_directory: str = "./", | ||
target_filename: str = "", | ||
qasm_format: str = "qasm3", | ||
) -> QuantumCircuit: ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we need to replace the ...
statement with a proper implementation or remove it if it is not needed. Since the ...
is used in the context of type hinting for function overloads, it should be replaced with the pass
statement, which is a no-op in Python and is more appropriate in this context.
- Replace the
...
statement withpass
in the function overloads. - Ensure that the function overloads are correctly defined and do not contain any placeholder code.
-
Copy modified line R461 -
Copy modified line R475
@@ -460,3 +460,3 @@ | ||
qasm_format: str = "qasm3", | ||
) -> QuantumCircuit: ... | ||
) -> QuantumCircuit: pass | ||
|
||
@@ -474,3 +474,3 @@ | ||
qasm_format: str = "qasm3", | ||
) -> bool: ... | ||
) -> bool: pass | ||
|
target_directory: str = "./", | ||
target_filename: str = "", | ||
qasm_format: str = "qasm3", | ||
) -> bool: ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we need to replace the ellipsis with a proper implementation or remove it if it serves no purpose. In this case, the ellipsis is used in the function signature of an overloaded function, which should have a proper return statement or implementation. Since the function is an overload, it should not have a body and should be replaced with the pass
statement to indicate that it is intentionally left without a body.
-
Copy modified line R475
@@ -474,3 +474,3 @@ | ||
qasm_format: str = "qasm3", | ||
) -> bool: ... | ||
) -> bool: pass | ||
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #530 +/- ##
=====================================
Coverage 91.8% 91.8%
=====================================
Files 34 34
Lines 1554 1554
=====================================
Hits 1428 1428
Misses 126 126
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: burgholzer <[email protected]>
Signed-off-by: burgholzer <[email protected]>
Signed-off-by: burgholzer <[email protected]>
Signed-off-by: burgholzer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. I just added a couple of finishing touches. Once CI is green, this should be good to go 🚀
…it#530) resolved munich-quantum-toolkit#524 and resolves munich-quantum-toolkit#525 --------- Signed-off-by: burgholzer <[email protected]> Co-authored-by: burgholzer <[email protected]>
resolved #524 and resolves #525