MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / gen_candidates

Function gen_candidates

lib/matplotlib/__init__.py:661–675  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

659 """
660
661 def gen_candidates():
662 # rely on down-stream code to make absolute. This protects us
663 # from having to directly get the current working directory
664 # which can fail if the user has ended up with a cwd that is
665 # non-existent.
666 yield 'matplotlibrc'
667 try:
668 matplotlibrc = os.environ['MATPLOTLIBRC']
669 except KeyError:
670 pass
671 else:
672 yield matplotlibrc
673 yield os.path.join(matplotlibrc, 'matplotlibrc')
674 yield os.path.join(get_configdir(), 'matplotlibrc')
675 yield os.path.join(get_data_path(), 'matplotlibrc')
676
677 for fname in gen_candidates():
678 if os.path.exists(fname) and not os.path.isdir(fname):

Callers 1

matplotlib_fnameFunction · 0.85

Calls 3

get_configdirFunction · 0.85
get_data_pathFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…