Print warning on malformed lines in .env file #211
Merged
Conversation
|
@theskumar Hi! I understand you might not have a lot of time to review code. Do you mind if I go ahead and merge this and other PRs without review? |
If a line can't be parsed (e.g. `FOO: BAR` is invalid), it is printed as a warning on stderr. As usual, after such an error, Python-dotenv tries to parse the rest of the file and the application can use the successfully parsed variable bindings.
|
@bbc2 Due to some personal commitments I'm not able to pay as much attention to this project as it deserves. I won't like to hold onto any requests due to my unavailability. Please feel free to merge without my review if you are confident about it :) |
|
Ship it!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
This prints a warning such as the following on stderr (
logging.warning) when part of the .env file can't be parsed:I think it's OK to use the "warning" level because such an error means that something should be fixed by the user.
Note that Python-dotenv will continue to parse the file and won't interfere in any other way with the application using it.
I've also added some commits to fix the CI (linting in the code and the manifest).
Fixes #204