Skip to content

Commit b177c14

Browse files
authored
Bug fix when no optional-dependencies Section (#84)
1 parent cf5c720 commit b177c14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyproject_toml_builder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,10 @@ def __init__(
672672
toml_dict["tool"]["setuptools_scm"]["fallback_version"].trivia.comment = comment
673673

674674
# [project.optional-dependencies][mypy]
675-
if gha_input.auto_mypy_option:
675+
if (
676+
gha_input.auto_mypy_option
677+
and "optional-dependencies" in toml_dict["project"] # only if there's deps
678+
):
676679
self.build_mypy_optional_deps(toml_dict["project"]["optional-dependencies"])
677680

678681
# Automate some README stuff

0 commit comments

Comments
 (0)