Skip to content

How to remove dev dependencies from poetry.lock file? #304

Answered by TomWright
sanzoghenzo asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @sanzoghenzo,

Dasel is currently sensitive to space characters in the selectors. You should be able to just remove that space before dev and have it work:

$ cat poetry.lock | dasel -r toml 'package.all().filter(equal(category,dev))'
category = "dev"
description = "A few extensions to pyyaml."
name = "aspy-yaml"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "1.3.0"

[dependencies]
  pyyaml = "*"

[[files]]
  file = "aspy.yaml-1.3.0-py2.py3-none-any.whl"
  hash = "sha256:463372c043f70160a9ec950c3f1e4c3a82db5fca01d334b6bc89c7164d744bdc"

[[files]]
  file = "aspy.yaml-1.3.0.tar.gz"
  hash = "sha256:e7c742382eff2caed61f87a39d13f99109088e5e93f04d76…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sanzoghenzo
Comment options

@TomWright
Comment options

Answer selected by sanzoghenzo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants