Open XachaB opened 4 years ago
Currently, self.bipa is not always initialized in the DistFeat class. The lines below only initialize self.bipa when the path was not given by the user:
self.bipa
https://github.com/tresoldi/distfeat/blob/ba8157de412100f60ef430b6b939c32ce8c53e69/distfeat/distfeat.py#L117-L123
Something such as the following is missing:
else: self._bipa = pyclts.CLTS(clts).bipa
This currently causes a bug when checking:
https://github.com/tresoldi/distfeat/blob/ba8157de412100f60ef430b6b939c32ce8c53e69/distfeat/distfeat.py#L206
Moreover, since self._bipa is never False, but instead None, the check should be if self._bipa is not None:.
self._bipa
False
None
if self._bipa is not None:
Currently,
self.bipa
is not always initialized in the DistFeat class. The lines below only initialize self.bipa when the path was not given by the user:https://github.com/tresoldi/distfeat/blob/ba8157de412100f60ef430b6b939c32ce8c53e69/distfeat/distfeat.py#L117-L123
Something such as the following is missing:
This currently causes a bug when checking:
https://github.com/tresoldi/distfeat/blob/ba8157de412100f60ef430b6b939c32ce8c53e69/distfeat/distfeat.py#L206
Moreover, since
self._bipa
is neverFalse
, but insteadNone
, the check should beif self._bipa is not None:
.