Skip to content

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.

@elbehery95 elbehery95 force-pushed the interpolation_256_fix branch from b29a227 to e5327fa Compare June 27, 2020 19:26
add interpolation order test
@bbc2 bbc2 force-pushed the interpolation_256_fix branch from e5327fa to df530fb Compare July 3, 2020 08:37
@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