Skip to content
This repository was archived by the owner on Feb 2, 2026. It is now read-only.

Commit 750fce9

Browse files
[pre-commit.ci] pre-commit autoupdate (#75)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.11.8](astral-sh/ruff-pre-commit@v0.11.4...v0.11.8) * fix: pass channel sources to command line --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: beckermr <becker.mr@gmail.com>
1 parent db7d635 commit 750fce9

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
- --py36-plus
2424
- repo: https://github.com/astral-sh/ruff-pre-commit
2525
# Ruff version.
26-
rev: v0.11.4
26+
rev: v0.11.8
2727
hooks:
2828
# Run the linter.
2929
- id: ruff

conda_forge_feedstock_check_solvable/rattler_build.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def run_rattler_build(command):
1313
try:
1414
# Run the command and capture output
15-
print_debug("Running: ", " ".join(command))
15+
print_debug("Running: %s", " ".join(command))
1616
result = subprocess.run(
1717
" ".join(command), shell=True, check=False, capture_output=True, text=True
1818
)
@@ -36,10 +36,15 @@ def invoke_rattler_build(
3636
virtual_package_repo_url = virtual_package_repodata()
3737
# create a temporary file and dump the variants as YAML
3838
with tempfile.NamedTemporaryFile(mode="w", delete=False) as variants_file:
39-
yaml.dump(variants, variants_file)
39+
channel_sources = variants.get("channel_sources", [])
40+
yaml.dump(
41+
{k: v for k, v in variants.items() if k != "channel_sources"},
42+
variants_file,
43+
)
4044
variants_file.flush()
45+
4146
channels_args = []
42-
for c in channels:
47+
for c in channels + channel_sources:
4348
channels_args.extend(["-c", c])
4449

4550
channels_args.extend(["-c", virtual_package_repo_url])

conda_forge_feedstock_check_solvable/utils.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@
101101
}
102102

103103

104-
def print_verb(fmt, *args, verbosity=0):
105-
from inspect import currentframe, getframeinfo
104+
def print_verb(fmt, *args, verbosity=0, stack_bump=1):
105+
from inspect import stack
106106

107-
frameinfo = getframeinfo(currentframe())
107+
frameinfo = stack()[stack_bump]
108108

109109
if verbosity <= VERBOSITY:
110110
if args:
@@ -114,7 +114,7 @@ def print_verb(fmt, *args, verbosity=0):
114114
print(
115115
VERBOSITY_PREFIX[verbosity]
116116
+ ":"
117-
+ __name__
117+
+ frameinfo.frame.f_globals["__name__"]
118118
+ ":"
119119
+ "%d" % frameinfo.lineno
120120
+ ":"
@@ -124,19 +124,19 @@ def print_verb(fmt, *args, verbosity=0):
124124

125125

126126
def print_critical(fmt, *args):
127-
print_verb(fmt, *args, verbosity=0)
127+
print_verb(fmt, *args, verbosity=0, stack_bump=2)
128128

129129

130130
def print_warning(fmt, *args):
131-
print_verb(fmt, *args, verbosity=1)
131+
print_verb(fmt, *args, verbosity=1, stack_bump=2)
132132

133133

134134
def print_info(fmt, *args):
135-
print_verb(fmt, *args, verbosity=2)
135+
print_verb(fmt, *args, verbosity=2, stack_bump=2)
136136

137137

138138
def print_debug(fmt, *args):
139-
print_verb(fmt, *args, verbosity=3)
139+
print_verb(fmt, *args, verbosity=3, stack_bump=2)
140140

141141

142142
@contextlib.contextmanager

0 commit comments

Comments
 (0)