Skip to content

Commit 7eeb7bd

Browse files
generatedunixname1526759334626947facebook-github-bot
authored andcommitted
Remove redundant casts] fbsource/fbcode/pearl/utils/functional_utils/learning
Reviewed By: yangdanny97 Differential Revision: D77358125 fbshipit-source-id: 0814fb505c0d8ac5b63e35d85d2d32137703fad3
1 parent 3fac5aa commit 7eeb7bd

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

pearl/utils/functional_utils/learning/critic_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
# pyre-strict
99

1010
from collections.abc import Iterable
11-
from typing import cast
1211

1312
import torch
1413
import torch.nn as nn
@@ -75,8 +74,7 @@ class `TwinCritic` will be instantiated with the specified `network_type`. Note
7574

7675
# cast network_type to get around static Pyre type checking; the runtime check with
7776
# `issubclass` ensures the network type is a sublcass of QValueNetwork
78-
# pyre-fixme[22]: The cast is redundant.
79-
network_type = cast(type[QValueNetwork], network_type)
77+
network_type = network_type
8078

8179
return TwinCritic(
8280
state_dim=state_dim,

0 commit comments

Comments
 (0)