Skip to content

Commit

Permalink
Make CMakeSettingsDefine private
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreinking committed Oct 1, 2024
1 parent bce3d75 commit bebd0b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scikit_build_core/settings/skbuild_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ def __dir__() -> List[str]:
return __all__


class CMakeSettingsDefine(str):
class _CMakeSettingsDefine(str):
"""
A str subtype for automatically normalizing bool and list values
to the CMake representation in the `cmake.define` settings key.
"""

json_schema = Union[str, bool, List[str]]

def __new__(cls, raw: Union[str, bool, List[str]]) -> "CMakeSettingsDefine":
def __new__(cls, raw: Union[str, bool, List[str]]) -> "_CMakeSettingsDefine":
def escape_semicolons(item: str) -> str:
return item.replace(";", r"\;")

Expand Down Expand Up @@ -71,7 +71,7 @@ class CMakeSettings:
in config or envvar will override toml. See also ``cmake.define``.
"""

define: Annotated[Dict[str, CMakeSettingsDefine], "EnvVar"] = dataclasses.field(
define: Annotated[Dict[str, _CMakeSettingsDefine], "EnvVar"] = dataclasses.field(
default_factory=dict
)
"""
Expand Down

0 comments on commit bebd0b4

Please sign in to comment.