diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index 445d5eb9..88bac330 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -639,7 +639,7 @@ def __setattr__(self, name: str, value: Any) -> None: # Note: we really do not want str subclasses here, so we do not use # isinstance. - if type(name) is not str: # noqa: E721 + if type(name) is not str: raise TypeError( f"attribute name must be string, not " f"'{type(value).__name__:.200}'" diff --git a/tox.ini b/tox.ini index d0543d6a..8aba4df9 100644 --- a/tox.ini +++ b/tox.ini @@ -47,7 +47,7 @@ deps = ruff skip_install = true commands = - ruff . + ruff check . ruff format --check . [testenv:py311-mypy]