Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] disallow_untyped_defs #81

Closed
wants to merge 2 commits into from

Conversation

jmelahman
Copy link
Contributor

My best attempt at partly addressing #48. This types all functions in pybuildkite/.

I did this manually, so there might be some slightly incorrect types. Also, there are at least 3 # TODO: Bad Any. I most didn't feel like addressing. Sorry.

Also, this will most likely conflict with #80.

_QueryParams: TypeAlias = requests.sessions._Params

_HeadersMapping: TypeAlias = Dict[str, Any] # TODO: Bad Any.
RequestResponse: TypeAlias = Response | bool | Any | Iterator[Any] | bytes
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is probably the most important type and unfortunately because request() can return response.json() which is an Any (at least that's what typeshed specifies), this explicitly includes or Any making it basically useless :/. Not sure if it'll resolve the issue, but might be worthy of a refactor.

@jmelahman
Copy link
Contributor Author

Also, I'm dev'ing this in 3.10. I tried to be <3.8 safe by using the from __future__ import annotations when necessary, but at a glance, looks like I missed a handful. Will need to follow up after testing in earlier versions some more.

@jmelahman
Copy link
Contributor Author

@pyasi any update here?

@jmelahman jmelahman closed this Apr 22, 2023
@aviator-app
Copy link

aviator-app bot commented Apr 22, 2023

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was closed without merging. If you still want to merge this PR, re-open it.

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.

None yet

1 participant