Skip to content

Commit

Permalink
replace ISO8601Date with datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
crbaker89 committed Feb 18, 2022
1 parent 4ff4a3a commit b954ba4
Show file tree
Hide file tree
Showing 129 changed files with 452 additions and 465 deletions.
2 changes: 1 addition & 1 deletion pydantic_schemaorg/Accommodation.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Accommodation(Place):
description="The year an [[Accommodation]] was constructed. This corresponds to the [YearBuilt"
"field in RESO](https://ddwiki.reso.org/display/DDW17/YearBuilt+Field).",
)
leaseLength: Optional[Union[List[Union['Duration', 'QuantitativeValue', str]], 'Duration', 'QuantitativeValue', str]] = Field(
leaseLength: Optional[Union[List[Union['QuantitativeValue', 'Duration', str]], 'QuantitativeValue', 'Duration', str]] = Field(
default=None,
description="Length of the lease for some [[Accommodation]], either particular to some [[Offer]]"
"or in some cases intrinsic to the property.",
Expand Down
11 changes: 5 additions & 6 deletions pydantic_schemaorg/Action.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from typing import TYPE_CHECKING

from typing import List, Optional, Union
from pydantic_schemaorg.ISO8601.ISO8601Date import ISO8601Date
from datetime import time
from datetime import datetime, time


from pydantic import Field
Expand Down Expand Up @@ -40,12 +39,12 @@ class Action(Thing):
default=None,
description="For failed actions, more information on the cause of the failure.",
)
location: Optional[Union[List[Union[str, 'Text', 'VirtualLocation', 'PostalAddress', 'Place']], str, 'Text', 'VirtualLocation', 'PostalAddress', 'Place']] = Field(
location: Optional[Union[List[Union[str, 'Text', 'Place', 'VirtualLocation', 'PostalAddress']], str, 'Text', 'Place', 'VirtualLocation', 'PostalAddress']] = Field(
default=None,
description="The location of, for example, where an event is happening, where an organization is located,"
"or where an action takes place.",
)
endTime: Optional[Union[List[Union[ISO8601Date, 'DateTime', time, 'Time', str]], ISO8601Date, 'DateTime', time, 'Time', str]] = Field(
endTime: Optional[Union[List[Union[datetime, 'DateTime', time, 'Time', str]], datetime, 'DateTime', time, 'Time', str]] = Field(
default=None,
description="The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation),"
"the time that it is expected to end. For actions that span a period of time, when the action"
Expand All @@ -71,7 +70,7 @@ class Action(Thing):
default=None,
description="The object that helped the agent perform the action. e.g. John wrote a book with *a pen*.",
)
startTime: Optional[Union[List[Union[ISO8601Date, 'DateTime', time, 'Time', str]], ISO8601Date, 'DateTime', time, 'Time', str]] = Field(
startTime: Optional[Union[List[Union[datetime, 'DateTime', time, 'Time', str]], datetime, 'DateTime', time, 'Time', str]] = Field(
default=None,
description="The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation),"
"the time that it is expected to start. For actions that span a period of time, when the action"
Expand All @@ -87,9 +86,9 @@ class Action(Thing):
from pydantic_schemaorg.Organization import Organization
from pydantic_schemaorg.Person import Person
from pydantic_schemaorg.Text import Text
from pydantic_schemaorg.Place import Place
from pydantic_schemaorg.VirtualLocation import VirtualLocation
from pydantic_schemaorg.PostalAddress import PostalAddress
from pydantic_schemaorg.Place import Place
from pydantic_schemaorg.DateTime import DateTime
from pydantic_schemaorg.Time import Time
from pydantic_schemaorg.EntryPoint import EntryPoint
Expand Down
15 changes: 7 additions & 8 deletions pydantic_schemaorg/ActionAccessSpecification.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

from pydantic import AnyUrl, StrictBool
from typing import List, Optional, Union
from pydantic_schemaorg.ISO8601.ISO8601Date import ISO8601Date
from datetime import time
from datetime import date, datetime, time


from pydantic import Field
Expand All @@ -18,12 +17,12 @@ class ActionAccessSpecification(Intangible):
Model depth: 3
"""
type_: str = Field(default="ActionAccessSpecification", alias='@type', constant=True)
category: Optional[Union[List[Union[AnyUrl, 'URL', str, 'Text', 'PhysicalActivityCategory', 'Thing']], AnyUrl, 'URL', str, 'Text', 'PhysicalActivityCategory', 'Thing']] = Field(
category: Optional[Union[List[Union[AnyUrl, 'URL', str, 'Text', 'Thing', 'PhysicalActivityCategory']], AnyUrl, 'URL', str, 'Text', 'Thing', 'PhysicalActivityCategory']] = Field(
default=None,
description="A category for the item. Greater signs or slashes can be used to informally indicate a"
"category hierarchy.",
)
availabilityStarts: Optional[Union[List[Union[ISO8601Date, 'DateTime', ISO8601Date, 'Date', time, 'Time', str]], ISO8601Date, 'DateTime', ISO8601Date, 'Date', time, 'Time', str]] = Field(
availabilityStarts: Optional[Union[List[Union[datetime, 'DateTime', time, 'Time', date, 'Date', str]], datetime, 'DateTime', time, 'Time', date, 'Date', str]] = Field(
default=None,
description="The beginning of the availability of the product or service included in the offer.",
)
Expand All @@ -43,11 +42,11 @@ class ActionAccessSpecification(Intangible):
description="An Offer which must be accepted before the user can perform the Action. For example, the"
"user may need to buy a movie before being able to watch it.",
)
availabilityEnds: Optional[Union[List[Union[ISO8601Date, 'DateTime', ISO8601Date, 'Date', time, 'Time', str]], ISO8601Date, 'DateTime', ISO8601Date, 'Date', time, 'Time', str]] = Field(
availabilityEnds: Optional[Union[List[Union[datetime, 'DateTime', time, 'Time', date, 'Date', str]], datetime, 'DateTime', time, 'Time', date, 'Date', str]] = Field(
default=None,
description="The end of the availability of the product or service included in the offer.",
)
ineligibleRegion: Optional[Union[List[Union[str, 'Text', 'Place', 'GeoShape']], str, 'Text', 'Place', 'GeoShape']] = Field(
ineligibleRegion: Optional[Union[List[Union[str, 'Text', 'GeoShape', 'Place']], str, 'Text', 'GeoShape', 'Place']] = Field(
default=None,
description="The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for"
"the geo-political region(s) for which the offer or delivery charge specification is"
Expand All @@ -58,11 +57,11 @@ class ActionAccessSpecification(Intangible):
if TYPE_CHECKING:
from pydantic_schemaorg.URL import URL
from pydantic_schemaorg.Text import Text
from pydantic_schemaorg.PhysicalActivityCategory import PhysicalActivityCategory
from pydantic_schemaorg.Thing import Thing
from pydantic_schemaorg.PhysicalActivityCategory import PhysicalActivityCategory
from pydantic_schemaorg.DateTime import DateTime
from pydantic_schemaorg.Date import Date
from pydantic_schemaorg.Time import Time
from pydantic_schemaorg.Date import Date
from pydantic_schemaorg.Place import Place
from pydantic_schemaorg.GeoShape import GeoShape
from pydantic_schemaorg.Boolean import Boolean
Expand Down
4 changes: 2 additions & 2 deletions pydantic_schemaorg/AggregateOffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AggregateOffer(Offer):
Model depth: 4
"""
type_: str = Field(default="AggregateOffer", alias='@type', constant=True)
offers: Optional[Union[List[Union['Demand', 'Offer', str]], 'Demand', 'Offer', str]] = Field(
offers: Optional[Union[List[Union['Offer', 'Demand', str]], 'Offer', 'Demand', str]] = Field(
default=None,
description="An offer to provide this item—for example, an offer to sell a product, rent the"
"DVD of a movie, perform a service, or give away tickets to an event. Use [[businessFunction]]"
Expand Down Expand Up @@ -50,8 +50,8 @@ class AggregateOffer(Offer):


if TYPE_CHECKING:
from pydantic_schemaorg.Demand import Demand
from pydantic_schemaorg.Offer import Offer
from pydantic_schemaorg.Demand import Demand
from pydantic_schemaorg.Number import Number
from pydantic_schemaorg.Text import Text
from pydantic_schemaorg.Integer import Integer
4 changes: 2 additions & 2 deletions pydantic_schemaorg/Answer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class Answer(Comment):
Model depth: 4
"""
type_: str = Field(default="Answer", alias='@type', constant=True)
answerExplanation: Optional[Union[List[Union['Comment', 'WebContent', str]], 'Comment', 'WebContent', str]] = Field(
answerExplanation: Optional[Union[List[Union['WebContent', 'Comment', str]], 'WebContent', 'Comment', str]] = Field(
default=None,
description="A step-by-step or full explanation about Answer. Can outline how this Answer was achieved"
"or contain more broad clarification or statement about it.",
)


if TYPE_CHECKING:
from pydantic_schemaorg.Comment import Comment
from pydantic_schemaorg.WebContent import WebContent
from pydantic_schemaorg.Comment import Comment
4 changes: 2 additions & 2 deletions pydantic_schemaorg/ArchiveComponent.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ArchiveComponent(CreativeWork):
Model depth: 3
"""
type_: str = Field(default="ArchiveComponent", alias='@type', constant=True)
itemLocation: Optional[Union[List[Union[str, 'Text', 'PostalAddress', 'Place']], str, 'Text', 'PostalAddress', 'Place']] = Field(
itemLocation: Optional[Union[List[Union[str, 'Text', 'Place', 'PostalAddress']], str, 'Text', 'Place', 'PostalAddress']] = Field(
default=None,
description="Current location of the item.",
)
Expand All @@ -28,6 +28,6 @@ class ArchiveComponent(CreativeWork):

if TYPE_CHECKING:
from pydantic_schemaorg.Text import Text
from pydantic_schemaorg.PostalAddress import PostalAddress
from pydantic_schemaorg.Place import Place
from pydantic_schemaorg.PostalAddress import PostalAddress
from pydantic_schemaorg.ArchiveOrganization import ArchiveOrganization
6 changes: 3 additions & 3 deletions pydantic_schemaorg/AuthorizeAction.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class AuthorizeAction(AllocateAction):
Model depth: 5
"""
type_: str = Field(default="AuthorizeAction", alias='@type', constant=True)
recipient: Optional[Union[List[Union['ContactPoint', 'Audience', 'Organization', 'Person', str]], 'ContactPoint', 'Audience', 'Organization', 'Person', str]] = Field(
recipient: Optional[Union[List[Union['Organization', 'Person', 'ContactPoint', 'Audience', str]], 'Organization', 'Person', 'ContactPoint', 'Audience', str]] = Field(
default=None,
description="A sub property of participant. The participant who is at the receiving end of the action.",
)


if TYPE_CHECKING:
from pydantic_schemaorg.ContactPoint import ContactPoint
from pydantic_schemaorg.Audience import Audience
from pydantic_schemaorg.Organization import Organization
from pydantic_schemaorg.Person import Person
from pydantic_schemaorg.ContactPoint import ContactPoint
from pydantic_schemaorg.Audience import Audience
6 changes: 3 additions & 3 deletions pydantic_schemaorg/BusTrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class BusTrip(Trip):
Model depth: 4
"""
type_: str = Field(default="BusTrip", alias='@type', constant=True)
departureBusStop: Optional[Union[List[Union['BusStation', 'BusStop', str]], 'BusStation', 'BusStop', str]] = Field(
departureBusStop: Optional[Union[List[Union['BusStop', 'BusStation', str]], 'BusStop', 'BusStation', str]] = Field(
default=None,
description="The stop or station from which the bus departs.",
)
arrivalBusStop: Optional[Union[List[Union['BusStation', 'BusStop', str]], 'BusStation', 'BusStop', str]] = Field(
arrivalBusStop: Optional[Union[List[Union['BusStop', 'BusStation', str]], 'BusStop', 'BusStation', str]] = Field(
default=None,
description="The stop or station from which the bus arrives.",
)
Expand All @@ -34,6 +34,6 @@ class BusTrip(Trip):


if TYPE_CHECKING:
from pydantic_schemaorg.BusStation import BusStation
from pydantic_schemaorg.BusStop import BusStop
from pydantic_schemaorg.BusStation import BusStation
from pydantic_schemaorg.Text import Text
6 changes: 3 additions & 3 deletions pydantic_schemaorg/CDCPMDRecord.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from decimal import Decimal
from typing import List, Optional, Union
from pydantic_schemaorg.ISO8601.ISO8601Date import ISO8601Date
from datetime import date, datetime


from pydantic import Field
Expand Down Expand Up @@ -55,7 +55,7 @@ class CDCPMDRecord(StructuredValue):
description="numbeds - HOSPITAL INPATIENT BEDS: Inpatient beds, including all staffed, licensed,"
"and overflow (surge) beds used for inpatients.",
)
datePosted: Optional[Union[List[Union[ISO8601Date, 'DateTime', ISO8601Date, 'Date', str]], ISO8601Date, 'DateTime', ISO8601Date, 'Date', str]] = Field(
datePosted: Optional[Union[List[Union[datetime, 'DateTime', date, 'Date', str]], datetime, 'DateTime', date, 'Date', str]] = Field(
default=None,
description="Publication date of an online listing.",
)
Expand Down Expand Up @@ -95,7 +95,7 @@ class CDCPMDRecord(StructuredValue):
"to indicate the county. To provide other details, [[healthcareReportingData]] can"
"be used on a [[Hospital]] entry.",
)
cvdCollectionDate: Optional[Union[List[Union[ISO8601Date, 'DateTime', str, 'Text']], ISO8601Date, 'DateTime', str, 'Text']] = Field(
cvdCollectionDate: Optional[Union[List[Union[datetime, 'DateTime', str, 'Text']], datetime, 'DateTime', str, 'Text']] = Field(
default=None,
description="collectiondate - Date for which patient counts are reported.",
)
Expand Down
4 changes: 2 additions & 2 deletions pydantic_schemaorg/Class.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ class Class(Intangible):
Model depth: 3
"""
type_: str = Field(default="Class", alias='@type', constant=True)
supersededBy: Optional[Union[List[Union['Class', 'Enumeration', 'Property', str]], 'Class', 'Enumeration', 'Property', str]] = Field(
supersededBy: Optional[Union[List[Union['Property', 'Enumeration', 'Class', str]], 'Property', 'Enumeration', 'Class', str]] = Field(
default=None,
description="Relates a term (i.e. a property, class or enumeration) to one that supersedes it.",
)


if TYPE_CHECKING:
from pydantic_schemaorg.Enumeration import Enumeration
from pydantic_schemaorg.Property import Property
from pydantic_schemaorg.Enumeration import Enumeration
2 changes: 1 addition & 1 deletion pydantic_schemaorg/Clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Clip(CreativeWork):
description="A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated"
"with individual items or with a series, episode, clip.",
)
musicBy: Optional[Union[List[Union['MusicGroup', 'Person', str]], 'MusicGroup', 'Person', str]] = Field(
musicBy: Optional[Union[List[Union['Person', 'MusicGroup', str]], 'Person', 'MusicGroup', str]] = Field(
default=None,
description="The composer of the soundtrack.",
)
Expand Down
6 changes: 3 additions & 3 deletions pydantic_schemaorg/CommunicateAction.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CommunicateAction(InteractAction):
default=None,
description="A sub property of instrument. The language used on this action.",
)
recipient: Optional[Union[List[Union['ContactPoint', 'Audience', 'Organization', 'Person', str]], 'ContactPoint', 'Audience', 'Organization', 'Person', str]] = Field(
recipient: Optional[Union[List[Union['Organization', 'Person', 'ContactPoint', 'Audience', str]], 'Organization', 'Person', 'ContactPoint', 'Audience', str]] = Field(
default=None,
description="A sub property of participant. The participant who is at the receiving end of the action.",
)
Expand All @@ -39,8 +39,8 @@ class CommunicateAction(InteractAction):
if TYPE_CHECKING:
from pydantic_schemaorg.Thing import Thing
from pydantic_schemaorg.Language import Language
from pydantic_schemaorg.ContactPoint import ContactPoint
from pydantic_schemaorg.Audience import Audience
from pydantic_schemaorg.Organization import Organization
from pydantic_schemaorg.Person import Person
from pydantic_schemaorg.ContactPoint import ContactPoint
from pydantic_schemaorg.Audience import Audience
from pydantic_schemaorg.Text import Text
6 changes: 3 additions & 3 deletions pydantic_schemaorg/ContactPoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ContactPoint(StructuredValue):
Model depth: 4
"""
type_: str = Field(default="ContactPoint", alias='@type', constant=True)
areaServed: Optional[Union[List[Union[str, 'Text', 'AdministrativeArea', 'Place', 'GeoShape']], str, 'Text', 'AdministrativeArea', 'Place', 'GeoShape']] = Field(
areaServed: Optional[Union[List[Union[str, 'Text', 'Place', 'AdministrativeArea', 'GeoShape']], str, 'Text', 'Place', 'AdministrativeArea', 'GeoShape']] = Field(
default=None,
description="The geographic area where a service or offered item is provided.",
)
Expand All @@ -31,7 +31,7 @@ class ContactPoint(StructuredValue):
"codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also"
"[[inLanguage]]",
)
serviceArea: Optional[Union[List[Union['AdministrativeArea', 'Place', 'GeoShape', str]], 'AdministrativeArea', 'Place', 'GeoShape', str]] = Field(
serviceArea: Optional[Union[List[Union['Place', 'AdministrativeArea', 'GeoShape', str]], 'Place', 'AdministrativeArea', 'GeoShape', str]] = Field(
default=None,
description="The geographic area where the service is provided.",
)
Expand Down Expand Up @@ -66,8 +66,8 @@ class ContactPoint(StructuredValue):

if TYPE_CHECKING:
from pydantic_schemaorg.Text import Text
from pydantic_schemaorg.AdministrativeArea import AdministrativeArea
from pydantic_schemaorg.Place import Place
from pydantic_schemaorg.AdministrativeArea import AdministrativeArea
from pydantic_schemaorg.GeoShape import GeoShape
from pydantic_schemaorg.Language import Language
from pydantic_schemaorg.OpeningHoursSpecification import OpeningHoursSpecification
Expand Down
4 changes: 2 additions & 2 deletions pydantic_schemaorg/CookAction.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CookAction(CreateAction):
default=None,
description="A sub property of instrument. The recipe/instructions used to perform the action.",
)
foodEstablishment: Optional[Union[List[Union['Place', 'FoodEstablishment', str]], 'Place', 'FoodEstablishment', str]] = Field(
foodEstablishment: Optional[Union[List[Union['FoodEstablishment', 'Place', str]], 'FoodEstablishment', 'Place', str]] = Field(
default=None,
description="A sub property of location. The specific food establishment where the action occurred.",
)
Expand All @@ -31,6 +31,6 @@ class CookAction(CreateAction):

if TYPE_CHECKING:
from pydantic_schemaorg.Recipe import Recipe
from pydantic_schemaorg.Place import Place
from pydantic_schemaorg.FoodEstablishment import FoodEstablishment
from pydantic_schemaorg.Place import Place
from pydantic_schemaorg.FoodEvent import FoodEvent
Loading

0 comments on commit b954ba4

Please sign in to comment.