Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 23, 2024
1 parent 5f1012c commit 9283d4d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/_pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,10 @@ def write_fixture(fixture_def: FixtureDef[object]) -> None:
fixture_doc = inspect.getdoc(fixture_def.func)
if fixture_doc:
write_docstring(
tw, fixture_doc.split('\n\n', maxsplit=1)[0] if verbose <= 0 else fixture_doc
tw,
fixture_doc.split("\n\n", maxsplit=1)[0]
if verbose <= 0
else fixture_doc,
)
else:
tw.line(" no docstring available", red=True)
Expand Down Expand Up @@ -1914,7 +1917,9 @@ def _showfixtures_main(config: Config, session: "Session") -> None:
tw.write("\n")
doc = inspect.getdoc(fixturedef.func)
if doc:
write_docstring(tw, doc.split('\n\n', maxsplit=1)[0] if verbose <= 0 else doc)
write_docstring(

Check warning on line 1920 in src/_pytest/fixtures.py

View check run for this annotation

Codecov / codecov/patch

src/_pytest/fixtures.py#L1920

Added line #L1920 was not covered by tests
tw, doc.split("\n\n", maxsplit=1)[0] if verbose <= 0 else doc
)
else:
tw.line(" no docstring available", red=True)
tw.line()
Expand Down

0 comments on commit 9283d4d

Please sign in to comment.