Skip to content

Commit

Permalink
Use @AbstractMethod instead of @abstractproperty
Browse files Browse the repository at this point in the history
* The latter it's actually deprecated in favor of using @AbstractMethod
  in conjunction with @Property and @example.setter.

Change-Id: I01bf3c91c162ae666a382a160010025ce7aa8778
  • Loading branch information
volans- committed Sep 26, 2020
1 parent abde451 commit 98973a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cumin/transports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import shlex
import sys

from abc import ABCMeta, abstractmethod, abstractproperty
from abc import ABCMeta, abstractmethod

from ClusterShell.NodeSet import NodeSet
from tqdm import tqdm
Expand Down Expand Up @@ -610,8 +610,8 @@ def commands(self, value):

self._commands = commands

@abstractproperty
@property
@abstractmethod
def handler(self):
"""Get and set the `handler` for the current execution.
Expand All @@ -626,8 +626,8 @@ def handler(self):
* an event handler class object (not instance)
"""

@abstractproperty
@handler.setter
@abstractmethod
def handler(self, value): # pylint: disable=property-with-parameters; https://github.com/PyCQA/pylint/issues/3600
"""Setter for the `handler` property. The relative documentation is in the getter."""

Expand Down

0 comments on commit 98973a2

Please sign in to comment.