Skip to content

Commit

Permalink
revert: time_series_type to type_
Browse files Browse the repository at this point in the history
  • Loading branch information
doctrino committed Nov 12, 2024
1 parent fc5d79c commit 599999e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions cognite/pygen/_core/models/fields/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import warnings
from dataclasses import dataclass
from string import digits
from typing import TYPE_CHECKING, Literal, TypeVar, cast

from cognite.client.data_classes import data_modeling as dm
Expand Down Expand Up @@ -67,12 +66,7 @@ def from_property(

field_naming = config.naming.field
name = create_name(prop_id, field_naming.name)
if name in {"type", "version"}:
# Special handling for reserved words
prop_view_id = _get_prop_view_id(prop_id, view_id, view_by_id)
prefix = prop_view_id.external_id.removeprefix("Cognite").removeprefix("3D").lstrip(digits)
name = create_name(f"{prefix}_{name}", field_naming.name)
elif is_reserved_word(name, "field", view_id, prop_id):
if is_reserved_word(name, "field", view_id, prop_id):
name = f"{name}_"

doc_name = to_words(name, singularize=True)
Expand Down

0 comments on commit 599999e

Please sign in to comment.