black fixes and Travis CI fixes (#2160)

* black format

* updating DIRECTORY.md

* fixes

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
vinayak
2020-07-02 20:02:15 +05:30
committed by GitHub
parent c534e77cb1
commit 2d3d660155
7 changed files with 11 additions and 43 deletions

View File

@@ -80,10 +80,7 @@ the third document in the corpus.")
) # strip all punctuation and replace it with ''
docs = corpus_without_punctuation.split("\n")
term = term.lower()
return (
len([doc for doc in docs if term in doc]),
len(docs),
)
return (len([doc for doc in docs if term in doc]), len(docs))
def inverse_document_frequency(df: int, N: int) -> float: