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 hints to test_formparsers.py #2480

Merged
merged 8 commits into from
Feb 6, 2024

Conversation

TechNiick
Copy link
Contributor

Summary

Related to this
Type annotation added to test_formparsers.py

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

def test_multipart_request_with_charset_for_filename(tmpdir, test_client_factory):
def test_multipart_request_with_charset_for_filename(
tmpdir: Path,
test_client_factory: typing.Any,
Copy link
Member

Choose a reason for hiding this comment

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

Why Any on those?

def test_too_many_files_and_fields_raise(app, expectation, test_client_factory):
def test_too_many_files_and_fields_raise(
app: ASGIApp,
expectation: typing.ContextManager[TestCase],
Copy link
Member

Choose a reason for hiding this comment

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

I don't think TestCase is the right type here... 👀

@TechNiick TechNiick changed the title Added type annotations to test_formparsers.py Added type hints to test_formparsers.py Feb 4, 2024
@TechNiick TechNiick requested a review from Kludex February 6, 2024 20:14
@TechNiick TechNiick changed the title Added type hints to test_formparsers.py Add type hints to test_formparsers.py Feb 6, 2024
tests/test_formparsers.py Outdated Show resolved Hide resolved
tests/test_formparsers.py Outdated Show resolved Hide resolved
tests/test_formparsers.py Outdated Show resolved Hide resolved
tests/test_formparsers.py Outdated Show resolved Hide resolved
tests/test_formparsers.py Outdated Show resolved Hide resolved
tests/test_formparsers.py Outdated Show resolved Hide resolved
tests/test_formparsers.py Outdated Show resolved Hide resolved
tests/test_formparsers.py Outdated Show resolved Hide resolved
tests/test_formparsers.py Outdated Show resolved Hide resolved
tests/test_formparsers.py Outdated Show resolved Hide resolved
@Kludex Kludex enabled auto-merge (squash) February 6, 2024 21:59
@Kludex Kludex merged commit c811ebd into encode:master Feb 6, 2024
5 checks passed
nixroxursox pushed a commit to nixroxursox/starlette that referenced this pull request Mar 18, 2024
* added type annotations to test_formparsers.py

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: Scirlat Danut <[email protected]>
Co-authored-by: Marcelo Trylesinski <[email protected]>
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