Skip to content

Commit 7b5cf8c

Browse files
Remove recognize function from package class
Removes recognize function from Package Class, since the recognize function is now at PackageManifest class and this isn't used anywhere. Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent b5196ff commit 7b5cf8c

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

src/packagedcode/models.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -553,16 +553,6 @@ def __attrs_post_init__(self, *args, **kwargs):
553553
if not self.primary_language and hasattr(self, 'default_primary_language'):
554554
self.primary_language = self.default_primary_language
555555

556-
@classmethod
557-
def recognize(cls, location):
558-
"""
559-
Yield one or more Package objects given a file location pointing to a
560-
package archive, manifest or similar.
561-
562-
Sub-classes should override to implement their own package recognition.
563-
"""
564-
raise NotImplementedError
565-
566556
@classmethod
567557
def get_package_root(cls, manifest_resource, codebase):
568558
"""
@@ -709,7 +699,7 @@ def package_manifest_type(self):
709699

710700
@classmethod
711701
def manifest_type(cls):
712-
return cls.__module__+"."+cls.__qualname__
702+
return f"{cls.__module__}.{cls.__qualname__}"
713703

714704
@classmethod
715705
def is_manifest(cls, location):
@@ -764,7 +754,7 @@ def is_manifest(cls, location):
764754
@classmethod
765755
def recognize(cls, location):
766756
"""
767-
Yield one or more Package manifest objects given a file at `location`
757+
Yield one or more PackageManifest objects given a file at `location`
768758
pointing to a package archive, manifest or similar.
769759
770760
Sub-classes should override to implement their own package recognition and creation.

0 commit comments

Comments
 (0)