Repository navigation
Print warning on malformed lines in .env file - #211
Merged
Merged
Conversation
bbc2
force-pushed
the
invalid-dotenv-warnings
branch
from
November 3, 2019 14:12
9bd5339 to
4d8aa19
Compare
Collaborator
Author
|
@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
force-pushed
the
invalid-dotenv-warnings
branch
from
December 21, 2019 18:58
4d8aa19 to
e850e21
Compare
Owner
|
@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 :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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