Skip to content

Commit af21397

Browse files
fix: make generic args more flexible
1 parent ff9153e commit af21397

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • snakemake_interface_software_deployment_plugins

snakemake_interface_software_deployment_plugins/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,18 @@ def run(self, cmd: str, **kwargs) -> sp.CompletedProcess:
168168
return sp.run([self.executable] + self.args + [self.command_arg, cmd], **kwargs)
169169

170170

171-
TSettings = TypeVar("TSettings", bound="SoftwareDeploymentSettingsBase")
171+
TSettings = TypeVar("TSettings", bound="Optional[SoftwareDeploymentSettingsBase]")
172172
TEnvSpec = TypeVar("TEnvSpec", bound="EnvSpecBase")
173173

174174

175-
class EnvBase(ABC, Generic[TSettings, TEnvSpec]):
175+
class EnvBase(ABC, Generic[TEnvSpec, TSettings]):
176176
_cache: ClassVar[Dict[Tuple[Type["EnvBase"], Optional["EnvBase"]], Any]] = {}
177177

178178
def __init__(
179179
self,
180180
spec: TEnvSpec,
181181
within: Optional["EnvBase"],
182-
settings: Optional[TSettings],
182+
settings: TSettings,
183183
shell_executable: ShellExecutable,
184184
tempdir: Path,
185185
source_cache: Path,
@@ -189,7 +189,7 @@ def __init__(
189189
):
190190
self.spec = spec
191191
self.within = within
192-
self.settings: Optional[TSettings] = settings
192+
self.settings: TSettings = settings
193193
self.shell_executable = shell_executable
194194
self.tempdir = tempdir
195195
self.source_cache: Path = source_cache

0 commit comments

Comments
 (0)