Skip to content

Commit 169bc84

Browse files
committed
rm redundant os.makedirs("src") block in generate_module
... and adapt comment in `generate_struct_file` accordingly.
1 parent 90dfd9f commit 169bc84

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

dash/development/_jl_components_generation.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,9 @@ def generate_struct_file(name, props, description, project_shortname, prefix):
500500

501501
file_name = format_fn_name(prefix, name) + ".jl"
502502

503-
# put component files in src/jl subdir
503+
# put component files in src/jl subdir,
504+
# this also creates the Julia source directory for the package
505+
# if it is missing
504506
if not os.path.exists("src/jl"):
505507
os.makedirs("src/jl")
506508

@@ -516,12 +518,7 @@ def generate_struct_file(name, props, description, project_shortname, prefix):
516518
def generate_module(
517519
project_shortname, components, metadata, pkg_data, prefix, **kwargs
518520
):
519-
# the Julia source directory for the package won't exist on first call
520-
# create the Julia directory if it is missing
521-
if not os.path.exists("src"):
522-
os.makedirs("src")
523-
524-
# now copy over all JS dependencies from the (Python) components dir
521+
# copy over all JS dependencies from the (Python) components dir
525522
# the inst/lib directory for the package won't exist on first call
526523
# create this directory if it is missing
527524
if os.path.exists("deps"):

0 commit comments

Comments
 (0)