-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code formatting issues - automate? #99
Comments
This was referenced Apr 13, 2018
See closed PR #110 Essentially the findings are that we can't use black (yet). The problem is we would have to change our inline type annotations for mypy. E.g. the function: def double_hash_encode_ngrams_non_singular(ngrams, # type: Iterable[str]
keys, # type: Sequence[bytes]
k, # type: int
l, # type: int
encoding # type: str
):
# type: (...) -> bitarray.bitarray
"""
computes the double hash encoding of the provided n-grams with the given keys. Formatted by black running with all defaults into: def double_hash_encode_ngrams_non_singular(
ngrams,
keys,
k,
l,
encoding, # type: Iterable[str] # type: Sequence[bytes] # type: int # type: int # type: str
):
# type: (...) -> bitarray.bitarray
"""
computes the double hash encoding of the provided n-grams with the given keys.
... Which mypy doesn't like. |
hardbyte
added a commit
that referenced
this issue
May 4, 2018
hardbyte
added a commit
that referenced
this issue
May 18, 2018
hardbyte
added a commit
that referenced
this issue
Jun 26, 2018
Black have patched to now handle type annotations so could we worth trying this again. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider applying black
Aha! Link: https://csiro.aha.io/features/ANONLINK-39
The text was updated successfully, but these errors were encountered: