Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Fixes mypy errors in user document #250

Merged
merged 3 commits into from
Oct 5, 2023
Merged

Fixes mypy errors in user document #250

merged 3 commits into from
Oct 5, 2023

Conversation

spacether
Copy link
Contributor

@spacether spacether commented Oct 5, 2023

  • Fixes mypy errors in user document
  • petstore: component response added with headers and no body (prevents the code from using dataclass, or if it does, no defaults may be used)
  • petstore: component schema added with type object and property named key

Note:

  • mypy runs on the petstore sample
  • ApiResponse classes changed from dataclasses to vanilla classes because sometime body is before headers and sometimes it is flipped and sometimes they have defaults. Once python 3.10 is used, they can be changed back to dataclass and use kw_only=True.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    mvn clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/python*.
    For Windows users, please run the script in Git BASH.

@spacether spacether marked this pull request as draft October 5, 2023 19:07
@spacether spacether marked this pull request as ready for review October 5, 2023 19:52
@spacether spacether merged commit d491313 into master Oct 5, 2023
@spacether spacether deleted the feat_mypy_user_spec branch October 5, 2023 19:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQ][python] get user's mypy check passing with warn_redundant_casts turned on
1 participant