File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 77import json
88import os
99from collections import OrderedDict
10+ from typing import List
1011
1112import attr
1213import py
1516from .pathlib import Path
1617from .pathlib import resolve_from_str
1718from .pathlib import rm_rf
19+ from _pytest import nodes
20+ from _pytest .config import Config
21+ from _pytest .main import Session
1822
1923README_CONTENT = """\
2024 # pytest cache directory #
@@ -263,10 +267,12 @@ def __init__(self, config):
263267 self .active = config .option .newfirst
264268 self .cached_nodeids = config .cache .get ("cache/nodeids" , [])
265269
266- def pytest_collection_modifyitems (self , session , config , items ):
270+ def pytest_collection_modifyitems (
271+ self , session : Session , config : Config , items : List [nodes .Item ]
272+ ) -> None :
267273 if self .active :
268- new_items = OrderedDict ()
269- other_items = OrderedDict ()
274+ new_items = OrderedDict () # type: OrderedDict[str, nodes.Item]
275+ other_items = OrderedDict () # type: OrderedDict[str, nodes.Item]
270276 for item in items :
271277 if item .nodeid not in self .cached_nodeids :
272278 new_items [item .nodeid ] = item
You can’t perform that action at this time.
0 commit comments