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

Add type hint to src/urllib3/request.py #2202

Merged
merged 4 commits into from
May 7, 2021

Conversation

hramezani
Copy link
Member

@hramezani hramezani commented Apr 23, 2021

Related to: #1897

@codecov
Copy link

codecov bot commented Apr 23, 2021

Codecov Report

Merging #2202 (93e019c) into main (3346a2a) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main     #2202   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         2289      2290    +1     
=========================================
+ Hits          2289      2290    +1     
Impacted Files Coverage Δ
src/urllib3/request.py 100.00% <100.00%> (ø)
src/urllib3/util/request.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3346a2a...93e019c. Read the comment docs.

src/urllib3/request.py Outdated Show resolved Hide resolved
src/urllib3/request.py Outdated Show resolved Hide resolved
Copy link
Member

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

One thought on how to resolve a # type: ignore

src/urllib3/request.py Outdated Show resolved Hide resolved
@hramezani
Copy link
Member Author

@SethMichaelLarson anything to do?

Copy link
Member

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

Last two changes then we're good to ship!

headers: Optional[Mapping[str, str]] = None,
encode_multipart: bool = True,
multipart_boundary: Optional[str] = None,
**kw: str,
Copy link
Member

Choose a reason for hiding this comment

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

Are these really str? I feel like we should use Any for **kw and **urlopen_kw?

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed!

src/urllib3/request.py Outdated Show resolved Hide resolved
Copy link
Member

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

@hramezani I made one change and I think this looks good now. Let me know if this works for you and if you see any issues with my change, if not I can merge this :)

@hramezani
Copy link
Member Author

@hramezani I made one change and I think this looks good now. Let me know if this works for you and if you see any issues with my change, if not I can merge this :)

@sethmlarson Thanks! looks good to me as well.

@sethmlarson sethmlarson merged commit bf09461 into urllib3:main May 7, 2021
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

2 participants