Skip to content

Commit

Permalink
Remove pylint disable assigning-non-slot
Browse files Browse the repository at this point in the history
The upstream issue was fixed:
pylint-dev/astroid#999

our pylint will be pinned to version 2.9.6 for some time

Change-Id: Ie70ff7b13ceef6ba8990e6b7a29cbdb2568f5d06
  • Loading branch information
Konstantin Baikov committed Sep 2, 2021
1 parent 5067da5 commit 599db51
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmk/utils/type_defs/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ class OK(Result[T_co, E_co]):
def __init__(self, ok: T_co):
if isinstance(ok, Error):
raise TypeError(ok)
# TODO: Remove the suppression when https://github.com/PyCQA/astroid/issues/999 is fixed.
self._ok: Final[T_co] = ok # pylint: disable=assigning-non-slot
self._ok: Final[T_co] = ok

def __repr__(self):
return "%s(%r)" % (type(self).__name__, self.ok)
Expand Down Expand Up @@ -218,8 +217,7 @@ class Error(Result[T_co, E_co]):
def __init__(self, error: E_co):
if isinstance(error, OK):
raise TypeError(error)
# TODO: Remove the suppression when https://github.com/PyCQA/astroid/issues/999 is fixed.
self._error: Final[E_co] = error # pylint: disable=assigning-non-slot
self._error: Final[E_co] = error

def __repr__(self):
return "%s(%r)" % (type(self).__name__, self.error)
Expand Down

0 comments on commit 599db51

Please sign in to comment.