From 7aaf2dd94f436e5c00b3c8cf6d4c7a57aa9910ec Mon Sep 17 00:00:00 2001 From: Nat Noordanus Date: Mon, 25 Nov 2024 21:36:41 +0100 Subject: [PATCH] fix: Allow env var defaults in included task files fixes: #262 --- poethepoet/config/partition.py | 2 +- tests/fixtures/includes_project/sub_git_repo/base_tasks2.toml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/poethepoet/config/partition.py b/poethepoet/config/partition.py index b0fbbd444..acc97cb36 100644 --- a/poethepoet/config/partition.py +++ b/poethepoet/config/partition.py @@ -228,7 +228,7 @@ class ConfigOptions(PoeOptions): Options supported directly under tool.poe in included config files """ - env: Mapping[str, str] = EmptyDict + env: Mapping[str, Union[str, EnvDefault]] = EmptyDict envfile: Union[str, Sequence[str]] = tuple() tasks: Mapping[str, Any] = EmptyDict diff --git a/tests/fixtures/includes_project/sub_git_repo/base_tasks2.toml b/tests/fixtures/includes_project/sub_git_repo/base_tasks2.toml index 14f0af4e1..85a7c4180 100644 --- a/tests/fixtures/includes_project/sub_git_repo/base_tasks2.toml +++ b/tests/fixtures/includes_project/sub_git_repo/base_tasks2.toml @@ -1,4 +1,7 @@ # tasks to be included relative to the git repo root +tool.poe.env.foo.default = "bar" + + [tool.poe.tasks] did_it_work2 = "poe_test_echo yes"