Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CondaEnvFileSpec lose the rule object to create new IOFile object #1373

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion snakemake/deployment/conda.py
Expand Up @@ -699,6 +699,7 @@ def contains_wildcard(self):

class CondaEnvFileSpec(CondaEnvSpec):
def __init__(self, filepath: str, rule=None):
self.rule = rule
if isinstance(filepath, _IOFile):
self.file = filepath
else:
Expand All @@ -709,7 +710,7 @@ def apply_wildcards(self, wildcards):
if is_local_file(filepath):
# Normalize 'file:///my/path.yml' to '/my/path.yml'
filepath = parse_uri(filepath).uri_path
return CondaEnvFileSpec(filepath)
return CondaEnvFileSpec(filepath, self.rule)

def check(self):
self.file.check()
Expand Down