We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98e4eee commit 569e131Copy full SHA for 569e131
setup.py
@@ -14,7 +14,8 @@
14
long_description = f.read()
15
16
meta = {}
17
-exec(open('./dotenv/version.py').read(), meta)
+with open('./dotenv/version.py') as f:
18
+ exec(f.read(), meta)
19
20
setup(
21
name="python-dotenv",
tests/test_cli.py
@@ -199,7 +199,8 @@ def test_get_key_with_interpolation(dotenv_file):
199
dotenv.set_key(dotenv_file, 'FOO', '${HELLO}')
200
dotenv.set_key(dotenv_file, 'BAR', 'CONCATENATED_${HELLO}_POSIX_VAR')
201
202
- lines = list(open(dotenv_file, "r").readlines())
+ with open(dotenv_file) as f:
203
+ lines = f.readlines()
204
assert lines == [
205
'HELLO="WORLD"\n',
206
'FOO="${HELLO}"\n',
0 commit comments