pyyaml
pyyaml copied to clipboard
Canonical source repository for PyYAML
In the instructions below, replace `pip` as needed with a `pip` invocation matching your target Python environment (eg, `pip3`, `/usr/local/bin/python3.11 -m pip`). ## Pre-seed wheel cache (recommended) This solution pre-seeds...
hope pyyaml can support `enum.StrEnum` element of StrEnum is consider str in Python ```python import enum import yaml class Status(enum.StrEnum): A = 'a' B = 'b' print(isinstance(Status.A, str)) # True...
I have a class EnhancedString which basically inherits from str used for a enum created lets say Pets such that Pets.DOG will give me str representation directy 'dog' but when...
- fix: [E401](https://github.com/PyCQA/pycodestyle/blob/2.9.1/docs/intro.rst#error-codes) - fix: [E713](https://github.com/PyCQA/pycodestyle/blob/2.9.1/docs/intro.rst#error-codes) - fix: [E722](https://github.com/PyCQA/pycodestyle/blob/2.9.1/docs/intro.rst#error-codes) - fix: [F631](https://github.com/PyCQA/pycodestyle/blob/2.9.1/docs/intro.rst#error-codes)
Currently the threshold is hard coded as 128, and there is no way to override it. Using a complex key on a string creates a file that sometimes uses sometimes...
If I make a file `test.yaml` with these contents: ```yaml - &my.anchor - key: 'foo' value: 'bar' ``` And then parse the contents using PyYAML, I get a traceback: ```python...
## Description of the bug When trying to parse a simple yaml list like the following: ```yaml mylist: - = ``` An error occurs: ``` could not determine a constructor...
When calling `yaml.dump({"y": 1})` I end up with: ``` y: 1 ``` Which makes sense, until one considers that this key (`y`) is [actually a boolean](https://yaml.org/type/bool.html) according to the yaml...
The behaviour of `CSafeDumper` differs from `SafeDumper` with respect to the `allow_unicode` parameter. `SafeDumper` will emit the unicode unescaped whereas `CSafeDumper` appears to ignore the parameter and emits the `\U....`...
_Hello,_ **PyYAML** [declares support](https://github.com/yaml/pyyaml/blob/main/setup.py#L31-L38) for a wide range of Python versions, but not all of them were included in the `envlist` at `tox.ini`, so I'd like to propose changes that:...