Skip to content

Commit

Permalink
refactor: rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
my-master committed Jan 19, 2018
1 parent df8ff1b commit e77723c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deeppavlov/core/models/serializable.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class Serializable(metaclass=ABCMeta):
def __init__(self, ser_path=None, ser_dir=None, ser_file=None, *args, **kwargs):
self._ser_dir = ser_dir
self._ser_file = ser_file
self.ser_path = self.get_model_path(ser_path)
self.ser_path = self.get_ser_path(ser_path)

def __new__(cls, *args, **kwargs):
if cls is Serializable:
raise TypeError(
"TypeError: Can't instantiate abstract class {} directly".format(cls.__name__))
return object.__new__(cls)

def get_model_path(self, ser_path):
def get_ser_path(self, ser_path):
if not ser_path:
p = paths.USR_PATH
if self._ser_dir:
Expand Down

0 comments on commit e77723c

Please sign in to comment.