Skip to content

Commit

Permalink
Add docstring for validate()
Browse files Browse the repository at this point in the history
  • Loading branch information
bpepple committed Jun 19, 2024
1 parent 2e0660e commit 69ddcda
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions metrontagger/validate_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ def _is_valid(self: ValidateComicInfo, schema_version: SchemaVersion) -> bool:
return xmlschema.validate(xml_doc)

def validate(self: ValidateComicInfo) -> SchemaVersion:
"""
Returns the highest valid schema version based on the given ValidateComicInfo instance.
Returns:
SchemaVersion: The highest valid schema version found.
"""

return next(
(
schema_version
Expand Down

0 comments on commit 69ddcda

Please sign in to comment.