-
-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I want to use the flag --pretty=false to get the same output from dasel as the input TOML is but the flag has no effect.
To Reproduce
Steps to reproduce the behavior:
- (Example) Input file
pyproject.toml:[build-system] requires = [ "setuptools", "wheel" ] build-backend = "setuptools.build_meta" [project] name = "project_name" authors = [ { name = "Dummy Dude", email = "[email protected]" } ] license = { text = "Apache License 2.0" } description = "A Python project" dynamic = [ "version" ] requires-python = "~=3.13" # required by poetry but unused due to usage of setuptools [tool.poetry] version = "0" [project.readme] file = "README.md" content-type = "text/markdown" [project.entry-points.project_name] provider_info = "package_name.__init__:get_package_info" [tool.setuptools] include-package-data = false [tool.setuptools.dynamic] version = { attr = "package_name.__version__" } [tool.setuptools.packages.find] exclude = [ "*tests.*", "*tests" ]
- Commands:
and also
dasel -r toml --pretty=false -f pyproject.toml
dasel put -r toml --pretty=false -f pyproject.toml -v '0.1.0' .tool.poetry.version - See different outputs than input contents:
[build-system] build-backend = 'setuptools.build_meta' requires = ['setuptools', 'wheel'] [project] description = 'A Python project' dynamic = ['version'] name = 'project_name' requires-python = '~=3.13' [[project.authors]] email = '[email protected]' name = 'Dummy Dude' [project.entry-points] [project.entry-points.project_name] provider_info = 'package_name.__init__:get_package_info' [project.license] text = 'Apache License 2.0' [project.readme] content-type = 'text/markdown' file = 'README.md' [tool] [tool.poetry] version = '0' [tool.setuptools] include-package-data = false [tool.setuptools.dynamic] [tool.setuptools.dynamic.version] attr = 'package_name.__version__' [tool.setuptools.packages] [tool.setuptools.packages.find] exclude = ['*tests.*', '*tests']
Expected behavior
The content of the output is matching the input content.
Screenshots
Desktop
- OS:
> lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 24.04.2 LTS Release: 24.04 Codename: noble - Version: v2.8.1
Additional context
The pyproject.toml may get smaller and also more efficient but in automated CI/CD pipelines it is crucial to have the option to leave the contents as provided.
PS
Love the tool <3
jlegarreta
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
