Skip to content

Commit cb4d5ec

Browse files
committed
fix types
1 parent d05e0c0 commit cb4d5ec

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/dotenv/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ def load_dotenv(
423423
logger.warning("Copying %s to %s", init_dotenv_path, copy_dotenv_path)
424424
import shutil
425425

426+
assert init_dotenv_path is not None
426427
shutil.copyfile(init_dotenv_path, copy_dotenv_path)
427428

428429
if dotenv_path is None and stream is None:
@@ -445,9 +446,9 @@ def should_copy_init(
445446
stream: Optional[IO[str]],
446447
) -> bool:
447448
dotenv_path = arg_dotenv_path or ".env"
448-
return (
449+
return bool(
449450
(stream is None)
450-
and init_dotenv_path
451+
and (init_dotenv_path is not None)
451452
and os.path.exists(init_dotenv_path)
452453
and (not os.path.exists(dotenv_path))
453454
)

0 commit comments

Comments
 (0)