Skip to content

Commit

Permalink
Update configurations and documentation.
Browse files Browse the repository at this point in the history
This gets the linters and documentation checks passing again, as
major-version bumps and a strange bug in Bandit had occurred since the
last time those jobs ran.
  • Loading branch information
ubernostrum committed Sep 26, 2024
1 parent e7c989a commit b51a471
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 20 deletions.
3 changes: 1 addition & 2 deletions docs/async_client.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.. _async_client:

.. module:: akismet
:noindex:
.. currentmodule:: akismet


The asynchronous Akismet client
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. changelog:
.. _changelog:

Changelog
=========
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions docs/exceptions.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.. _exceptions:

.. module:: akismet
:noindex:
.. currentmodule:: akismet


Exception classes
Expand Down
3 changes: 1 addition & 2 deletions docs/misc.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.. _misc:

.. module:: akismet
:noindex:
.. currentmodule:: akismet


Other code and data
Expand Down
3 changes: 1 addition & 2 deletions docs/sync_client.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.. _sync_client:

.. module:: akismet
:noindex:
.. currentmodule:: akismet


The synchronous Akismet client
Expand Down
3 changes: 1 addition & 2 deletions docs/test_clients.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.. _test-clients:

.. module:: akismet
:noindex:
.. currentmodule:: akismet


The test clients
Expand Down
7 changes: 2 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion src/akismet/_async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/akismet/_sync_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b51a471

Please sign in to comment.