Comments (2)
ping @frostming , can you confirm you are the author of this?
I've confirmed this patch is needed by pipenv.
Without it, test_uninstall.py::test_normalize_name_uninstall
fails at assert "# Inline comment" in contents
, with the entire line removed.
Now I understand the patches effect a bit better, this feels like it isnt a complete patch, as that inline comment after an entry probably needs to be removed with the entry in some cases, and it should be up to the caller whether 'dangling' comments should be kept, so some mechanism needs to be added to allow the caller to control this. But that is just a guess, and I'd appreciate feedback from @sdispater about whether this patch is acceptable as-is .
from tomlkit.
this patch is authored by me to preserve the comment when an entry is removed. It is required by pipenv in the regressiin cases. However it is not always expected
for a general toml document. Cases are user may want to remove the comments together with the line it is bound to. So I just patch it in pipenv vendor but leave it to original creator how to design it.
from tomlkit.
Related Issues (20)
- Adding np.array and tomlkit.items.Float leads to NotImplementedType
- Write table with keys containing a dot HOT 3
- Bottleneck parsing
- Missing setup.py on releases? HOT 3
- dividing a tomlkit.Integer by an int does integer division, instead of 'true' division HOT 1
- [REPO] Add discussions
- AttributeError: 'Null' object has no attribute '_trivia'. Did you mean: 'trivia'?
- [DOC] Missing `TOMLDocument.unwrap` et al in API Reference HOT 1
- -1 index error in certain cases HOT 1
- Newline lost when updating a table HOT 2
- Six-minute load time on 400 line TOML file
- PYPI release for v0.12.2 HOT 1
- Version 0.12.2 tag seems to have been moved HOT 4
- How to preserve quote style when mutating field?
- MyPy errors when using tomlkit to modify toml documents HOT 1
- Error when removing the first element from array: AttributeError: 'NoneType' object has no attribute 's'
- Feature Request: TOMLDocument deep merging HOT 4
- `|=` does not work as expected on TOMLDocument
- Same -1 index error on newest version HOT 1
- Test failures with Python 3.13.0a4: test_dates_behave_like_dates and test_times_behave_like_times HOT 1
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 tomlkit.