Skip to content

Commit

Permalink
Ignore E203 from flake8
Browse files Browse the repository at this point in the history
add E203 ignore to flake8
Ref: psf/black#157
  • Loading branch information
R1j1t committed Oct 10, 2020
1 parent e7e8f14 commit 98d1757
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = W503
ignore = W503, E203
exclude = .git,__pycache__,build,peters_code,.ipynb_checkpoints,setup.py
max-complexity = 15
per-file-ignores =
Expand Down
12 changes: 8 additions & 4 deletions contextualSpellCheck/contextualSpellCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,14 +593,17 @@ def deep_tokenize_in_vocab(self, text):
pre_puct_position = -1
for char_position in range(text_len):
if unicodedata.category(text[char_position]).startswith("P"):
# print("current_pos is {} and sub_token append {}".format(char_position,text[char_position]))
# print("current_pos is {} and sub_token append {}"
# .format(char_position,text[char_position]))
sub_tokens.append(text[char_position])
# print("pre_pos is {}, cur is {} , pre to current is {}".format(pre_puct_position,char_position,text[pre_puct_position+1:char_position]))
# print("pre_pos is {}, cur is {} , pre to current is {}"
# .format(pre_puct_position,char_position,text[pre_puct_position+1:char_position]))
if (
pre_puct_position >= 0
and text[pre_puct_position + 1 : char_position] != ""
):
# print("pre_pos is {}, cur is {} , pre to current is {}".format(pre_puct_position,char_position,text[pre_puct_position+1:char_position]))
# print("pre_pos is {}, cur is {} , pre to current is {}"
# .format(pre_puct_position,char_position,text[pre_puct_position+1:char_position]))
sub_tokens.append(
text[pre_puct_position + 1 : char_position]
)
Expand All @@ -611,7 +614,8 @@ def deep_tokenize_in_vocab(self, text):
and (char_position + 1 == text_len)
and (text[pre_puct_position + 1 :] != "")
):
# print("inside last token append {}".format(text[pre_puct_position+1:]))
# print("inside last token append {}"
# .format(text[pre_puct_position+1:]))
sub_tokens.append(text[pre_puct_position + 1 :])

if len(sub_tokens) > 0:
Expand Down

0 comments on commit 98d1757

Please sign in to comment.