PyYaml: uncomment commented out imports and add missing classmethod decorators#1439
PyYaml: uncomment commented out imports and add missing classmethod decorators#1439JelleZijlstra merged 3 commits intopython:masterfrom rytilahti:master
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
JelleZijlstra
left a comment
There was a problem hiding this comment.
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.
try from .error import * here (I haven't tested it though)
There was a problem hiding this comment.
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 :) |