Revert "Appease new flake8 B028 error:"

This reverts commit 44c2d89c47.
This commit is contained in:
Ralf W. Grosse-Kunstleve 2023-02-22 11:24:34 -08:00
parent 44c2d89c47
commit 7087a74add

View File

@ -174,9 +174,7 @@ class Pybind11Extension(_Extension): # type: ignore[misc]
@cxx_std.setter @cxx_std.setter
def cxx_std(self, level: int) -> None: def cxx_std(self, level: int) -> None:
if self._cxx_level: if self._cxx_level:
warnings.warn( warnings.warn("You cannot safely change the cxx_level after setting it!")
"You cannot safely change the cxx_level after setting it!", stacklevel=1
)
# MSVC 2015 Update 3 and later only have 14 (and later 17) modes, so # MSVC 2015 Update 3 and later only have 14 (and later 17) modes, so
# force a valid flag here. # force a valid flag here.