Header at the top of the lock file #3954
-
At the place I work, we are looking to open source a py package. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Since the lock file is a toml file, syntactically comments are fine. However, since the lock file is expected to be completely poetry managed and because we rewrite the lock file instead of preserving any comments or manual edits in most cases, there is no guarantee that these comments will be preserved for all operations. For example if a new dependency is added or old one removed, you will end up with a brand new toml file. You will have to re-add the licence everytime, or alternatively use a pre-commit hook to ensure a licence header is injected into all files automatically. |
Beta Was this translation helpful? Give feedback.
Since the lock file is a toml file, syntactically comments are fine. However, since the lock file is expected to be completely poetry managed and because we rewrite the lock file instead of preserving any comments or manual edits in most cases, there is no guarantee that these comments will be preserved for all operations. For example if a new dependency is added or old one removed, you will end up with a brand new toml file. You will have to re-add the licence everytime, or alternatively use a pre-commit hook to ensure a licence header is injected into all files automatically.