Skip to content

Commit 23dcf0c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5d5ad4e commit 23dcf0c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/_pytest/assertion/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
from __future__ import annotations
55

6-
import os
76
from collections.abc import Generator
7+
import os
88
import sys
99
from typing import Any
1010
from typing import TYPE_CHECKING
@@ -108,7 +108,8 @@ def __init__(self, config: Config, mode) -> None:
108108
self.mode = mode
109109
self.trace = config.trace.root.get("assertion")
110110
self.hook: rewrite.AssertionRewritingHook | None = None
111-
self.root_path=os.getcwd()
111+
self.root_path = os.getcwd()
112+
112113

113114
def install_importhook(config: Config) -> rewrite.AssertionRewritingHook:
114115
"""Try to install the rewrite hook, raise SystemError if it fails."""

src/_pytest/assertion/rewrite.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def find_spec(
133133

134134
return importlib.util.spec_from_file_location(
135135
name,
136-
fn ,
136+
fn,
137137
loader=self,
138138
submodule_search_locations=spec.submodule_search_locations,
139139
)
@@ -251,7 +251,6 @@ def _should_rewrite(self, name: str, fn: str, state: AssertionState) -> bool:
251251

252252
return self._is_marked_for_rewrite(name, state)
253253

254-
255254
def _is_marked_for_rewrite(self, name: str, state: AssertionState) -> bool:
256255
try:
257256
return self._marked_for_rewrite_cache[name]

0 commit comments

Comments
 (0)