File tree Expand file tree Collapse file tree 2 files changed +103
-75
lines changed
Expand file tree Collapse file tree 2 files changed +103
-75
lines changed Original file line number Diff line number Diff line change 11from io import StringIO
22from pprint import pprint
3+ from typing import Any
34from typing import List
45from typing import Optional
56from typing import Tuple
1718from _pytest ._code .code import ReprLocals
1819from _pytest ._code .code import ReprTraceback
1920from _pytest ._code .code import TerminalRepr
21+ from _pytest .compat import TYPE_CHECKING
2022from _pytest .nodes import Node
2123from _pytest .outcomes import skip
2224from _pytest .pathlib import Path
@@ -41,9 +43,14 @@ class BaseReport:
4143 sections = [] # type: List[Tuple[str, str]]
4244 nodeid = None # type: str
4345
44- def __init__ (self , ** kw ) :
46+ def __init__ (self , ** kw : Any ) -> None :
4547 self .__dict__ .update (kw )
4648
49+ if TYPE_CHECKING :
50+ # Can have arbitrary fields given to __init__().
51+ def __getattr__ (self , key : str ) -> Any :
52+ raise NotImplementedError ()
53+
4754 def toterminal (self , out ) -> None :
4855 if hasattr (self , "node" ):
4956 out .line (getslaveinfoline (self .node )) # type: ignore
You can’t perform that action at this time.
0 commit comments