Skip to content

Commit 9ae6ae4

Browse files
committed
disable warnings
1 parent c525756 commit 9ae6ae4

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

new_dale_chall_readability/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import re
2+
import warnings
3+
24
from bs4 import BeautifulSoup
35
from .easy_words import EASY_WORDS as _EASY_WORDS
46

7+
# Ignore MarkupResemblesLocatorWarning and other user warnings
8+
# because this is library code.
9+
warnings.filterwarnings("ignore", category=UserWarning, module="bs4")
10+
511

612
def pct_unfamiliar_words(text: str) -> float:
713
words = _words(text)

pyproject.toml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
[tool.poetry]
22
name = "new-dale-chall-readability"
3-
version = "1.0.12"
3+
version = "1.0.13"
44
description = "Implements the New Dale-Chall readability formula. Its output is tested against samples from the original publication."
55
authors = ["Robb Shecter <robb@public.law>"]
66
license = "MIT"
7-
homepage = "https://github.com/public-law/new-dale-chall-readability"
8-
repository = "https://github.com/public-law/new-dale-chall-readability"
7+
homepage = "https://github.com/public-law/readability"
8+
repository = "https://github.com/public-law/readability"
99
keywords = ["nlp", "readability", "dale-chall"]
1010
classifiers = [
11-
"Development Status :: 5 - Production/Stable",
12-
"Intended Audience :: Developers",
13-
"License :: OSI Approved :: MIT License",
14-
"Natural Language :: English",
15-
"Operating System :: OS Independent",
16-
"Programming Language :: Python :: 3",
17-
"Programming Language :: Python :: 3.10",
18-
"Topic :: Text Processing :: Linguistic",
19-
"Typing :: Typed"]
11+
"Development Status :: 5 - Production/Stable",
12+
"Intended Audience :: Developers",
13+
"License :: OSI Approved :: MIT License",
14+
"Natural Language :: English",
15+
"Operating System :: OS Independent",
16+
"Programming Language :: Python :: 3",
17+
"Programming Language :: Python :: 3.10",
18+
"Topic :: Text Processing :: Linguistic",
19+
"Typing :: Typed",
20+
]
2021
readme = "README.md"
2122

2223

@@ -56,7 +57,7 @@ reportUnusedImport = "warning"
5657
[tool.pytest.ini_options]
5758
minversion = "7.1"
5859
pythonpath = "."
59-
python_files = ["*_test.py",]
60+
python_files = ["*_test.py"]
6061
python_classes = ["Test", "Describe"]
6162
python_functions = ["test_", "it_", "and_", "but_", "they_"]
6263
addopts = "-q --no-header --doctest-modules"

0 commit comments

Comments
 (0)