MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / default

Method default

wdev.py:74–80  ·  view source on GitHub ↗
(value, name)

Source from the content-addressed store, hash-verified

72 if year is not None:
73 year = str(year) # Allow specification as a number.
74 def default(value, name):
75 if value is None:
76 name2 = f'WDEV_VS_{name.upper()}'
77 value = os.environ.get(name2)
78 if value is not None:
79 _log(f'Setting {name} from environment variable {name2}: {value!r}')
80 return value
81 try:
82 year = default(year, 'year')
83 grade = default(grade, 'grade')

Callers

nothing calls this directly

Calls 2

_logFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected