Skip to content

Commit

Permalink
Run black
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelm committed Oct 4, 2024
1 parent 3ea6340 commit 84f41aa
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 21 deletions.
16 changes: 12 additions & 4 deletions drafthorse/models/delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class Meta:


class SupplyChainConsignment(Element): # TODO: Deprecated?
movement: LogisticsTransportMovement = Field(LogisticsTransportMovement, required=False, profile=EXTENDED)
movement: LogisticsTransportMovement = Field(
LogisticsTransportMovement, required=False, profile=EXTENDED
)

class Meta:
namespace = NS_RAM
Expand All @@ -49,9 +51,15 @@ class TradeDelivery(Element):
required=False,
_d="Detailinformationen zur Konsignation oder Sendung",
)
ship_to: ShipToTradeParty = Field(ShipToTradeParty, required=False, profile=EXTENDED)
ultimate_ship_to: UltimateShipToTradeParty = Field(UltimateShipToTradeParty, required=False, profile=EXTENDED)
ship_from: ShipFromTradeParty = Field(ShipFromTradeParty, required=False, profile=EXTENDED)
ship_to: ShipToTradeParty = Field(
ShipToTradeParty, required=False, profile=EXTENDED
)
ultimate_ship_to: UltimateShipToTradeParty = Field(
UltimateShipToTradeParty, required=False, profile=EXTENDED
)
ship_from: ShipFromTradeParty = Field(
ShipFromTradeParty, required=False, profile=EXTENDED
)
event: SupplyChainEvent = Field(SupplyChainEvent, required=False, profile=BASIC)
despatch_advice: DespatchAdviceReferencedDocument = Field(
DespatchAdviceReferencedDocument, required=False, profile=EXTENDED
Expand Down
4 changes: 3 additions & 1 deletion drafthorse/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ class Header(Element):
profile=EXTENDED,
_d="Indikator Original/Kopie",
)
languages: StringContainer = MultiStringField(NS_RAM, "LanguageID", required=False, profile=EXTENDED)
languages: StringContainer = MultiStringField(
NS_RAM, "LanguageID", required=False, profile=EXTENDED
)
notes: Container = MultiField(IncludedNote)
effective_period = Field(
EffectivePeriod,
Expand Down
4 changes: 3 additions & 1 deletion drafthorse/models/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

class IncludedNote(Element):
content_code = StringField(NS_RAM, "ContentCode", required=False, profile=EXTENDED)
content: StringContainer = MultiStringField(NS_RAM, "Content", required=False, profile=BASIC)
content: StringContainer = MultiStringField(
NS_RAM, "Content", required=False, profile=BASIC
)
subject_code = StringField(NS_RAM, "SubjectCode", required=False, profile=COMFORT)

class Meta:
Expand Down
8 changes: 6 additions & 2 deletions drafthorse/models/party.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ class LegalOrganization(Element):
profile=BASIC,
_d="Firmenname, sofern abweichend vom Namen",
)
trade_address: PostalTradeAddress = Field(PostalTradeAddress, required=False, profile=EXTENDED)
trade_address: PostalTradeAddress = Field(
PostalTradeAddress, required=False, profile=EXTENDED
)

class Meta:
namespace = NS_RAM
Expand Down Expand Up @@ -130,7 +132,9 @@ class TradeParty(Element):
electronic_address: Container = MultiField(
URIUniversalCommunication, required=False, profile=BASIC
)
tax_registrations: Container = MultiField(TaxRegistration, required=False, profile=BASIC)
tax_registrations: Container = MultiField(
TaxRegistration, required=False, profile=BASIC
)


class SellerTaxRepresentativeTradeParty(TradeParty):
Expand Down
12 changes: 9 additions & 3 deletions drafthorse/models/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,17 @@ class TradeProduct(Element):
)
name = StringField(NS_RAM, "Name", required=False)
description = StringField(NS_RAM, "Description", required=False, profile=COMFORT)
characteristics: Container = MultiField(ProductCharacteristic, required=False, profile=COMFORT)
classifications: Container = MultiField(ProductClassification, required=False, profile=COMFORT)
characteristics: Container = MultiField(
ProductCharacteristic, required=False, profile=COMFORT
)
classifications: Container = MultiField(
ProductClassification, required=False, profile=COMFORT
)
instance: Container = MultiField(ProductInstance, required=False, profile=EXTENDED)
origins: Container = MultiField(OriginCountry, required=False, profile=COMFORT)
included_products: Container = MultiField(ReferencedProduct, required=False, profile=EXTENDED)
included_products: Container = MultiField(
ReferencedProduct, required=False, profile=EXTENDED
)

class Meta:
namespace = NS_RAM
Expand Down
32 changes: 24 additions & 8 deletions drafthorse/models/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,31 @@ class TradeAgreement(Element):
end_user: EndUserTradeParty = Field(
EndUserTradeParty, required=False, _d="Abweichender Endverbraucher"
)
delivery_terms: DeliveryTerms = Field(DeliveryTerms, required=False, profile=EXTENDED)
seller_order: SellerOrderReferencedDocument = Field(SellerOrderReferencedDocument, required=False, profile=COMFORT)
buyer_order: BuyerOrderReferencedDocument = Field(BuyerOrderReferencedDocument, required=False)
delivery_terms: DeliveryTerms = Field(
DeliveryTerms, required=False, profile=EXTENDED
)
seller_order: SellerOrderReferencedDocument = Field(
SellerOrderReferencedDocument, required=False, profile=COMFORT
)
buyer_order: BuyerOrderReferencedDocument = Field(
BuyerOrderReferencedDocument, required=False
)
customer_order: UltimateCustomerOrderReferencedDocument = Field(
UltimateCustomerOrderReferencedDocument, required=False, profile=COMFORT
)
contract: ContractReferencedDocument = Field(ContractReferencedDocument, required=False, profile=COMFORT)
contract: ContractReferencedDocument = Field(
ContractReferencedDocument, required=False, profile=COMFORT
)
additional_references: Container = MultiField(
AdditionalReferencedDocument, required=False, profile=COMFORT
)
description = StringField(NS_RAM, "Description", required=False, profile=COMFORT)
seller_tax_representative_party: SellerTaxRepresentativeTradeParty = Field(
SellerTaxRepresentativeTradeParty, required=False
)
procuring_project_type: ProcuringProjectType = Field(ProcuringProjectType, required=False)
procuring_project_type: ProcuringProjectType = Field(
ProcuringProjectType, required=False
)

class Meta:
namespace = NS_RAM
Expand Down Expand Up @@ -179,10 +189,14 @@ class TradeSettlement(Element):
payer: PayerTradeParty = Field(
PayerTradeParty, required=False, profile=EXTENDED, _d="Zahlungspflichtiger"
)
invoice_currency: TaxApplicableTradeCurrencyExchange = Field(TaxApplicableTradeCurrencyExchange, profile=EXTENDED)
invoice_currency: TaxApplicableTradeCurrencyExchange = Field(
TaxApplicableTradeCurrencyExchange, profile=EXTENDED
)
payment_means: PaymentMeans = Field(PaymentMeans)
trade_tax: Container = MultiField(ApplicableTradeTax)
period: BillingSpecifiedPeriod = Field(BillingSpecifiedPeriod, required=False, profile=BASIC)
period: BillingSpecifiedPeriod = Field(
BillingSpecifiedPeriod, required=False, profile=BASIC
)
allowance_charge: Container = MultiField(
TradeAllowanceCharge,
required=False,
Expand All @@ -208,7 +222,9 @@ class TradeSettlement(Element):
profile=BASIC,
_d="Detailinformationen zur Buchungsreferenz",
)
advance_payment: Container = MultiField(AdvancePayment, required=False, profile=EXTENDED)
advance_payment: Container = MultiField(
AdvancePayment, required=False, profile=EXTENDED
)

class Meta:
namespace = NS_RAM
Expand Down
8 changes: 6 additions & 2 deletions drafthorse/models/tradelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ class LineDelivery(Element):
profile=EXTENDED,
_d="Anzahl Packstücke",
)
ship_to: ShipToTradeParty = Field(ShipToTradeParty, required=False, profile=EXTENDED)
ship_to: ShipToTradeParty = Field(
ShipToTradeParty, required=False, profile=EXTENDED
)
ultimate_ship_to: UltimateShipToTradeParty = Field(
UltimateShipToTradeParty, required=False, profile=EXTENDED
)
Expand Down Expand Up @@ -162,7 +164,9 @@ class LineSettlement(Element):
required=False,
_d="Schalter für Zu-/Abschlag",
)
monetary_summation: LineSummation = Field(LineSummation, required=False, profile=BASIC)
monetary_summation: LineSummation = Field(
LineSummation, required=False, profile=BASIC
)
invoice_referenced_document: InvoiceReferencedDocument = Field(
InvoiceReferencedDocument, required=False, profile=EXTENDED
)
Expand Down

0 comments on commit 84f41aa

Please sign in to comment.