Comments (2)
I think the issue you're referring to is with the lines like this one:
$ref: "#/components/schemas/Error"
Where pyaml, trying to keep unnecessary quotes out of strings if possible, did not have detection for this "will end up being comment" case, hence the breakage.
Fixed it in f904b96 and 20.4.0 by checking for "#" anywhere within strings to use quoted style for those that have it.
Let me know if you might've meant some other issue there.
Though note that this module is not really intended for producing correct output (as should be also mentioned in the README), just something readable that looks like more-or-less correct YAML, so probably should not be used to serialize data for other scripts to parse, only for humans.
Thanks for reporting!
from pretty-yaml.
My intention was to use it as kind of a formatting tool that I can run on the files so that developers do not need to take care for formatting. Let's see how it goes!
from pretty-yaml.
Related Issues (20)
- pyaml converts integer-like strings to integers HOT 7
- Default to safe=True? HOT 10
- pyaml output stringified inexplicably in places HOT 1
- dump fails on numpy arrays HOT 3
- Cannot install with Python 3.6 on Windows 10 HOT 2
- Multiline String as block and quoted Strings HOT 3
- Since dict is ordered by default since 3.6, the order is lost now HOT 1
- yaml.composer.ComposerError: expected a single document in the stream HOT 1
- Deprecation warning HOT 1
- Format and write into file HOT 2
- RepresenterError: 'cannot represent an object' for custom object HOT 5
- pyaml not compatible with ruamel.yaml HOT 8
- % cannot start any token HOT 1
- Why does it sort my keys in alphabet order? HOT 2
- Although I'm using string_val_style='plain', a string value is still quoted HOT 2
- pretty-yaml creates output not readable by itself for escaped strings HOT 2
- Test regression with Python 3.11: DumpTests.test_enum HOT 2
- To ensure Python compatibility, it is recommended to avoid using the := operator in your code. HOT 1
- 23.5.9 from pypi installs empty directory HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pretty-yaml.