python: ignore long lines for model descriptions (#16518)

Descriptions can easily exceed line-length limits because they are often
extracted from doc/comments strings, which may use unexpected formatting.

Python doc strings, in particular, are likely to use newlines, which mustache
does not preserve, causing descriptions to be condensed to a single line.
This commit is contained in:
jessemyers-lettuce
2023-09-05 19:48:43 -07:00
committed by GitHub
parent 0192baed42
commit b34a10aee7
16 changed files with 17 additions and 17 deletions

View File

@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictStr
class ClassModel(BaseModel):
"""
Model for testing model with \"_class\" property
Model for testing model with \"_class\" property # noqa: E501
"""
var_class: Optional[StrictStr] = Field(None, alias="_class")
__properties = ["_class"]

View File

@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictStr
class File(BaseModel):
"""
Must be named `File` for test.
Must be named `File` for test. # noqa: E501
"""
source_uri: Optional[StrictStr] = Field(None, alias="sourceURI", description="Test capitalization")
__properties = ["sourceURI"]

View File

@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictStr
class HealthCheckResult(BaseModel):
"""
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. # noqa: E501
"""
nullable_message: Optional[StrictStr] = Field(None, alias="NullableMessage")
__properties = ["NullableMessage"]

View File

@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictInt, StrictStr
class Model200Response(BaseModel):
"""
Model for testing model name starting with number
Model for testing model name starting with number # noqa: E501
"""
name: Optional[StrictInt] = None
var_class: Optional[StrictStr] = Field(None, alias="class")

View File

@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictInt
class ModelReturn(BaseModel):
"""
Model for testing reserved words
Model for testing reserved words # noqa: E501
"""
var_return: Optional[StrictInt] = Field(None, alias="return")
__properties = ["return"]

View File

@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictInt, StrictStr
class Name(BaseModel):
"""
Model for testing model name same as property name
Model for testing model name same as property name # noqa: E501
"""
name: StrictInt = Field(...)
snake_case: Optional[StrictInt] = None

View File

@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictBool
class ObjectToTestAdditionalProperties(BaseModel):
"""
Minimal object
Minimal object # noqa: E501
"""
var_property: Optional[StrictBool] = Field(False, alias="property", description="Property")
__properties = ["property"]