Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#55)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.6.3](astral-sh/ruff-pre-commit@v0.5.6...v0.6.3)

* Update pyproject.toml

* chore: fix pre-commit config

* Update pyproject.toml

* Update pyproject.toml

* Update check_solvable.py

* Update utils.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] and beckermr committed Sep 2, 2024
1 parent 881f3f9 commit 9f4502f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 33 deletions.
20 changes: 1 addition & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,15 @@ repos:
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: black
name: black
entry: black --line-length 88
additional_dependencies:
- --override-channels
- --channel
- conda-forge
- black=22.3.0
language: conda
types:
- python
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args:
- --py36-plus
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.6
rev: v0.6.3
hooks:
# Run the linter.
- id: ruff
Expand Down
6 changes: 4 additions & 2 deletions conda_forge_feedstock_check_solvable/check_solvable.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def _is_recipe_solvable(
if len(cbcs) == 0:
errors.append(
"No `.ci_support/*.yaml` files found! This can happen when a rerender "
"results in no builds for a recipe (e.g., a recipe is python 2.7 only). "
"results in no builds for a recipe (e.g., a recipe is "
"python 2.7 only). "
"This attempted migration is being reported as not solvable.",
)
print_warning(errors[-1])
Expand All @@ -145,7 +146,8 @@ def _is_recipe_solvable(
for cbc_fname in cbcs:
timeout_timer.raise_for_timeout()

# we need to extract the platform (e.g., osx, linux) and arch (e.g., 64, aarm64)
# we need to extract the platform (e.g., osx, linux)
# and arch (e.g., 64, aarm64)
# conda smithy forms a string that is
#
# {{ platform }} if arch == 64
Expand Down
7 changes: 4 additions & 3 deletions conda_forge_feedstock_check_solvable/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ def _get_run_exports_from_download(channel_url, subdir, pkg):
try:
# download
subprocess.run(
f"cd {tmpdir} && curl -s -L {channel_url}/{subdir}/{pkg} --output {pkg}",
f"cd {tmpdir} && curl -s -L "
f"{channel_url}/{subdir}/{pkg} --output {pkg}",
shell=True,
)

Expand Down Expand Up @@ -635,8 +636,8 @@ def replace_pin_compatible(reqs, host_reqs):
host_build = host_lookup[name][1]
if build and "exact=true" in req.lower():
raise ValueError(
"Build string cannot be given for pin_compatible with exact=True! %r"
% req
"Build string cannot be given for "
"pin_compatible with exact=True! %r" % req
)
else:
host_build = ""
Expand Down
22 changes: 13 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ exclude = ['tests*']
write_to = "conda_forge_feedstock_check_solvable/_version.py"
write_to_template = "__version__ = '{version}'\n"

[tool.black]
line-length = 88

[tool.isort]
profile = "black"

[tool.flake8]
ignore = ['E203']
max-line-length = 88
[tool.ruff.lint]
select = [
# pyflakes
"F",
# pycodestyle
"E", "W",
# isort
"I",
# flake8-logging-format
"G",
# flake8-tidy-imports
"TID",
]

0 comments on commit 9f4502f

Please sign in to comment.