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

[pre-commit.ci] pre-commit autoupdate #1105

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
rev: "v5.0.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -16,20 +16,20 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/sirosen/texthooks
rev: "0.6.6"
rev: "0.6.8"
hooks:
- id: fix-ligatures
- id: fix-smartquotes

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
rev: 1.19.1
hooks:
- id: "blacken-docs"
additional_dependencies:
- black==24.*

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.9.2
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand All @@ -51,7 +51,7 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/henryiii/check-sdist
rev: "v1.0.0rc2"
rev: "v1.2.0"
hooks:
- id: check-sdist
args: [--inject-junk]
Expand All @@ -61,7 +61,7 @@ repos:
- hatchling

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.10.1"
rev: "v1.14.1"
hooks:
- id: mypy
files: ^(skbuild|tests)
Expand Down
2 changes: 1 addition & 1 deletion skbuild/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
__email__ = "[email protected]"


__all__ = ["setup", "__version__"]
__all__ = ["__version__", "setup"]


# Cleaner Python 3.7 command line completion
Expand Down
2 changes: 1 addition & 1 deletion skbuild/_compat/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
else:
from typing_extensions import Final, Literal, Protocol, TypedDict

__all__ = ["Protocol", "TypedDict", "Final", "Literal"]
__all__ = ["Final", "Literal", "Protocol", "TypedDict"]
3 changes: 1 addition & 2 deletions skbuild/cmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,7 @@ def make(
clargs, install_target = pop_arg("--install-target", clargs, install_target)
if not os.path.exists(CMAKE_BUILD_DIR()):
msg = (
f"CMake build folder ({CMAKE_BUILD_DIR()}) does not exist. "
"Did you forget to run configure before make?"
f"CMake build folder ({CMAKE_BUILD_DIR()}) does not exist. Did you forget to run configure before make?"
)
raise SKBuildError(msg)

Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ def install(self, *args: str | os.PathLike[str]) -> None:
self.module("pip", "install", *args)


@pytest.fixture()
@pytest.fixture
def pep518(pep518_wheelhouse, monkeypatch):
monkeypatch.setenv("PIP_FIND_LINKS", str(pep518_wheelhouse))
monkeypatch.setenv("PIP_NO_INDEX", "true")
return pep518_wheelhouse


@pytest.fixture()
@pytest.fixture
def isolated(tmp_path: Path, pep518_wheelhouse: Path) -> Generator[VEnv, None, None]:
path = tmp_path / "venv"
try:
Expand Down
3 changes: 1 addition & 2 deletions tests/samples/fail-outside-project-root/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
name="fail_outside_project_root",
version="0.0.1",
description=(
"test project that should always fail to build because it "
"tries to CMake-install something outside of its root"
"test project that should always fail to build because it tries to CMake-install something outside of its root"
),
author="The scikit-build team",
license="MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from . import goodbye_nested
from ._hello_nested import hello

__all__ = ("hello", "goodbye_nested")
__all__ = ("goodbye_nested", "hello")
4 changes: 2 additions & 2 deletions tests/test_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
DIR = Path(__file__).parent.resolve()


@pytest.mark.isolated()
@pytest.mark.isolated
def test_source_distribution(isolated, tmp_path):
sdist_dir = tmp_path / "dist"
workspace = tmp_path / "workspace"
Expand All @@ -26,7 +26,7 @@ def test_source_distribution(isolated, tmp_path):
isolated.run("python", "setup.py", "bdist_wheel", cwd=workspace)


@pytest.mark.isolated()
@pytest.mark.isolated
def test_wheel(isolated, tmp_path):
wheel_dir = tmp_path / "dist"
workspace = tmp_path / "workspace"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hello_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def run_clean():
assert "running clean" in msg


@pytest.mark.deprecated()
@pytest.mark.deprecated
@project_setup_py_test("hello-cpp", ["develop"])
def test_hello_develop():
for expected_file in [
Expand Down
6 changes: 3 additions & 3 deletions tests/test_hello_fortran.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
pytest.importorskip("numpy")


@pytest.mark.fortran()
@pytest.mark.fortran
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Fortran not supported on Windows")
@pytest.mark.skipif(not ("FC" in os.environ or shutil.which("gfortran")), reason="GFortran required")
@project_setup_py_test("hello-fortran", ["build"])
def test_hello_fortran_build():
pass


@pytest.mark.fortran()
@pytest.mark.fortran
@project_setup_py_test("hello-fortran", ["sdist"])
def test_hello_fortran_sdist():
sdists_tar = glob.glob("dist/*.tar.gz")
Expand Down Expand Up @@ -58,7 +58,7 @@ def test_hello_fortran_sdist():
check_sdist_content(sdist_archive, dirname, expected_content)


@pytest.mark.fortran()
@pytest.mark.fortran
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Fortran not supported on Windows")
@pytest.mark.skipif(not ("FC" in os.environ or shutil.which("gfortran")), reason="GFortran required")
@project_setup_py_test("hello-fortran", ["bdist_wheel"])
Expand Down
4 changes: 2 additions & 2 deletions tests/test_include_exclude_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_include_exclude_data():
check_whls("test_include_exclude_data-0.1.0")


@pytest.mark.nosetuptoolsscm()
@pytest.mark.nosetuptoolsscm
@project_setup_py_test("test-include-exclude-data", ["sdist"])
def test_hello_sdist():
check_sdist("test_include_exclude_data-0.1.0")
Expand All @@ -87,7 +87,7 @@ def test_include_exclude_data_with_base():
check_whls("test_include_exclude_data_with_base-0.1.0")


@pytest.mark.nosetuptoolsscm()
@pytest.mark.nosetuptoolsscm
@project_setup_py_test("test-include-exclude-data-with-base", ["sdist"])
def test_hello_sdist_with_base():
check_sdist("test_include_exclude_data_with_base-0.1.0", base="src")
2 changes: 1 addition & 1 deletion tests/test_issue274_support_default_package_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
)


@pytest.mark.deprecated()
@pytest.mark.deprecated
@project_setup_py_test("issue-274-support-default-package-dir", ["install"], disable_languages_test=True)
def test_install_command():
pass
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
)


@pytest.mark.deprecated()
@pytest.mark.deprecated
@project_setup_py_test("issue-274-support-one-package-without-package-dir", ["install"], disable_languages_test=True)
def test_install_command():
pass
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from . import project_setup_py_test


@pytest.mark.deprecated()
@pytest.mark.deprecated
@project_setup_py_test("issue-334-configure-cmakelist-non-cp1252-encoding", ["install"], disable_languages_test=True)
def test_install_command():
pass
2 changes: 1 addition & 1 deletion tests/test_issue401_sdist_with_symlinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .pytest_helpers import check_sdist_content


@pytest.mark.nosetuptoolsscm()
@pytest.mark.nosetuptoolsscm
@pytest.mark.skipif(sys.platform == "win32", reason="Symlinks not supported on Windows")
@project_setup_py_test("issue-401-sdist-with-symlinks", ["sdist"])
def test_sdist_with_symlinks():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_manifest_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from .pytest_helpers import check_sdist_content, check_wheel_content


@pytest.mark.nosetuptoolsscm()
@pytest.mark.nosetuptoolsscm
@project_setup_py_test("manifest-in", ["sdist"], disable_languages_test=True)
def test_manifest_in_sdist():
sdists_tar = glob.glob("dist/*.tar.gz")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
BASE = os.path.dirname(DIR)


@pytest.mark.isolated()
@pytest.mark.isolated
@pytest.mark.skipif(sys.platform.startswith("cygwin"), reason="Needs release of scikit-build to make cmake work")
@pytest.mark.skipif(
platform.python_implementation() == "PyPy" and sys.version_info >= (3, 9),
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pep518.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
BASE = os.path.dirname(DIR)


@pytest.mark.isolated()
@pytest.mark.isolated
@pytest.mark.skipif(sys.platform.startswith("cygwin"), reason="Needs release of scikit-build to make cmake work")
@pytest.mark.usefixtures("pep518")
def test_pep518():
subprocess.run([sys.executable, "-m", "build", "--wheel"], cwd=HELLO_PEP518, check=True)


@pytest.mark.isolated()
@pytest.mark.isolated
@pytest.mark.skipif(sys.platform.startswith("cygwin"), reason="Needs release of scikit-build to make cmake work")
@pytest.mark.usefixtures("pep518")
def test_dual_pep518():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_cxx_compiler():
@pytest.mark.skipif(
platform.system().lower() in ["darwin", "windows"], reason="no fortran compiler is available by default"
)
@pytest.mark.fortran()
@pytest.mark.fortran
def test_fortran_compiler():
generator = skbuild_platform.get_best_generator(languages=["Fortran"])
# TODO: this isn't a true unit test. It depends on the test
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def test_cmake_minimum_required_version_keyword():
assert "CMake version 99.98.97 or higher is required." in message


@pytest.mark.deprecated()
@pytest.mark.deprecated
@pytest.mark.filterwarnings("ignore:setuptools.installer is deprecated:Warning")
@pytest.mark.skipif(
os.environ.get("CONDA_BUILD", "0") == "1",
Expand Down
Loading