• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zopefoundation / RestrictedPython / 27410799377

12 Jun 2026 10:44AM UTC coverage: 98.955% (-0.02%) from 98.972%
27410799377

Pull #317

github

web-flow
Merge e2eff83f1 into a2891c0d1
Pull Request #317: Type Annotations for RestrictedPython

212 of 219 branches covered (96.8%)

219 of 220 new or added lines in 8 files covered. (99.55%)

1 existing line in 1 file now uncovered.

2557 of 2584 relevant lines covered (98.96%)

0.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.89
/src/RestrictedPython/_types.py
1
import ast
1✔
2
import sys
1✔
3
import typing
1✔
4

5

6
_T = typing.TypeVar('_T')
1✔
7

8

9
def cast_not_none(var: _T | None) -> _T:
1✔
10
    return typing.cast(_T, var)
1✔
11

12

13
if sys.version_info >= (3, 12):
1!
14
    T_pos_ast: typing.TypeAlias = (
1✔
15
        ast.stmt | ast.expr | ast.excepthandler | ast.arg | ast.keyword
16
        | ast.alias | ast.pattern | ast.type_param)
17
else:
NEW
18
    T_pos_ast: typing.TypeAlias = (
×
19
        ast.stmt | ast.expr | ast.excepthandler | ast.arg | ast.keyword
20
        | ast.alias | ast.pattern)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc