-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
PyYaml: uncomment commented out imports and add missing classmethod decorators #1439
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
Conversation
rytilahti
commented
Jun 26, 2017
- tests/pytype_test.py (py2 as instructed in README.md) and tests/mypy_test.py and tests/mypy_selftest.py with python3.6.1 run successfully.
- Tested against https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/util/yaml.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good apart from the Travis failure.
third_party/2and3/yaml/__init__.pyi
Outdated
# from yaml.nodes import * | ||
# from yaml.loader import * | ||
# from yaml.dumper import * | ||
from yaml.error import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try from .error import *
here (I haven't tested it though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately that doesn't help, from the sound of it flake8 doesn't like wildcard imports. Other ideas?
edit: for example, F403 'from .error import *' used; unable to detect undefined names
@JelleZijlstra clearly flake8 should ignore |
Added an ignore for those wildcards. |
Shouldn't that be a separate PR, though? |
Maybe a pr to flake8 so it ignores import * in pyi files?
…On 30 Jun 2017 11:42 pm, "Teemu R." ***@***.***> wrote:
Shouldn't that be a separate PR, though?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1439 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAZQTKc_qm6x32F6FNb3gw6ujyF5Oqarks5sJXnXgaJpZM4OF7X7>
.
|
That's not necessarily correct; I'd still want to disallow |
* python/master: Added stub for toaiff module (python#1455) Added stub for user module (python#1454) Add more multiprocessing function stubs (python#1435) PyYaml: uncomment commented out imports and add missing classmethod decorators (python#1439) Allow `os.readlink` to accept path-like objects (python#1441) Support named attributes in `os.uname()` result (python#1445) Fix signature for slite3.fetchmany (python#1444) Add __name__ field to MethodType (python#1442) Add TypedDict total argument (python#1443)
Thanks for the merge! I didn't notice it before and came here to see how to proceed :) |