Skip to content

Commit

Permalink
Fix docstrings 522
Browse files Browse the repository at this point in the history
Reference: #522
Signed-off-by: John M. Horan <[email protected]>
  • Loading branch information
johnmhoran committed Oct 1, 2024
1 parent 7cbcc75 commit a4d18ca
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packagedb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from collections import OrderedDict
from urllib.parse import urlencode

import natsort
from dateutil.parser import parse as dateutil_parse
from django.conf import settings
from django.contrib.auth.models import UserManager
from django.contrib.postgres.fields import ArrayField
Expand All @@ -26,9 +28,6 @@
from django.dispatch import receiver
from django.utils import timezone
from django.utils.translation import gettext_lazy as _

import natsort
from dateutil.parser import parse as dateutil_parse
from licensedcode.cache import build_spdx_license_expression
from packagedcode.models import normalize_qualifiers
from packageurl import PackageURL
Expand Down Expand Up @@ -97,7 +96,9 @@ class PurlValidateErrorSerializer(Serializer):

def search(self, query: str = None):
"""
Return a Package queryset searching for the ``query``. A version is required. Returns an exact match if the record(s) exist(s), otherwise no match.
Return a Package queryset searching for the ``query``. A version is
required. Returns an exact match if the record(s) exist(s), otherwise
no match.
"""
query = query and query.strip()
if not query:
Expand Down Expand Up @@ -150,9 +151,7 @@ def search(self, query: str = None):
return qs

def get_packageurl_from_string(self, query: str = None):
"""
Vet with packageurl-python __init__.py from_string().
"""
"""Vet with packageurl-python __init__.py from_string()."""
query = query and query.strip()
if not query:
return self.none()
Expand Down

0 comments on commit a4d18ca

Please sign in to comment.