Coverage for src/lcdoc/__init__.py: 35.00%

Shortcuts on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

14 statements  

1""" 

2docutools package. 

3 

4Documentation tools for lc projects 

5""" 

6import os, sys lppytest

7 

8# for apps on gevent we must patch early => Set that env variable: 

9# (see docs lp tips.md) 

10_ = os.environ.get lppytest

11af, tp = _('async_framework'), _('try_preload', '') lppytest

12if af == 'gevent' or 'gevent' in tp: 12 ↛ 13line 12 didn't jump to line 13, because the condition on line 12 was never truelppytest

13 try: 

14 from gevent import monkey 

15 

16 monkey.patch_all() 

17 from lcdoc.lp import Raiser 

18 

19 if 'serve' in sys.argv: 

20 # gevent hangs with the live reload server on exceptions. So, hammer: 

21 Raiser.die = lambda msg: os.kill(os.getpid(), 15) 

22 except ImportError: 

23 pass 

24 

25from typing import List lppytest

26 

27__all__: List[str] = [] # noqa: WPS410 (the only __variable__ we use) lppytest