Skip to content

Commit

Permalink
fix(lang): 🐛 correct iso-code for nepali language (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyTheFactory authored Mar 18, 2024
1 parent 8dc78af commit 88fc5a7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion newspaper/languages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def valid_languages():
"""Returns the List of available Languages as tuples (iso-code, language)"""
languages = []
for code, language in languages_tuples:
stopwords_file = Path(settings.STOPWORDS_DIR) / f"stopwords-{language}.txt"
stopwords_file = Path(settings.STOPWORDS_DIR) / f"stopwords-{code}.txt"
if stopwords_file.exists():
languages.append((code, language))

Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def test_popular_urls():


def test_languages():
newspaper.languages()
language_list = newspaper.valid_languages()
assert len(language_list) > 20


# Skip if GITHUB_ACTIONS
Expand Down

0 comments on commit 88fc5a7

Please sign in to comment.