Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix interpolation order #258

Merged
merged 1 commit into from
Jul 3, 2020
Merged

Conversation

elbehery95
Copy link
Contributor

@elbehery95 elbehery95 commented Jun 27, 2020

As per #256 when users refer to an environment variable that is defined at the current environment and re-defined at the file, the interpolation order always favors the os.environ value.

It does not make sense to favor the environment variable as it is already re-defined in the .env file context. This PR reverts the order of getting these values from the proper dicts. Also i have added a test case to expose such behavior

@coveralls
Copy link

coveralls commented Jun 27, 2020

Coverage Status

Coverage remained the same at 89.806% when pulling df530fb on elbehery95:interpolation_256_fix into d83c1b6 on theskumar:master.

add interpolation order test
@bbc2
Copy link
Collaborator

bbc2 commented Jul 3, 2020

Thank you! I've updated the commit with minor changes.

@bbc2 bbc2 merged commit 6712bc8 into theskumar:master Jul 3, 2020
transcranial added a commit to transcranial/python-dotenv that referenced this pull request Jul 13, 2020
bbc2 pushed a commit that referenced this pull request Jul 17, 2020
johnbergvall pushed a commit to johnbergvall/python-dotenv that referenced this pull request Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants