Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/oauthlib/__init__.py: 80%

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

10 statements  

1""" 

2 oauthlib 

3 ~~~~~~~~ 

4 

5 A generic, spec-compliant, thorough implementation of the OAuth 

6 request-signing logic. 

7 

8 :copyright: (c) 2019 by The OAuthlib Community 

9 :license: BSD, see LICENSE for details. 

10""" 

11import logging 

12from logging import NullHandler 

13 

14__author__ = 'The OAuthlib Community' 

15__version__ = '3.2.2' 

16 

17logging.getLogger('oauthlib').addHandler(NullHandler()) 

18 

19_DEBUG = False 

20 

21def set_debug(debug_val): 

22 """Set value of debug flag 

23 

24 :param debug_val: Value to set. Must be a bool value. 

25 """ 

26 global _DEBUG # noqa: PLW0603 

27 _DEBUG = debug_val 

28 

29def get_debug(): 

30 """Get debug mode value. 

31 

32 :return: `True` if debug mode is on, `False` otherwise 

33 """ 

34 return _DEBUG