MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / get_dist_class

Method get_dist_class

etc/scripts/utils_thirdparty.py:615–625  ·  view source on GitHub ↗
(cls, filename)

Source from the content-addressed store, hash-verified

613
614 @classmethod
615 def get_dist_class(cls, filename):
616 if filename.endswith(".whl"):
617 return Wheel
618 elif filename.endswith(
619 (
620 ".zip",
621 ".tar.gz",
622 )
623 ):
624 return Sdist
625 raise InvalidDistributionFilename(filename)
626
627 @classmethod
628 def from_filename(cls, filename):

Callers 1

from_filenameMethod · 0.80

Calls 1

Tested by

no test coverage detected