Skip to content

Commit ae1cf6b

Browse files
committed
Fixed deprecated decorators
1 parent 739cbbd commit ae1cf6b

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

textext/requirements_check.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Classes for handling and checking of the dependencies required
1212
to successfully run TexText.
1313
"""
14-
import abc
14+
from abc import ABCMeta, abstractmethod
1515
import logging
1616
import os
1717
import re
@@ -24,19 +24,23 @@
2424

2525

2626
class Defaults(object):
27-
__metaclass__ = abc.ABCMeta
27+
__metaclass__ = ABCMeta
2828

2929
# ToDo: Change to @property @abstractmethod when discarding Python 2.7 support
30-
@abc.abstractproperty
30+
@property
31+
@abstractmethod
3132
def os_name(self): pass
3233

33-
@abc.abstractproperty
34+
@property
35+
@abstractmethod
3436
def console_colors(self): pass
3537

36-
@abc.abstractproperty
38+
@property
39+
@abstractmethod
3740
def executable_names(self): pass
3841

39-
@abc.abstractproperty
42+
@property
43+
@abstractmethod
4044
def inkscape_user_extensions_path(self): pass
4145

4246
def inkscape_system_extensions_path(self, inkscape_exe_path):
@@ -53,17 +57,20 @@ def inkscape_system_extensions_path(self, inkscape_exe_path):
5357

5458
return [path, err]
5559

56-
@abc.abstractproperty
60+
@property
61+
@abstractmethod
5762
def textext_config_path(self): pass
5863

59-
@abc.abstractproperty
64+
@property
65+
@abstractmethod
6066
def textext_logfile_path(self): pass
6167

62-
@abc.abstractmethod
68+
@property
69+
@abstractmethod
6370
def get_system_path(self): pass
6471

6572
@staticmethod
66-
@abc.abstractmethod
73+
@abstractmethod
6774
def call_command(command, return_code=0): pass
6875

6976

0 commit comments

Comments
 (0)