Skip to content

Commit

Permalink
feedback 1
Browse files Browse the repository at this point in the history
  • Loading branch information
nealerickson-qtm committed Sep 27, 2023
1 parent a7c1c68 commit f759167
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
20 changes: 1 addition & 19 deletions pytket/phir/sharding/shard.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#
##############################################################################

from __future__ import annotations

from dataclasses import dataclass

from pytket.circuit import Command
Expand All @@ -33,20 +31,4 @@ class Shard:

# A set of the other shards this particular shard depends upon, and thus
# must be scheduled after
depends_upon: set[Shard]

# def __init__(self,
# primary_command: Command,
# sub_commands: dict[UnitID, list[Command]],
# depends_upon: set[Shard]) -> None:

# # The schedulable command of the shard
# self.primary_command = primary_command

# # The other commands related to the primary schedulable command, stored
# # as a map of bit handle (unitID) -> list[Command]
# self.sub_commands = sub_commands

# # A set of the other shards this particular shard depends upon, and thus
# # must be scheduled after
# self.depends_upon = depends_upon
depends_upon: set["Shard"]
5 changes: 4 additions & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ ignore = [

[per-file-ignores]
"__init__.py" = ["F401"] # module imported but unused
"tests/*" = ["S101"] # Use of `assert` detected
"tests/*" = [
"S101", # Use of `assert` detected
"PLR2004" # Magic constants
]

[pydocstyle]
convention = "google"
2 changes: 1 addition & 1 deletion tests/test_sharder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ def test_ctor(self) -> None:

output = sharder.shard()

assert len(output) == 3 # noqa: PLR2004
assert len(output) == 3

0 comments on commit f759167

Please sign in to comment.