Skip to content

Commit 019df65

Browse files
author
Ryan Patrick Kyle
committed
✏️ +sp after , if missing in R imp/sugg/deps
1 parent 06dbc8d commit 019df65

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dash/development/_r_components_generation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,15 +582,18 @@ def generate_rpkg(
582582

583583
package_version = pkg_data.get("version", "0.0.1")
584584

585-
# remove leading and trailing commas
585+
# remove leading and trailing commas, add space after comma if missing
586586
if package_depends:
587587
package_depends = ", " + package_depends.strip(",").lstrip()
588+
package_depends = re.sub(r"(,(?![ ]))", ", ", package_depends)
588589

589590
if package_imports:
590591
package_imports = package_imports.strip(",").lstrip()
592+
package_imports = re.sub(r"(,(?![ ]))", ", ", package_imports)
591593

592594
if package_suggests:
593595
package_suggests = package_suggests.strip(",").lstrip()
596+
package_suggests = re.sub(r"(,(?![ ]))", ", ", package_suggests)
594597

595598
if "bugs" in pkg_data:
596599
package_issues = pkg_data["bugs"].get("url", "")

0 commit comments

Comments
 (0)