Skip to content

Commit

Permalink
autopep8 run to fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bvreede committed Nov 1, 2023
1 parent aafde08 commit 2342a12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 4 additions & 2 deletions sktalk/corpus/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def __init__(
self._conversations = conversations or []
for conversation in self._conversations:
if not isinstance(conversation, Conversation):
raise TypeError("All conversations should be of type Conversation")
raise TypeError(
"All conversations should be of type Conversation")
self._metadata = metadata

def __add__(self, other: "Corpus") -> "Corpus":
Expand All @@ -26,7 +27,8 @@ def append(self, conversation: Conversation):
if isinstance(conversation, Conversation):
self._conversations.append(conversation)
else:
raise TypeError("Conversations added should be of type Conversation")
raise TypeError(
"Conversations added should be of type Conversation")

def return_json(self):
self.return_dataframe()
Expand Down
3 changes: 1 addition & 2 deletions sktalk/corpus/parsing/cha.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class ChaFile(InputFile):
def _pla_reader(self) -> pylangacq.Reader:
return pylangacq.read_chat(self._path)

def parse(self):
"""Parse conversation file in Chat format
Expand Down Expand Up @@ -36,7 +36,6 @@ def _to_utterance(chat_utterance) -> Utterance:
def _extract_metadata(self):
return self._pla_reader().headers()[0]


@staticmethod
def _split_time(time):
if time is None:
Expand Down
4 changes: 2 additions & 2 deletions sktalk/corpus/parsing/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def metadata(self):
if metadata.keys().isdisjoint(self._metadata):
return self._metadata | metadata
raise ValueError("Duplicate key in the metadata")

def _extract_metadata(self):
return {}

@staticmethod
def _to_timestamp(time_ms):
try:
Expand Down

0 comments on commit 2342a12

Please sign in to comment.