From 880887029046cc13bfadb3eef8f35add010c1d88 Mon Sep 17 00:00:00 2001 From: Bot Date: Thu, 3 Aug 2023 13:59:00 +0000 Subject: [PATCH] Automated Black fmt fixes Signed-off-by: Bot --- pydantic/langPack.py | 18 ++++++++++-------- pydantic/schema_header.py | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pydantic/langPack.py b/pydantic/langPack.py index a3aa8660..86236568 100644 --- a/pydantic/langPack.py +++ b/pydantic/langPack.py @@ -68,11 +68,13 @@ def _set_instances(text, render): def _lower_case_first_char(str): - return str[:1].lower() + str[1:] if str else '' + return str[:1].lower() + str[1:] if str else "" + def _set_lower_case(text, render): return _lower_case_first_char(render(text)) + # called by chevron, text contains the label {{dataType}}, which is evaluated by the renderer (see class template) def _set_attribute(text, render): attribute = eval(render(text)) @@ -99,19 +101,19 @@ def _set_default(attribute): if multiplicity in ["M:1"] and multiplicity_by_name: # Most probably there is a bug in the RDF that states multiplicity # M:1 but should be M:1..N - return ' = Field(default=[], alias="'+attribute["label"]+'")' + return ' = Field(default=[], alias="' + attribute["label"] + '")' if multiplicity in ["M:1", "M:1..1"]: - return ' = Field(alias="'+attribute["label"]+'")' + return ' = Field(alias="' + attribute["label"] + '")' if multiplicity in ["M:0..1"]: - return ' = Field(default=None, alias="'+attribute["label"]+'")' + return ' = Field(default=None, alias="' + attribute["label"] + '")' elif multiplicity in ["M:0..n"] or "M:0.." in multiplicity: - return ' = Field(default=[], alias="'+attribute["label"]+'")' + return ' = Field(default=[], alias="' + attribute["label"] + '")' elif multiplicity in ["M:1..n"] or "M:1.." in multiplicity: - return ' = Field(default=[], alias="'+attribute["label"]+'")' + return ' = Field(default=[], alias="' + attribute["label"] + '")' else: - return ' = Field(default=[], alias="'+attribute["label"]+'")' + return ' = Field(default=[], alias="' + attribute["label"] + '")' else: - return ' = Field(alias="'+attribute["label"]+'")' + return ' = Field(alias="' + attribute["label"] + '")' def _is_primitive(datatype): diff --git a/pydantic/schema_header.py b/pydantic/schema_header.py index c6ea5b41..36bfca7a 100644 --- a/pydantic/schema_header.py +++ b/pydantic/schema_header.py @@ -45,7 +45,7 @@ class PositionPoint(Base): } ) - location: "Location" = Field(alias = "Location") + location: "Location" = Field(alias="Location") sequenceNumber: Optional[int] = Field(default=None) point: Point = Field( repr=False