Skip to content

Typing: always fill in generic type parameters - #2468

Merged
lovelydinosaur merged 5 commits into
encode:masterfrom
adriangb:fill-in-generics
Nov 29, 2022
Merged

lovelydinosaur merged 5 commits into
encode:masterfrom
adriangb:fill-in-generics

Conversation

@adriangb

Copy link
Copy Markdown
Contributor

Being explicit about the parameters helps find bugs and makes the library easier to use for users.

  • Tell mypy to disallow generics without parameter values
  • Give all generic types parameters values

Being explicit about the parameters helps find bugs and makes the library
easier to use for users.

- Tell mypy to disallow generics without parameter values
- Give all generic types parameters values
@adriangb adriangb mentioned this pull request Nov 29, 2022

@lovelydinosaur lovelydinosaur left a comment

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.

Mixed feelings about bits where the typing becomes super verbose, but... sure. 🤷‍♂️

@lovelydinosaur
lovelydinosaur merged commit 1b4e7fb into encode:master Nov 29, 2022
@adriangb
adriangb deleted the fill-in-generics branch November 29, 2022 16:36
samclearman pushed a commit to titanmsp/httpx that referenced this pull request Apr 26, 2025
* Typing: always fill in generic type parameters

Being explicit about the parameters helps find bugs and makes the library
easier to use for users.

- Tell mypy to disallow generics without parameter values
- Give all generic types parameters values

* fix things that aren't coming in from other commits

* lint

Co-authored-by: Martijn Pieters <mj@zopatista.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants