Skip to content

State Version models are not imported #94

@ibm-richard

Description

@ibm-richard

python-tfe version

0.1.2

Description

the associated models for reading State Versions are not included in the __init__ file for /models and it results in an error when trying to read a State version

Testing plan

Traceback (most recent call last):
  File "/Users/richardboyd/Developer/hcp-200/./gadgets/evaluate_run/scratch.py", line 4, in <module>
    from pytfe.models import (
    ...<2 lines>...
    )
ImportError: cannot import name 'StateVersionCurrentOptions' from 'pytfe.models' (/Users/richardboyd/Developer/hcp-200/.venv/lib/python3.14/site-packages/pytfe/models/__init__.py)

adding this to __init__.py resolved the issue

from .state_version import (
    StateVersion,
    StateVersionCreateOptions,
    StateVersionCurrentOptions,
    StateVersionList,
    StateVersionListOptions,
    StateVersionReadOptions,
)

from .state_version_output import (
    StateVersionOutput,
    StateVersionOutputsList,
    StateVersionOutputsListOptions,
)
...
__all__ = [
    ...
    "StateVersion",
    "StateVersionCreateOptions",
    "StateVersionCurrentOptions",
    "StateVersionList",
    "StateVersionListOptions",
    "StateVersionReadOptions",
    "StateVersionOutput",
    "StateVersionOutputsList",
    "StateVersionOutputsListOptions",

Expected Behavior

import errors should not occuer

Actual Behavior

import error when trying to use the StateVersion models

Additional Context

N/A

Metadata

Metadata

Labels

bugSomething isn't workingwipwork in progress

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions