Skip to content

Commit

Permalink
Fix incorrect arg name in docstring and revert some auto lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragjn committed Oct 10, 2019
1 parent d42e1e7 commit 2555da7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion laserembeddings/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BPESentenceEmbedding:
or a binary-mode file object.
max_sentences (int, optional): see ``.encoder.SentenceEncoder``.
max_tokens (int, optional): see ``.encoder.SentenceEncoder``.
max_tokens (bool, optional): if True, mergesort sorting algorithm will be used,
stable (bool, optional): if True, mergesort sorting algorithm will be used,
otherwise quicksort will be used. Defaults to False. See ``.encoder.SentenceEncoder``.
cpu (bool, optional): if True, forces the use of the CPU even a GPU is available. Defaults to False.
"""
Expand Down
6 changes: 3 additions & 3 deletions laserembeddings/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self):
self.original_sre_parse_uniq = None

def __enter__(self):
# pylint: disable=import-outside-toplevel
#pylint: disable=import-outside-toplevel
import sys

if self.original_sre_parse_uniq is None and (
Expand All @@ -21,7 +21,7 @@ def __enter__(self):
try:
import sre_parse
self.sre_parse = sre_parse
# pylint: disable=protected-access
#pylint: disable=protected-access
self.original_sre_parse_uniq = sre_parse._uniq
sre_parse._uniq = lambda x: list(dict.fromkeys(x))
except (ImportError, AttributeError):
Expand All @@ -30,6 +30,6 @@ def __enter__(self):

def __exit__(self, type_, value, traceback):
if self.sre_parse and self.original_sre_parse_uniq:
# pylint: disable=protected-access
#pylint: disable=protected-access
self.sre_parse._uniq = self.original_sre_parse_uniq
self.original_sre_parse_uniq = None
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def test_sre_performance_patch():
# pylint: disable=protected-access
#pylint: disable=protected-access
try:
import sre_parse
uniq = sre_parse._uniq
Expand Down

0 comments on commit 2555da7

Please sign in to comment.