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

Improve typings in multipart #3622

Closed
wants to merge 3 commits into from
Closed

Improve typings in multipart #3622

wants to merge 3 commits into from

Conversation

kornicameister
Copy link
Contributor

Adjusts typings to match the documentation.

No, those were just typings improvements.
I've changed the code in one place but those changes were limited to:

  • using (IMHO) more appropriate looping technique
  • accounting for changed typins

#3621

No

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

@kornicameister
Copy link
Contributor Author

About non changing the user behavior. There's one place that I am not particularly sure of. It is the place around assert field_content_type is not None. I suppose that's having something with the typing. Unfortunately the FileField expects is set, so I though that if anything goes wrong there and content_type is actually None is is best to throw the processing out.

@kornicameister
Copy link
Contributor Author

@asvetlov is this still needed by any means?

@asvetlov
Copy link
Member

  1. The PR doesn't pass CI tests. I don't review such PRs usually.
  2. Please keep while loop in web_request.py. I agree that async for would be better but the change introduces a big hard-to-review diff without strong reason.

@kornicameister
Copy link
Contributor Author

Ok, @asvetlov that sounds like a plan. I will close this PR and first resolve the typings issue and then make a PR with async for given that it is doable to these changes in separation. I don't remember what was the deal with adding async for, but for sure I have done that for some reason.

Anyway, I will try to deal with typings first.

PS. sorry for not dealing with CI first.

@kornicameister
Copy link
Contributor Author

Closing now

@kornicameister kornicameister deleted the typings_multipart branch July 15, 2019 05:42
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