-
Notifications
You must be signed in to change notification settings - Fork 68
[PTDT-2863]: Feature schema attributes #1930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
9131d21
a58ce6c
81fb2f4
0e06806
eb16f04
6c3fc0e
488a02b
e22265f
a8e8911
d95092f
10e9ce2
ac91b9a
acf4f18
6082463
d4d9896
44e05c4
8769293
6824e0f
5ed769c
f0dfa74
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
from typing import Annotated | ||
from typing import Annotated, List | ||
from pydantic import Field, BaseModel | ||
from typing import TypedDict | ||
|
||
from pydantic import Field | ||
|
||
class FeatureSchemaAttribute(TypedDict): | ||
attributeName: str | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we make this into a data class? We already use Pydantic and dataclasses, so adding another paradigm feels unnecessary. Also, I’ve found TypedDict has quirks that make it less reliable. Personally, I treat it as a temporary internal type. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done 👍 |
||
attributeValue: str | ||
|
||
|
||
FeatureSchemaAttriubte = Annotated[FeatureSchemaAttribute, Field()] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FeatureSchemaAttriubte - typo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes ty, fixed |
||
FeatureSchemaId = Annotated[str, Field(min_length=25, max_length=25)] | ||
SchemaId = Annotated[str, Field(min_length=25, max_length=25)] | ||
FeatureSchemaAttributes = Annotated[ | ||
List[FeatureSchemaAttribute], Field(default_factory=list) | ||
vbrodsky marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] |
Uh oh!
There was an error while loading. Please reload this page.