Skip to content

Add empty stubs for xml.dom.* modules. #3856

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

Merged
merged 1 commit into from
Mar 27, 2020
Merged

Conversation

Flameeyes
Copy link
Contributor

@Flameeyes Flameeyes commented Mar 17, 2020

While this does not add any interface in the modules, it tells mypy that
the modules exist, which is a starting point.

@srittau
Copy link
Collaborator

srittau commented Mar 17, 2020

Not merging for now, since it conflicts with #3852.

Also, empty files should instead have a top-level __getattr__ definition per our CONTRIBUTING file:

def __getattr__(name: str) -> Any: ...  # incomplete

@Flameeyes
Copy link
Contributor Author

Flameeyes commented Mar 17, 2020 via email

@srittau
Copy link
Collaborator

srittau commented Mar 17, 2020

The PR is fine for minidom.pyi and pulldom.pyi, just __init__.pyi conflicts.

@Flameeyes
Copy link
Contributor Author

Removed the __init__.pyi file and updated the empty stubs.

It's not clear to me if the __init__ is needed for this, but worse case I guess I'll wait for #3852 and then fast-forward this request.

@JelleZijlstra
Copy link
Member

You still need to add the __getattr__ to the empty files.

@Flameeyes
Copy link
Contributor Author

Yeah I was waiting to hear on whether I should need for the other one. Added now though.

While this does not add any interface in the modules, it tells mypy that
the modules _exist_, which is a starting point.
@Flameeyes
Copy link
Contributor Author

Is it good to go now?

@srittau
Copy link
Collaborator

srittau commented Mar 26, 2020

Looks good, still waiting for #3852, though, since that adds the __init__.pyi file. @jermenkoo

@jermenkoo
Copy link
Contributor

I'll update the PR today!

@srittau srittau merged commit 71804c3 into python:master Mar 27, 2020
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.

4 participants