Skip to content

Commit 173e66d

Browse files
Consolidate if branches for simpler logic flow
1 parent 0aa5dc1 commit 173e66d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/usethis/_ui/interface/init.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,13 @@ def init( # noqa: PLR0913
6969

7070
assert isinstance(backend, BackendEnum)
7171

72-
if path is not None:
73-
instruct_print("Change the current working directory to the project directory.")
74-
7572
if path is not None:
7673
path_ = Path(path)
7774
if not path_.exists():
7875
path_.mkdir(parents=True, exist_ok=True)
7976

77+
instruct_print("Change the current working directory to the project directory.")
78+
8079
with (
8180
usethis_config.set(
8281
offline=offline,

0 commit comments

Comments
 (0)