[lint] Enable Ruff UP037 to drop redundant quoted annotations (#27984)

This commit is contained in:
Cheng Wan
2026-06-11 17:38:05 -07:00
committed by GitHub
parent c0480a88be
commit 97a0031799
185 changed files with 541 additions and 551 deletions
@@ -305,7 +305,7 @@ class _SinglePassGatherer(ABC):
server_args: ServerArgs,
expert_location_metadata: ExpertLocationMetadata,
rank: int,
) -> "_SinglePassGatherer":
) -> _SinglePassGatherer:
if server_args.expert_distribution_recorder_mode == "per_token":
return _DetailSinglePassGatherer(
server_args, expert_location_metadata, rank
@@ -627,13 +627,13 @@ class _Accumulator(ABC):
server_args: ServerArgs,
expert_location_metadata: ExpertLocationMetadata,
rank: int,
) -> "_Accumulator":
) -> _Accumulator:
return _Accumulator.get_class(server_args)(
server_args, expert_location_metadata, rank
)
@staticmethod
def get_class(server_args: ServerArgs) -> Type["_Accumulator"]:
def get_class(server_args: ServerArgs) -> Type[_Accumulator]:
return {
"stat": _StatAccumulator,
"stat_approx": _StatAccumulator,
+1 -1
View File
@@ -253,7 +253,7 @@ class ExpertLocationMetadata:
def update(
self,
other: "ExpertLocationMetadata",
other: ExpertLocationMetadata,
update_layer_ids: List[int],
):
for field in [