Skip to content

Commit

Permalink
🚨 Fix empty list guard.
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed Jun 9, 2024
1 parent 13f37ac commit fdccaae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions ozi/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def score_file(count: Counter[str]) -> float:
"""
return score(count)


def score(count: Counter[str]) -> float: # pragma: no cover
"""Score a single comment diagnostic.
Expand Down
4 changes: 2 additions & 2 deletions ozi/new/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ def valid_contact_info( # noqa: C901
'Author and Maintainer are identical',
'Maintainer should be empty',
)
elif len(maintainer) and not len(author):
elif len(maintainer) and not author:
TAP.not_ok('Maintainer', 'provided without setting Author')
elif len(maintainer) and len(author):
TAP.ok('Author and Maintainer provided.')
elif author_and_maintainer_email and not len(maintainer):
elif author_and_maintainer_email and not maintainer:
TAP.not_ok( # pragma: defer to good issue
'Maintainer-Email',
'expected Maintainer name missing',
Expand Down
1 change: 1 addition & 0 deletions ozi/spec/_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def current_version() -> str:
version_ = str(get_version(root='..', relative_to=__file__))
return version_


@dataclass(slots=True, frozen=True, eq=True)
class Spec(Default):
"""OZI Specification metadata."""
Expand Down

0 comments on commit fdccaae

Please sign in to comment.