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 missing aiofiles.tempfile classes #7523

Merged
merged 14 commits into from Jul 5, 2022

Conversation

andrewshadura
Copy link
Contributor

I was trying to add missing aiofiles.tempfile classes, but I ran into this issue:

error: not checking stubs due to mypy build errors:
stubs/aiofiles/aiofiles/tempfile/__init__.pyi:132: error: Overloaded function signatures 1 and 2 overlap with incompatible return types
stubs/aiofiles/aiofiles/tempfile/__init__.pyi:132: error: Overloaded function signatures 1 and 3 overlap with incompatible return types
stubs/aiofiles/aiofiles/tempfile/__init__.pyi:132: error: Overloaded function signatures 1 and 4 overlap with incompatible return types
stubs/aiofiles/aiofiles/tempfile/__init__.pyi:146: error: Overloaded function signatures 2 and 3 overlap with incompatible return types
stubs/aiofiles/aiofiles/tempfile/__init__.pyi:146: error: Overloaded function signatures 2 and 4 overlap with incompatible return types

I’m not sure how to proceed from here.

This will fix: #6524

Fixes: python#6524

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

The warnings can be suppresed with # type: ignore[misc] on the affected lines. I noticed one more thing for now.

stubs/aiofiles/aiofiles/tempfile/__init__.pyi Outdated Show resolved Hide resolved
@github-actions

This comment has been minimized.

@AlexWaygood
Copy link
Member

There's a lot of pyright errors due to various parameters not being annotated. Ideally we'd obviously annotate these, obviously, but for now we could also maybe just add specific files to the allowlist in pyrightconfig.stricter.json:

"exclude": [
"**/@python2",
"stdlib/distutils/command",
"stdlib/lib2to3/refactor.pyi",
"stdlib/multiprocessing/reduction.pyi",
"stdlib/sqlite3/dbapi2.pyi",
"stdlib/_tkinter.pyi",
"stdlib/tkinter",
"stdlib/xml/dom/NodeFilter.pyi",
"stdlib/xml/dom/expatbuilder.pyi",
"stdlib/xml/dom/minidom.pyi",
"stdlib/xml/dom/pulldom.pyi",
"stdlib/xml/sax",
"stubs/aws-xray-sdk",
"stubs/babel",
"stubs/backports.ssl_match_hostname",
"stubs/bleach",
"stubs/boto",
"stubs/beautifulsoup4",
"stubs/braintree",
"stubs/caldav",
"stubs/commonmark",
"stubs/cryptography",
"stubs/dateparser",
"stubs/docutils",
"stubs/Flask-SQLAlchemy",
"stubs/fpdf2",
"stubs/html5lib",
"stubs/httplib2",
"stubs/humanfriendly",
"stubs/invoke",
"stubs/jmespath",
"stubs/jsonschema",
"stubs/ldap3",
"stubs/Markdown",
"stubs/mock",
"stubs/mysqlclient",
"stubs/oauthlib",
"stubs/openpyxl",
"stubs/Pillow",
"stubs/paramiko",
"stubs/prettytable",
"stubs/protobuf",
"stubs/google-cloud-ndb",
"stubs/passlib",
"stubs/pep8-naming",
"stubs/psutil",
"stubs/psycopg2",
"stubs/pyflakes",
"stubs/Pygments",
"stubs/PyMySQL",
"stubs/python-dateutil",
"stubs/python-jose",
"stubs/pyvmomi",
"stubs/PyYAML",
"stubs/redis",
"stubs/requests",
"stubs/selenium",
"stubs/Send2Trash",
"stubs/setuptools",
"stubs/simplejson",
"stubs/slumber",
"stubs/SQLAlchemy",
"stubs/stripe",
"stubs/ttkthemes",
"stubs/urllib3",
"stubs/vobject"
],

@github-actions

This comment has been minimized.

@AlexWaygood AlexWaygood changed the title WIP: Add missing aiofiles.tempfile classes Add missing aiofiles.tempfile classes Jul 2, 2022
@github-actions

This comment has been minimized.

@AlexWaygood AlexWaygood requested a review from srittau July 2, 2022 15:45
stubs/aiofiles/aiofiles/tempfile/__init__.pyi Outdated Show resolved Hide resolved
stubs/aiofiles/aiofiles/tempfile/__init__.pyi Outdated Show resolved Hide resolved
stubs/aiofiles/aiofiles/tempfile/temptypes.pyi Outdated Show resolved Hide resolved
@AlexWaygood AlexWaygood marked this pull request as draft July 4, 2022 15:17
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@AlexWaygood AlexWaygood marked this pull request as ready for review July 5, 2022 21:17
@github-actions

This comment has been minimized.

@AlexWaygood AlexWaygood requested a review from srittau July 5, 2022 21:26
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2022

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit 043d9da into python:master Jul 5, 2022
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.

aiofiles 0.8.0 compatibility (i.e. aiofiles.os.path.* wrapped functions)
3 participants