Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/wtforms/_compat.py: 44%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

9 statements  

1"""Compatibility helpers for different Python versions.""" 

2 

3import inspect 

4import sys 

5 

6if sys.version_info >= (3, 14): 

7 from annotationlib import Format 

8 

9 def get_signature(callable): 

10 return inspect.signature(callable, annotation_format=Format.FORWARDREF) 

11 

12else: 

13 

14 def get_signature(callable): 

15 return inspect.signature(callable)