diff --git a/docs/async_client.rst b/docs/async_client.rst index 247352c..d59a012 100644 --- a/docs/async_client.rst +++ b/docs/async_client.rst @@ -1,7 +1,6 @@ .. _async_client: -.. module:: akismet - :noindex: +.. currentmodule:: akismet The asynchronous Akismet client diff --git a/docs/changelog.rst b/docs/changelog.rst index a200d59..6c41e87 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,4 +1,4 @@ -.. changelog: +.. _changelog: Changelog ========= diff --git a/docs/conf.py b/docs/conf.py index 4f76bda..b851c54 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,7 +18,7 @@ "sphinx_inline_tabs", ] templates_path = ["_templates"] -source_suffix = ".rst" +source_suffix = {".rst": "restructuredtext"} master_doc = "index" project = "akismet" copyright = "Michael Foord, James Bennett, and contributors" diff --git a/docs/exceptions.rst b/docs/exceptions.rst index 342df9a..7900d7b 100644 --- a/docs/exceptions.rst +++ b/docs/exceptions.rst @@ -1,7 +1,6 @@ .. _exceptions: -.. module:: akismet - :noindex: +.. currentmodule:: akismet Exception classes diff --git a/docs/misc.rst b/docs/misc.rst index c32dec6..a9e8176 100644 --- a/docs/misc.rst +++ b/docs/misc.rst @@ -1,7 +1,6 @@ .. _misc: -.. module:: akismet - :noindex: +.. currentmodule:: akismet Other code and data diff --git a/docs/sync_client.rst b/docs/sync_client.rst index edc58a9..55285f8 100644 --- a/docs/sync_client.rst +++ b/docs/sync_client.rst @@ -1,7 +1,6 @@ .. _sync_client: -.. module:: akismet - :noindex: +.. currentmodule:: akismet The synchronous Akismet client diff --git a/docs/test_clients.rst b/docs/test_clients.rst index 9de1a4f..d56305c 100644 --- a/docs/test_clients.rst +++ b/docs/test_clients.rst @@ -1,7 +1,6 @@ .. _test-clients: -.. module:: akismet - :noindex: +.. currentmodule:: akismet The test clients diff --git a/noxfile.py b/noxfile.py index a03a298..b1dbb92 100644 --- a/noxfile.py +++ b/noxfile.py @@ -313,11 +313,8 @@ def lint_pylint(session: nox.Session) -> None: Lint code with Pylint. """ - # Pylint requires that all dependencies be importable during the run. This package - # does not have any direct dependencies, nor does the normal test suite, but the - # full conformance suite does require a few extra libraries, so they're installed - # here. - session.install("pylint", "bs4", "html5lib", "requests") + # Pylint requires that all dependencies be importable during the run. + session.install("httpx", "pylint") session.run(f"python{session.python}", "-Im", "pylint", "--version") session.run(f"python{session.python}", "-Im", "pylint", "src/", "tests/") clean() diff --git a/pyproject.toml b/pyproject.toml index 2cb77b6..d1a22b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,13 @@ tests = [ ] [tool.bandit] -skips = ["B101"] +# For reasons I do not understand, Bandit has decided to begin +# alerting on use of httpx without an explicit timeout, when httpx +# applies an automatic default timeout in that case. See +# https://github.com/PyCQA/bandit/issues/1175 for details; if and when +# they revert their alerts on httpx, the B113 check can be turned on +# again. +skips = ["B101", "B113"] [tool.black] target-version = ["py38", "py39", "py310", "py311", "py312"] diff --git a/src/akismet/_async_client.py b/src/akismet/_async_client.py index ab8b62e..6a9da55 100644 --- a/src/akismet/_async_client.py +++ b/src/akismet/_async_client.py @@ -482,7 +482,7 @@ async def submit_spam(self, user_ip: str, **kwargs: str) -> bool: """ return await self._submit(_common._SUBMIT_SPAM, user_ip, **kwargs) - async def key_sites( # pylint: disable=too-many-arguments + async def key_sites( # pylint: disable=too-many-positional-arguments,too-many-arguments self, month: Optional[str] = None, url_filter: Optional[str] = None, diff --git a/src/akismet/_sync_client.py b/src/akismet/_sync_client.py index bf7a171..2afe8ed 100644 --- a/src/akismet/_sync_client.py +++ b/src/akismet/_sync_client.py @@ -479,7 +479,7 @@ def submit_spam(self, user_ip: str, **kwargs: str) -> bool: """ return self._submit(_common._SUBMIT_SPAM, user_ip, **kwargs) - def key_sites( # pylint: disable=too-many-arguments + def key_sites( # pylint: disable=too-many-positional-arguments,too-many-arguments self, month: Optional[str] = None, url_filter: Optional[str] = None,