Skip to content

Commit

Permalink
making Optionals default to None has made it easier to subclass PR2Ta…
Browse files Browse the repository at this point in the history
…xon using Taxon, less redundant fields
  • Loading branch information
chrisAta committed Jan 9, 2025
1 parent b15531c commit 806b59c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mgnify_pipelines_toolkit/schemas/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,13 @@ class Taxon(BaseModel):
Species: Optional[TaxRank] = None


class PR2Taxon(BaseModel):
class PR2Taxon(Taxon):
"""Class for modelling the same thing as the preceding class, but for PR2 ranks."""

Domain: Optional[TaxRank] = None
Supergroup: Optional[TaxRank] = None
Division: Optional[TaxRank] = None
Subdivision: Optional[TaxRank] = None
Class: Optional[TaxRank] = None
Order: Optional[TaxRank] = None
Family: Optional[TaxRank] = None
Genus: Optional[TaxRank] = None
Species: Optional[TaxRank] = None


class TaxonRecord(Taxon):
Expand Down

0 comments on commit 806b59c

Please sign in to comment.