Skip to content

Commit 5413616

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 420a120 commit 5413616

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

pybind11/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
from ._version import __version__, version_info
9-
from .commands import get_cmake_dir, get_pkgconfig_dir, get_include
9+
from .commands import get_cmake_dir, get_include, get_pkgconfig_dir
1010

1111
__all__ = (
1212
"version_info",

pybind11/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55
import sysconfig
66

7-
from .commands import get_cmake_dir, get_pkgconfig_dir, get_include
7+
from .commands import get_cmake_dir, get_include, get_pkgconfig_dir
88

99

1010
def print_includes() -> None:

pybind11/commands.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def get_cmake_dir() -> str:
2424
msg = "pybind11 not installed, installation required to access the CMake files"
2525
raise ImportError(msg)
2626

27+
2728
def get_pkgconfig_dir() -> str:
2829
"""
2930
Return the path to the pybind11 pkgconfig directory.

tools/JoinPaths.cmake

+14-12
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,21 @@
55
# Copyright 2020 Jan Tojnar
66
# https://github.com/jtojnar/cmake-snips
77
#
8-
# Modelled after Pythons os.path.join
8+
# Modelled after Python's os.path.join
99
# https://docs.python.org/3.7/library/os.path.html#os.path.join
1010
# Windows not supported
1111
function(join_paths joined_path first_path_segment)
12-
set(temp_path "${first_path_segment}")
13-
foreach(current_segment IN LISTS ARGN)
14-
if(NOT ("${current_segment}" STREQUAL ""))
15-
if(IS_ABSOLUTE "${current_segment}")
16-
set(temp_path "${current_segment}")
17-
else()
18-
set(temp_path "${temp_path}/${current_segment}")
19-
endif()
20-
endif()
21-
endforeach()
22-
set(${joined_path} "${temp_path}" PARENT_SCOPE)
12+
set(temp_path "${first_path_segment}")
13+
foreach(current_segment IN LISTS ARGN)
14+
if(NOT ("${current_segment}" STREQUAL ""))
15+
if(IS_ABSOLUTE "${current_segment}")
16+
set(temp_path "${current_segment}")
17+
else()
18+
set(temp_path "${temp_path}/${current_segment}")
19+
endif()
20+
endif()
21+
endforeach()
22+
set(${joined_path}
23+
"${temp_path}"
24+
PARENT_SCOPE)
2325
endfunction()

0 commit comments

Comments
 (0)