@@ -400,17 +400,17 @@ def _get_flag_lookup() -> Dict[str, int]:
400
400
)
401
401
402
402
403
- def get_optionflags (parent ) :
404
- optionflags_str = parent . config .getini ("doctest_optionflags" )
403
+ def get_optionflags (config : Config ) -> int :
404
+ optionflags_str = config .getini ("doctest_optionflags" )
405
405
flag_lookup_table = _get_flag_lookup ()
406
406
flag_acc = 0
407
407
for flag in optionflags_str :
408
408
flag_acc |= flag_lookup_table [flag ]
409
409
return flag_acc
410
410
411
411
412
- def _get_continue_on_failure (config ) :
413
- continue_on_failure = config .getvalue ("doctest_continue_on_failure" )
412
+ def _get_continue_on_failure (config : Config ) -> bool :
413
+ continue_on_failure : bool = config .getvalue ("doctest_continue_on_failure" )
414
414
if continue_on_failure :
415
415
# We need to turn off this if we use pdb since we should stop at
416
416
# the first failure.
@@ -433,7 +433,7 @@ def collect(self) -> Iterable[DoctestItem]:
433
433
name = self .path .name
434
434
globs = {"__name__" : "__main__" }
435
435
436
- optionflags = get_optionflags (self )
436
+ optionflags = get_optionflags (self . config )
437
437
438
438
runner = _get_runner (
439
439
verbose = False ,
@@ -578,7 +578,7 @@ def _from_module(self, module, object):
578
578
raise
579
579
# Uses internal doctest module parsing mechanism.
580
580
finder = MockAwareDocTestFinder ()
581
- optionflags = get_optionflags (self )
581
+ optionflags = get_optionflags (self . config )
582
582
runner = _get_runner (
583
583
verbose = False ,
584
584
optionflags = optionflags ,
0 commit comments