Skip to content

Commit

Permalink
Update ruff to 0.4.5 (#126979)
Browse files Browse the repository at this point in the history
Summary:
Update ruff to 0.4.5 and addresses some false negatives that have been found in the newer version.

X-link: pytorch/pytorch#126979
Approved by: https://github.com/ezyang

Reviewed By: PaliC

Differential Revision: D57838330

fbshipit-source-id: 4a82b39d210aae80cd836738d5ca126fd4c15fe5
  • Loading branch information
Skylion007 authored and facebook-github-bot committed May 28, 2024
1 parent 7164650 commit f0801d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2162,8 +2162,8 @@ def __call__(self, *args, **kwargs):
def defake(x):
if not isinstance(x, FakeTensor):
return x
size: "torch._prims_common.ShapeType"
stride: "torch._prims_common.StrideType"
size: torch._prims_common.ShapeType
stride: torch._prims_common.StrideType
if x._has_symbolic_sizes_strides:
size = []
for s in x.size():
Expand Down Expand Up @@ -2204,7 +2204,7 @@ def build_checkpoint_variable(**options):

# TODO - This is a temporary situation where we have two versions of
# checkpointing implementation. We will converge on one and remove the other.
activation_checkpoint_op: "torch._ops.HigherOrderOperator" = (
activation_checkpoint_op: torch._ops.HigherOrderOperator = (
higher_order_ops.tag_activation_checkpoint
)
if torch._functorch.config.functionalize_rng_ops:
Expand Down

0 comments on commit f0801d6

Please sign in to comment.