Skip to content

Commit 738a47f

Browse files
committed
style: fix ruff problems
1 parent 5c5db96 commit 738a47f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/dotenv/main.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ def unset_key(
285285

286286
return removed, key_to_unset
287287

288-
289288
def resolve_variables(
290289
values: Iterable[Tuple[str, Optional[str]]],
291290
override: bool,
@@ -298,10 +297,11 @@ def resolve_variables(
298297
"""
299298
new_values: Dict[str, Optional[str]] = {}
300299

301-
if override:
302-
env = ChainMap(new_values, os.environ) # type: ChainMap[str, Optional[str]]
303-
else:
304-
env = ChainMap(os.environ, new_values) # type: ChainMap[str, Optional[str]]
300+
env: ChainMap[str, Optional[str]] = (
301+
ChainMap(new_values, os.environ) # type: ignore
302+
if override
303+
else ChainMap(os.environ, new_values) # type: ignore
304+
)
305305

306306
for name, value in values:
307307
if value is None:
@@ -314,7 +314,6 @@ def resolve_variables(
314314

315315
return new_values
316316

317-
318317
def _walk_to_root(path: str) -> Iterator[str]:
319318
"""
320319
Yield directories starting from the given directory up to the root

0 commit comments

Comments
 (0)