mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Pyrefly suppressions 7/n (#164913)
Adds suppressions to pyrefly will typecheck clean: https://github.com/pytorch/pytorch/issues/163283 Almost there! Test plan: dmypy restart && python3 scripts/lintrunner.py -a pyrefly check step 1: delete lines in the pyrefly.toml file from the project-excludes field step 2: run pyrefly check step 3: add suppressions, clean up unused suppressions before: https://gist.github.com/maggiemoss/4b3bf2037014e116bc00706a16aef199 after: INFO 0 errors (6,884 ignored) Pull Request resolved: https://github.com/pytorch/pytorch/pull/164913 Approved by: https://github.com/oulgen
This commit is contained in:
committed by
PyTorch MergeBot
parent
12d2ef557f
commit
c855f8632e
@ -41,10 +41,7 @@ if not python_pytree._cxx_pytree_dynamo_traceable:
|
||||
)
|
||||
|
||||
|
||||
# pyrefly: ignore # import-error
|
||||
import optree
|
||||
|
||||
# pyrefly: ignore # import-error
|
||||
from optree import PyTreeSpec as TreeSpec # direct import for type annotations
|
||||
|
||||
|
||||
|
@ -679,7 +679,7 @@ class FlopCounterMode:
|
||||
|
||||
|
||||
import tabulate
|
||||
# pyrefly: ignore # bad-assignment
|
||||
|
||||
tabulate.PRESERVE_WHITESPACE = True
|
||||
header = ["Module", "FLOP", "% Total"]
|
||||
values = []
|
||||
|
@ -9,7 +9,7 @@ from typing import Any, Optional
|
||||
import torch
|
||||
import numpy as np
|
||||
|
||||
# pyrefly: ignore # import-error
|
||||
|
||||
from google.protobuf import struct_pb2
|
||||
|
||||
from tensorboard.compat.proto.summary_pb2 import (
|
||||
|
@ -956,7 +956,7 @@ class SummaryWriter:
|
||||
)
|
||||
self._projector_config.embeddings.extend([embedding_info])
|
||||
|
||||
# pyrefly: ignore # import-error
|
||||
|
||||
from google.protobuf import text_format
|
||||
|
||||
config_pbtxt = text_format.MessageToString(self._projector_config)
|
||||
|
Reference in New Issue
Block a user