Skip to content

Action Return TypeDicts - #240

Open
JVickery-TBS wants to merge 5 commits into
canada-releasefrom
feature/action-result-typing
Open

JVickery-TBS wants to merge 5 commits into
canada-releasefrom
feature/action-result-typing

Conversation

@JVickery-TBS

Copy link
Copy Markdown

idk if this is right or not? I tried to just go off of the default schemas

JVickery-TBS and others added 2 commits October 16, 2026 11:15
- Added type classes.
- Added change log file.
@wardi

wardi commented Nov 6, 2026

Copy link
Copy Markdown
Member

I would put these in types/__init__.py. They aren't just action results, they're core data structures that are used everywhere in CKAN.

- Added change log file.
- Added change log file.
@JVickery-TBS

Copy link
Copy Markdown
Author

@wardi stuff is moved now to typing/__init__.py if u want to do another gander

Comment thread ckan/types/__init__.py
value: Required[Any]
state: str
deleted: bool
revision_timestamp: DateTime

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: extras dicts have gone away upstream

Comment thread ckan/types/__init__.py
Comment on lines +297 to +299
class ResourceShowDict(TypedDict, total=False):
'''
Dictionary returned from the resource_show action.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class ResourceShowDict(TypedDict, total=False):
'''
Dictionary returned from the resource_show action.
class ResourceDict(TypedDict, total=False):
'''
Dictionary returned from the resource_show and passed to resource_create/resource_update actions

Comment thread ckan/types/__init__.py
tracking_summary: TrackingSummaryDict


class PackageShowDict(TypedDict, total=False):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class PackageShowDict(TypedDict, total=False):
class PackageDict(TypedDict, total=False):

Comment thread ckan/types/__init__.py
capacity: str


class OrganizationShowDict(TypedDict, total=False):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class OrganizationShowDict(TypedDict, total=False):
class OrganizationDict(TypedDict, total=False):

@wardi

wardi commented Nov 6, 2026

Copy link
Copy Markdown
Member

otherwise LGTM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants