Skip to content

Commit 6eb1698

Browse files
tomvinertheskumar
authored andcommitted
chore(): Use negative indexing (theskumar#69)
Thanks / @tomviner
1 parent 584d20f commit 6eb1698

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dotenv/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def parse_dotenv(dotenv_path):
107107
k, v = k.strip(), v.strip().encode('unicode-escape').decode('ascii')
108108

109109
if len(v) > 0:
110-
quoted = v[0] == v[len(v) - 1] in ['"', "'"]
110+
quoted = v[0] == v[-1] in ['"', "'"]
111111

112112
if quoted:
113113
v = decode_escaped(v[1:-1])

0 commit comments

Comments
 (0)