Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 26, 2024
1 parent 78178d9 commit 3fa2664
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 23 deletions.
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"]
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
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

0 comments on commit 3fa2664

Please sign in to comment.