MCPcopy Index your code
hub / github.com/RustPython/RustPython / _extract_future_flags

Function _extract_future_flags

Lib/doctest.py:204–214  ·  view source on GitHub ↗

Return the compiler-flags associated with the future features that have been imported into the given namespace (globs).

(globs)

Source from the content-addressed store, hash-verified

202######################################################################
203
204def _extract_future_flags(globs):
205 """
206 Return the compiler-flags associated with the future features that
207 have been imported into the given namespace (globs).
208 """
209 flags = 0
210 for fname in __future__.all_feature_names:
211 feature = globs.get(fname, None)
212 if feature is getattr(__future__, fname):
213 flags |= feature.compiler_flag
214 return flags
215
216def _normalize_module(module, depth=2):
217 """

Callers 1

runMethod · 0.85

Calls 2

getattrFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected