1- import os , json , sys , time
1+ import os
2+ import json
3+ import sys
4+ import time
25from lcdoc .tools import exists , project , write_file , read_file , to_list
3- import inspect , shutil
6+ import inspect
7+ import shutil
48from functools import partial , wraps
59from lcdoc .call_flows .call_flow_charting import make_call_flow_chart
610
1721 # *IF* we are in a project based on devapps, we can build call flow logs also
1822 # from pytest, not just from docs/lp. Requirements are these imports:
1923 from devapp .tools import FLG , exists , project
20- from devapp .tools import define_flags , project , to_list
24+ from devapp .tools import define_flags , to_list
2125 from absl .flags ._exceptions import UnparsedFlagAccessError
2226except :
2327 pass
@@ -141,7 +145,7 @@ def response(frame, arg):
141145
142146 def tracer (frame , event , arg , counter = 0 ):
143147 """The settrace function. You can't pdb here!"""
144- if not frame .f_code in ILS .traced :
148+ if frame .f_code not in ILS .traced :
145149 return
146150 if event == 'call' :
147151 SetTrace .request (frame )
@@ -265,10 +269,6 @@ def set_flags(flags, unset=False):
265269 return [setattr (FLG , k , v ) for k , v in M .items ()]
266270
267271
268- import os
269- from functools import partial
270-
271-
272272def pytest_plot_dest (dest ):
273273 cur_test = lambda : os .environ ['PYTEST_CURRENT_TEST' ]
274274 # if os.path.isfile(dest):
@@ -402,7 +402,7 @@ def use_case_(*args, _dest=dest, _fmt=fmt, **kwargs):
402402 min_header_level = 5
403403 section , n = n .rsplit ('.' , 1 )
404404 have = written_sect_headers .setdefault (n_mod , {})
405- if not section in have :
405+ if section not in have :
406406 doc += '\n \n #### ' + section
407407 have [section ] = True
408408
@@ -492,7 +492,7 @@ def use_case_(*args, _dest=dest, _fmt=fmt, **kwargs):
492492
493493
494494def strip_no_ad (s , sep = '# /--' ):
495- if not sep in s :
495+ if sep not in s :
496496 return s
497497 r , add , lines = [], True , s .splitlines ()
498498 while lines :
@@ -510,15 +510,14 @@ def strip_no_ad(s, sep='# /--'):
510510
511511
512512def import_mod (test_mod_file ):
513- """
514- """
515- if not 'pytest' in sys .argv [0 ]:
513+ """ """
514+ if 'pytest' not in sys .argv [0 ]:
516515 return
517516
518- if not '/' in test_mod_file :
517+ if '/' not in test_mod_file :
519518 test_mod_file = os .getcwd () + '/' + test_mod_file
520519 d , fn = test_mod_file .rsplit ('/' , 1 )
521- sys .path .insert (0 , d ) if not d in sys .path else 0
520+ sys .path .insert (0 , d ) if d not in sys .path else 0
522521 mod = import_module (fn .rsplit ('.py' , 1 )[0 ])
523522
524523 fn_md = mod_doc (mod , dest = 'auto' )
0 commit comments