mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE]: Enable a PLC0131, PLC0132, PLC0205. Fix PLC0132 bug. (#115015)
Enable pylint rules `PLC0131` and `PLC0132`. There was a violation of the `PLC0132` so this commit also fixes it and enables the rules so the violation do not occur again. `PLC0205` checks accidentally setting your `__slots__` to a string which is almost always a bug. Pull Request resolved: https://github.com/pytorch/pytorch/pull/115015 Approved by: https://github.com/jansel, https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
13410d0eda
commit
d7b303dcf8
@ -85,6 +85,9 @@ select = [
|
|||||||
"PIE804",
|
"PIE804",
|
||||||
"PIE807",
|
"PIE807",
|
||||||
"PIE810",
|
"PIE810",
|
||||||
|
"PLC0131", # type bivariance
|
||||||
|
"PLC0132", # type param mismatch
|
||||||
|
"PLC0205", # string as __slots__
|
||||||
"PLE",
|
"PLE",
|
||||||
"PLR0133", # constant comparison
|
"PLR0133", # constant comparison
|
||||||
"PLR0206", # property with params
|
"PLR0206", # property with params
|
||||||
|
@ -17,7 +17,7 @@ ArrayLikeOrScalar = typing.Union[ArrayLike, Scalar]
|
|||||||
|
|
||||||
DTypeLike = typing.TypeVar("DTypeLike")
|
DTypeLike = typing.TypeVar("DTypeLike")
|
||||||
AxisLike = typing.TypeVar("AxisLike")
|
AxisLike = typing.TypeVar("AxisLike")
|
||||||
NDArray = typing.TypeVar("NDarray")
|
NDArray = typing.TypeVar("NDArray")
|
||||||
CastingModes = typing.TypeVar("CastingModes")
|
CastingModes = typing.TypeVar("CastingModes")
|
||||||
KeepDims = typing.TypeVar("KeepDims")
|
KeepDims = typing.TypeVar("KeepDims")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user