Commit Graph

22 Commits

Author SHA1 Message Date
Steve Dignam
49e5b528dc Add more type hints for pyyaml (#6265) 2021-11-12 12:23:58 +01:00
Sebastian Rittau
4e592ada7b Upgrade PyYAML to version 6 (#6183)
* Fix load_all() argument
* Remove Python 2 remnants
  + Replace Text with str
  + Replace alias "_Str" with str
  + Import from collections.abc and re where applicable
  + Remove Python 2 branches
* Fix PyYaml allowlist entries
  + Add yaml._yaml and move CParser and CEmitter there.
  + Add missing functions, classes, and arguments.
* Use relative imports in some modules.
* Add __all__ to yaml.cyaml.
* Remove unnecessary noqa markers.
2021-10-22 20:05:58 +02:00
Akuli
994b69ef8f Use lowercase tuple where possible (#6170) 2021-10-14 17:18:19 -07:00
Sebastian Rittau
9f86972350 Add star to all non-0.1 versions (#6146) 2021-10-11 13:41:19 -07:00
Akuli
6307bfd421 Delete yaml.CDangerLoader and yaml.CDangerDumper (#5990)
These no longer exist in PyYAML 4.2.
2021-09-01 10:50:30 +03:00
Ashley Whetter
026405b014 Add C{Full,Unsafe}Loader and UnsafeConstructor (#5988) 2021-09-01 00:50:31 +02:00
JP Sugarbroad
3dbaf34bd5 yaml.cyaml: Switch Optional to new pipe-based union (#5971) 2021-08-27 19:21:44 +02:00
JP Sugarbroad
07a58c3266 Add methods to yaml.cyaml.CParser (#5963) 2021-08-26 19:28:17 -07:00
Stanislav Schmidt
64903b85d7 PyYAML: fix yaml.add_foo() functions (#5828)
Added / modified types for the following functions:
- `add_implicit_resolver(...)`
- `add_path_resolver(...)`
- `add_constructor(...)`
- `add_multi_constructor(...)`
- `add_representer(...)`
- `add_multi_representer(...)`

* Remove yaml.add_constructor from allowlist

* Use TypeVars and overloads
2021-08-08 21:49:06 +03:00
Akuli
ce11072dbe Big diff: use lower-case list and dict (#5888) 2021-08-08 09:26:35 -07:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Oleg Höfling
725b5ef71b Loosen mapping as input type in mapping representer (#5644)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-06-16 12:05:43 +02:00
Oleg Höfling
5a1dbf7cee loosen type restrictions for mapping representer input (#5640)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-06-15 15:35:12 +02:00
Oleg Höfling
03809dc604 Add type hints for representer registration functions (#5636)
bump version to the current major release of PyYAML

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-06-14 17:53:59 +02:00
Oleg Höfling
b65fa0ed52 Add stubs for yaml.nodes and yaml.representer (py3) (#5634)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-06-14 16:13:45 +02:00
Oleg Höfling
0744d8c30a Add stubs for yaml.error (#5627)
* type yaml.error
2021-06-13 15:13:42 +03:00
Shantanu
7244ea1f71 Test third party stubs with stubtest (#5615) 2021-06-13 00:17:40 +02:00
Sebastian Rittau
711580722b Enable pyright for all Python 3 stubs (#5597)
* pyright: disable reportUnknownParameterType

Unknown parameter types are preferred over Any annotations for
incomplete stubs. Especially larger stubs are expected to be
incomplete for some time and it would be a shame to lose the
other pyright warnings for those stubs.

* Also disable reportUnknownVariableType

Fix problems with tkinter

* Disable reportUnknownMemberType

Fix pyright problems
2021-06-09 07:14:22 -07:00
Kaleb Barrett
2be836bf6d Add yaml.UnsafeLoader (#5441) 2021-05-13 18:24:23 -07:00
Shantanu
fa9d5a5e9f future first: switch the order of some if statements (#5206)
Since we're adding this to our contribution guidelines in
https://github.com/python/typeshed/pull/5205
2021-04-11 06:44:18 -07:00
Sorin Sbarnea
2d3bf41b18 Improve type for yaml composer (#5144) 2021-04-08 07:29:11 -07:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00