[BE] typing for decorators - fx/_compatibility (part 1) (#134202)

Part of #134054.

This corresponds to the pytorch mypy changes from D61493706. Updating takes so
long and touches so many files that it's impossible to land as a whole without conflicting with some other intermediate change.
So landing these 'type: ignore' for pytorch in advance of them actually being needed.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/134202
Approved by: https://github.com/Skylion007
This commit is contained in:
Aaron Orenstein
2024-08-22 09:42:18 -07:00
committed by PyTorch MergeBot
parent 44fa9f991c
commit d95aedf5fd
52 changed files with 206 additions and 207 deletions

View File

@ -86,7 +86,7 @@ class TensorChunkSpec:
"""
args_chunk_spec = map_aggregate(
chunk_dims,
lambda dim: TensorChunkSpec(dim),
lambda dim: TensorChunkSpec(dim), # type: ignore[arg-type,return-value]
)
return args_chunk_spec
@ -104,7 +104,7 @@ class TensorChunkSpec:
"""
kwargs_chunk_spec = map_aggregate(
chunk_dims,
lambda dim: TensorChunkSpec(dim),
lambda dim: TensorChunkSpec(dim), # type: ignore[arg-type,return-value]
)
return kwargs_chunk_spec