Skip to content

Commit

Permalink
Linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Aug 30, 2023
1 parent ab15668 commit 9d3d5f8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/antsibull_docs/cli/antsibull_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from ..constants import DOCUMENTABLE_PLUGINS # noqa: E402
from ..docs_parsing.fqcn import is_fqcn # noqa: E402
from ..schemas.app_context import DocsAppContext # noqa: E402
from ..test_helpers import ci_setup
from ..test_helpers import ci_setup # noqa: E402
from .doc_commands import ( # noqa: E402
collection,
collection_plugins,
Expand Down
1 change: 1 addition & 0 deletions src/antsibull_docs/cli/doc_commands/sphinx_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from antsibull_core.logging import log

import antsibull_docs

from ... import app_context
from ...jinja2.environment import doc_environment

Expand Down
6 changes: 4 additions & 2 deletions src/antsibull_docs/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import antsibull_docs


# Use an environment variable with a special value as a CI marker
ANTSIBULL_DOCS_CI_ENV_MARKER_NAME = "_ANTSIBULL_DOCS_CI_MARKER"
ANTSIBULL_DOCS_CI_ENV_MARKER_VALUE = "Noo4oogongae"
Expand All @@ -24,7 +23,10 @@ def is_in_antsibull_ci():
"""
Determine whether the code is running in CI.
"""
return os.environ.get(ANTSIBULL_DOCS_CI_ENV_MARKER_NAME) == ANTSIBULL_DOCS_CI_ENV_MARKER_VALUE
return (
os.environ.get(ANTSIBULL_DOCS_CI_ENV_MARKER_NAME)
== ANTSIBULL_DOCS_CI_ENV_MARKER_VALUE
)


def ci_setup():
Expand Down
4 changes: 3 additions & 1 deletion src/antsibull_docs/write_docs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

def _render_template(_template: Template, _name: str, **kwargs) -> str:
try:
return _template.render(antsibull_docs_version=antsibull_docs.__version__, **kwargs)
return _template.render(
antsibull_docs_version=antsibull_docs.__version__, **kwargs
)
except Exception as exc:
raise RuntimeError(f"Error while rendering {_name}") from exc

0 comments on commit 9d3d5f8

Please sign in to comment.