MCPcopy Index your code
hub / github.com/python/cpython / my_file_and_modname

Function my_file_and_modname

Lib/test/test_trace.py:29–32  ·  view source on GitHub ↗

The .py file and module name of this file (__file__)

()

Source from the content-addressed store, hash-verified

27 return filename
28
29def my_file_and_modname():
30 """The .py file and module name of this file (__file__)"""
31 modname = os.path.splitext(os.path.basename(__file__))[0]
32 return fix_ext_py(__file__), modname
33
34def get_firstlineno(func):
35 return func.__code__.co_firstlineno

Callers 3

setUpMethod · 0.85
setUpMethod · 0.85
setUpMethod · 0.85

Calls 3

fix_ext_pyFunction · 0.85
splitextMethod · 0.80
basenameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…