Skip to content

Commit

Permalink
Type annotation tweak for 3.5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
aCampello committed Nov 1, 2020
1 parent ef3b3c6 commit 856f291
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scrubadub/scrubbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,11 @@ def clean_documents(self, documents: Union[Sequence[str], Dict[str, str]], **kwa

filth_list = self._post_process_filth_list(filth_list)

clean_documents: Union[Dict[str, str], Sequence[str]]
if isinstance(documents, list):
clean_documents = [
self._replace_text(text=text, filth_list=filth_list, document_name=str(name), **kwargs)
for name, text in enumerate(documents)
]
] # type: Union[Dict[str, str], Sequence[str]]
elif isinstance(documents, dict):
clean_documents = {
name: self._replace_text(text=text, filth_list=filth_list, document_name=name, **kwargs)
Expand Down

0 comments on commit 856f291

Please sign in to comment.