Skip to content

Commit

Permalink
🚨 accommodate new ruff warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
burgholzer committed Nov 9, 2023
1 parent 8f2dd6e commit 0d69384
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
class CDAStyle(UnsrtStyle):
"""Custom style for including PDF links."""

def format_url(self, _e: Entry) -> HRef:
def format_url(self, _e: Entry) -> HRef: # noqa: PLR6301
"""Format URL field as a link to the PDF."""
url = field("url", raw=True)
return href()[url, "[PDF]"]
Expand Down
2 changes: 1 addition & 1 deletion src/mqt/qmap/qiskit/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def import_target(target: Target) -> Architecture.Properties:
props.set_frequency(i, qubit_props.frequency)

for instruction, qargs in target.instructions:
if instruction.name in ("reset", "delay"):
if instruction.name in {"reset", "delay"}:
continue

instruction_props = target[instruction.name][qargs]
Expand Down
5 changes: 3 additions & 2 deletions src/mqt/qmap/subarchitectures.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def from_library(cls, lib_name: str | Path) -> SubarchitectureOrder:
"""
path = Path(lib_name).with_suffix(".pickle")
with path.open("rb") as f:
temp = pickle.load(f)
temp = pickle.load(f) # noqa: S301

so = SubarchitectureOrder()
so.__dict__.update(temp.__dict__)
Expand Down Expand Up @@ -329,7 +329,8 @@ def __transitive_closure(self, po: PartialOrder) -> PartialOrder:

return po_trans

def __reflexive_closure(self, po: PartialOrder) -> PartialOrder:
@classmethod
def __reflexive_closure(cls, po: PartialOrder) -> PartialOrder:
"""Compute reflexive closure of partial order."""
po_ref = PartialOrder({})
for k, v in po.items():
Expand Down

0 comments on commit 0d69384

Please sign in to comment.