From 9f4502f3ea2371376235e4cd907503eaad0e9e55 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 20:34:22 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#55) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.6.3](https://github.com/astral-sh/ruff-pre-commit/compare/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 --- .pre-commit-config.yaml | 20 +---------------- .../check_solvable.py | 6 +++-- conda_forge_feedstock_check_solvable/utils.py | 7 +++--- pyproject.toml | 22 +++++++++++-------- 4 files changed, 22 insertions(+), 33 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f6d4070..db2b3ea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/conda_forge_feedstock_check_solvable/check_solvable.py b/conda_forge_feedstock_check_solvable/check_solvable.py index 0828ec7..38bebc0 100644 --- a/conda_forge_feedstock_check_solvable/check_solvable.py +++ b/conda_forge_feedstock_check_solvable/check_solvable.py @@ -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]) @@ -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 diff --git a/conda_forge_feedstock_check_solvable/utils.py b/conda_forge_feedstock_check_solvable/utils.py index 6c1ed58..72f7451 100644 --- a/conda_forge_feedstock_check_solvable/utils.py +++ b/conda_forge_feedstock_check_solvable/utils.py @@ -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, ) @@ -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 = "" diff --git a/pyproject.toml b/pyproject.toml index 9cdb9d3..b10adfb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", +]