[Minor] Improve style (#1666)

This commit is contained in:
Lianmin Zheng
2024-10-14 05:25:00 -07:00
committed by GitHub
parent 6790240cc3
commit 24f3e1511c
3 changed files with 29 additions and 26 deletions

View File

@@ -45,7 +45,7 @@ class SchedulePolicy:
def calc_priority(self, waiting_queue: List[Req]):
# Compute matched prefix length
prefix_computed = False
if self.policy in ["lpm", "dfs-weight"]:
if self.policy == "lpm" or self.policy == "dfs-weight":
for r in waiting_queue:
# NOTE: the prefix_indices must always be aligned with last_node
r.prefix_indices, r.last_node = self.tree_cache.match_prefix(