Skip to content

Convert Article, PDF, and Summary to use dataclasses#3

Merged
jparise merged 1 commit into
Instapaper:mainfrom
jparise:dataclasses
Mar 28, 2026
Merged

Convert Article, PDF, and Summary to use dataclasses#3
jparise merged 1 commit into
Instapaper:mainfrom
jparise:dataclasses

Conversation

@jparise

@jparise jparise commented Feb 15, 2026

Copy link
Copy Markdown
Member

This also changes their initialization behavior: we now use keyword arguments that map to their typed fields. This moves some of the work to the Client, but that's appropriate because it understands the shape of the response objects.

This also lets us remove a number of tests cases because they were just asserting the dataclass field values we were providing.

@jparise jparise force-pushed the dataclasses branch 2 times, most recently from 808dc4c to 70fcd7c Compare March 28, 2026 19:12
@jparise jparise changed the title Use datablasses to API model structures Use datablasses for API model structures Mar 28, 2026
This also changes their initialization behavior: we now use keyword
arguments that map to their typed fields. This moves some of the work to
the Client, but that's appropriate because it understands the shape of
the response objects.

This also lets us remove a number of tests cases because they were just
asserting the dataclass field values we were providing.
@jparise jparise changed the title Use datablasses for API model structures Convert Article, PDF, and Summary to use dataclasses Mar 28, 2026
@jparise jparise requested a review from Donohue March 28, 2026 19:26

@Donohue Donohue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nicely done!

@jparise jparise merged commit 737f132 into Instapaper:main Mar 28, 2026
6 checks passed
@jparise jparise deleted the dataclasses branch March 28, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants