Skip to content

Commit

Permalink
Merge pull request Sefaria#1787 from Sefaria/fix-find-refs-text-options
Browse files Browse the repository at this point in the history
fix(linker): fix order of parameters
  • Loading branch information
nsantacruz authored Jan 28, 2024
2 parents c0524bc + ab37239 commit 0f2f64a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sefaria/helper/linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class _FindRefsTextOptions:
@attr version_preferences_by_corpus: dict of dicts of the form { <corpus>: { <lang>: <vtitle> }}
"""

debug: bool = False
with_text: bool = False
debug: bool = False
max_segments: int = 0
version_preferences_by_corpus: dict = None

Expand Down
4 changes: 2 additions & 2 deletions sefaria/helper/tests/linker_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def test_find_refs_text(self, mock_is_hebrew: Mock):
assert find_refs_text.lang == 'en'

def test_find_refs_text_options(self):
find_refs_text_options = linker._FindRefsTextOptions(True, True, 10, {})
assert find_refs_text_options.debug
find_refs_text_options = linker._FindRefsTextOptions(True, False, 10, {})
assert not find_refs_text_options.debug
assert find_refs_text_options.with_text
assert find_refs_text_options.max_segments == 10
assert find_refs_text_options.version_preferences_by_corpus == {}
Expand Down

0 comments on commit 0f2f64a

Please sign in to comment.