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 7
7
import json
8
8
import os
9
9
from collections import OrderedDict
10
+ from typing import List
10
11
11
12
import attr
12
13
import py
15
16
from .pathlib import Path
16
17
from .pathlib import resolve_from_str
17
18
from .pathlib import rm_rf
19
+ from _pytest import nodes
20
+ from _pytest .config import Config
21
+ from _pytest .main import Session
18
22
19
23
README_CONTENT = """\
20
24
# pytest cache directory #
@@ -263,10 +267,12 @@ def __init__(self, config):
263
267
self .active = config .option .newfirst
264
268
self .cached_nodeids = config .cache .get ("cache/nodeids" , [])
265
269
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 :
267
273
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]
270
276
for item in items :
271
277
if item .nodeid not in self .cached_nodeids :
272
278
new_items [item .nodeid ] = item
You can’t perform that action at this time.
0 commit comments