Skip to content

Commit f0785ae

Browse files
committed
Lint
1 parent c3703de commit f0785ae

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

flake8_sphinx_links/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
__version__: str = "0.2.1"
4747
__email__: str = "dominic@davis-foster.co.uk"
4848

49-
__all__ = [
49+
__all__ = (
5050
"SXL001",
5151
"Visitor",
5252
"Plugin",
@@ -55,9 +55,9 @@
5555
"exc",
5656
"class_",
5757
"regex",
58-
]
58+
)
5959

60-
SXL001: str = "SXL001 Double backticked strings should be a link to Python documentation." # noqa: E501
60+
SXL001: str = "SXL001 Double backticked strings should be a link to Python documentation."
6161

6262
#: List of keywords which should become :file:`:py:obj:\`{<keyword>}\``
6363
py_obj: List[str] = [

tests/flake8_sphinx_links_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# stdlib
22
import ast
3+
from typing import Set
34

45
# 3rd party
56
import pytest
@@ -8,7 +9,7 @@
89
from flake8_sphinx_links import SXL001, Plugin, class_, exc, py_obj, py_obj_python
910

1011

11-
def results(s):
12+
def results(s: str) -> Set[str]:
1213
return {"{}:{}: {}".format(*r) for r in Plugin(ast.parse(s)).run()}
1314

1415

@@ -49,7 +50,7 @@ def good_docstring():
4950

5051

5152
@pytest.mark.parametrize("obj", py_obj_python)
52-
def test_bad_docstring_py_obj_python(obj):
53+
def test_bad_docstring_py_obj_python(obj: str):
5354
test_code = f'''"""
5455
5556
``{obj}``
@@ -119,7 +120,7 @@ class good_docstring():
119120

120121

121122
@pytest.mark.parametrize("obj", class_)
122-
def test_bad_docstring_class_(obj):
123+
def test_bad_docstring_class_(obj: str):
123124
test_code = f'''"""
124125
125126
``{obj}``

0 commit comments

Comments
 (0)