Remove self type hints (#15732)

* Remove self type hints

* Lint
This commit is contained in:
Jason Hu authored and Paulus Schoutsen committed 2018-07-30 12:44:31 +01:00
1 parent 744c277123
commit 1e5596b594
10 files changed
+51 -58

No files matched your search

+4 -4
View File
@@ -126,25 +126,25 @@ class OrderedEnum(enum.Enum):
# https://github.com/PyCQA/pylint/issues/2306
# pylint: disable=comparison-with-callable
def __ge__(self: ENUM_T, other: ENUM_T) -> bool:
def __ge__(self, other: ENUM_T) -> bool:
"""Return the greater than element."""
if self.__class__ is other.__class__:
return bool(self.value >= other.value)
return NotImplemented
def __gt__(self: ENUM_T, other: ENUM_T) -> bool:
def __gt__(self, other: ENUM_T) -> bool:
"""Return the greater element."""
if self.__class__ is other.__class__:
return bool(self.value > other.value)
return NotImplemented
def __le__(self: ENUM_T, other: ENUM_T) -> bool:
def __le__(self, other: ENUM_T) -> bool:
"""Return the lower than element."""
if self.__class__ is other.__class__:
return bool(self.value <= other.value)
return NotImplemented
def __lt__(self: ENUM_T, other: ENUM_T) -> bool:
def __lt__(self, other: ENUM_T) -> bool:
"""Return the lower element."""
if self.__class__ is other.__class__:
return bool(self.value < other.value)
+1 -1
View File
@@ -65,7 +65,7 @@ def is_valid_unit(unit: str, unit_type: str) -> bool:
class UnitSystem:
"""A container for units of measure."""
def __init__(self: object, name: str, temperature: str, length: str,
def __init__(self, name: str, temperature: str, length: str,
volume: str, mass: str) -> None:
"""Initialize the unit system object."""
errors = \