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

Method legacy_normalize

Lib/importlib/metadata/__init__.py:972–977  ·  view source on GitHub ↗

Normalize the package name as found in the convention in older packaging tools versions and specs.

(name)

Source from the content-addressed store, hash-verified

970
971 @staticmethod
972 def legacy_normalize(name):
973 """
974 Normalize the package name as found in the convention in
975 older packaging tools versions and specs.
976 """
977 return name.lower().replace('-', '_')
978
979 def __bool__(self):
980 return bool(self.name)

Callers 2

__init__Method · 0.95
__init__Method · 0.80

Calls 2

replaceMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected