Skip to content

Commit 5470d33

Browse files
committed
store: rename Store to Stash
The name "stash" is a bit more distinguishable and more evocative of the intended usage.
1 parent 940c6e2 commit 5470d33

File tree

14 files changed

+115
-115
lines changed

14 files changed

+115
-115
lines changed

src/_pytest/assertion/rewrite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
from _pytest.main import Session
3939
from _pytest.pathlib import absolutepath
4040
from _pytest.pathlib import fnmatch_ex
41-
from _pytest.store import StoreKey
41+
from _pytest.stash import StashKey
4242

4343
if TYPE_CHECKING:
4444
from _pytest.assertion import AssertionState
4545

4646

47-
assertstate_key = StoreKey["AssertionState"]()
47+
assertstate_key = StashKey["AssertionState"]()
4848

4949

5050
# pytest caches rewritten pycs in pycache dirs

src/_pytest/config/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
from _pytest.pathlib import import_path
5757
from _pytest.pathlib import ImportMode
5858
from _pytest.pathlib import resolve_package_path
59-
from _pytest.store import Store
59+
from _pytest.stash import Stash
6060
from _pytest.warning_types import PytestConfigWarning
6161

6262
if TYPE_CHECKING:
@@ -933,7 +933,7 @@ def __init__(
933933
self._cleanup: List[Callable[[], None]] = []
934934
# A place where plugins can store information on the config for their
935935
# own use. Currently only intended for internal plugins.
936-
self._store = Store()
936+
self._store = Stash()
937937
self.pluginmanager.register(self, "pytestconfig")
938938
self._configured = False
939939
self.hook.pytest_addoption.call_historic(

src/_pytest/faulthandler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
from _pytest.config import Config
99
from _pytest.config.argparsing import Parser
1010
from _pytest.nodes import Item
11-
from _pytest.store import StoreKey
11+
from _pytest.stash import StashKey
1212

1313

14-
fault_handler_stderr_key = StoreKey[TextIO]()
15-
fault_handler_originally_enabled_key = StoreKey[bool]()
14+
fault_handler_stderr_key = StashKey[TextIO]()
15+
fault_handler_originally_enabled_key = StashKey[bool]()
1616

1717

1818
def pytest_addoption(parser: Parser) -> None:

src/_pytest/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
from _pytest.outcomes import TEST_OUTCOME
6363
from _pytest.pathlib import absolutepath
6464
from _pytest.pathlib import bestrelpath
65-
from _pytest.store import StoreKey
65+
from _pytest.stash import StashKey
6666

6767
if TYPE_CHECKING:
6868
from typing import Deque
@@ -149,7 +149,7 @@ def get_scope_node(
149149

150150

151151
# Used for storing artificial fixturedefs for direct parametrization.
152-
name2pseudofixturedef_key = StoreKey[Dict[str, "FixtureDef[Any]"]]()
152+
name2pseudofixturedef_key = StashKey[Dict[str, "FixtureDef[Any]"]]()
153153

154154

155155
def add_funcarg_pseudo_fixture_def(

src/_pytest/junitxml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
from _pytest.config.argparsing import Parser
3131
from _pytest.fixtures import FixtureRequest
3232
from _pytest.reports import TestReport
33-
from _pytest.store import StoreKey
33+
from _pytest.stash import StashKey
3434
from _pytest.terminal import TerminalReporter
3535

3636

37-
xml_key = StoreKey["LogXML"]()
37+
xml_key = StashKey["LogXML"]()
3838

3939

4040
def bin_xml_escape(arg: object) -> str:

src/_pytest/logging.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
from _pytest.fixtures import fixture
3232
from _pytest.fixtures import FixtureRequest
3333
from _pytest.main import Session
34-
from _pytest.store import StoreKey
34+
from _pytest.stash import StashKey
3535
from _pytest.terminal import TerminalReporter
3636

3737

3838
DEFAULT_LOG_FORMAT = "%(levelname)-8s %(name)s:%(filename)s:%(lineno)d %(message)s"
3939
DEFAULT_LOG_DATE_FORMAT = "%H:%M:%S"
4040
_ANSI_ESCAPE_SEQ = re.compile(r"\x1b\[[\d;]+m")
41-
caplog_handler_key = StoreKey["LogCaptureHandler"]()
42-
caplog_records_key = StoreKey[Dict[str, List[logging.LogRecord]]]()
41+
caplog_handler_key = StashKey["LogCaptureHandler"]()
42+
caplog_records_key = StashKey[Dict[str, List[logging.LogRecord]]]()
4343

4444

4545
def _remove_ansi_escape_sequences(text: str) -> str:

src/_pytest/mark/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from _pytest.config.argparsing import Parser
2626
from _pytest.deprecated import MINUS_K_COLON
2727
from _pytest.deprecated import MINUS_K_DASH
28-
from _pytest.store import StoreKey
28+
from _pytest.stash import StashKey
2929

3030
if TYPE_CHECKING:
3131
from _pytest.nodes import Item
@@ -41,7 +41,7 @@
4141
]
4242

4343

44-
old_mark_config_key = StoreKey[Optional[Config]]()
44+
old_mark_config_key = StashKey[Optional[Config]]()
4545

4646

4747
def param(

src/_pytest/nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from _pytest.outcomes import fail
3535
from _pytest.pathlib import absolutepath
3636
from _pytest.pathlib import commonpath
37-
from _pytest.store import Store
37+
from _pytest.stash import Stash
3838
from _pytest.warning_types import PytestWarning
3939

4040
if TYPE_CHECKING:
@@ -220,7 +220,7 @@ def __init__(
220220

221221
# A place where plugins can store information on the node for their
222222
# own use. Currently only intended for internal plugins.
223-
self._store = Store()
223+
self._store = Stash()
224224

225225
@property
226226
def fspath(self) -> LEGACY_PATH:

src/_pytest/pastebin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
from _pytest.config import Config
99
from _pytest.config import create_terminal_writer
1010
from _pytest.config.argparsing import Parser
11-
from _pytest.store import StoreKey
11+
from _pytest.stash import StashKey
1212
from _pytest.terminal import TerminalReporter
1313

1414

15-
pastebinfile_key = StoreKey[IO[bytes]]()
15+
pastebinfile_key = StashKey[IO[bytes]]()
1616

1717

1818
def pytest_addoption(parser: Parser) -> None:

src/_pytest/skipping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from _pytest.outcomes import xfail
2222
from _pytest.reports import BaseReport
2323
from _pytest.runner import CallInfo
24-
from _pytest.store import StoreKey
24+
from _pytest.stash import StashKey
2525

2626

2727
def pytest_addoption(parser: Parser) -> None:
@@ -228,7 +228,7 @@ def evaluate_xfail_marks(item: Item) -> Optional[Xfail]:
228228

229229

230230
# Saves the xfail mark evaluation. Can be refreshed during call if None.
231-
xfailed_key = StoreKey[Optional[Xfail]]()
231+
xfailed_key = StashKey[Optional[Xfail]]()
232232

233233

234234
@hookimpl(tryfirst=True)

0 commit comments

Comments
 (0)