Skip to content

Commit 9ae5baf

Browse files
Bump mypy
Also, warn_unused_configs requires turning off incremental mode using incremental = False. https://mypy.readthedocs.io/en/stable/config_file.html#confval-warn_unused_configs
1 parent 8e9cd82 commit 9ae5baf

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

ci-constraints-requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ markupsafe==2.1.5 ; python_full_version < '3.9'
8787
# via jinja2
8888
markupsafe==3.0.2 ; python_full_version >= '3.9'
8989
# via jinja2
90-
mypy==1.14.1 ; python_full_version < '3.9'
91-
# via cryptography (pyproject.toml)
92-
mypy==1.15.0 ; python_full_version >= '3.9'
90+
mypy==1.15.0
9391
# via cryptography (pyproject.toml)
9492
mypy-extensions==1.1.0
9593
# via mypy

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ sdist = ["build >=1.0.0"]
8787
# `click` included because its needed to type check `release.py`
8888
pep8test = [
8989
"ruff >=0.3.6",
90-
"mypy >=1.4",
90+
"mypy >=1.15",
9191
"check-sdist",
9292
"click >=8.0.1",
9393
]

src/cryptography/utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ class CryptographyDeprecationWarning(UserWarning):
3232
# be more accurately named: Bufferable. It means something which has an
3333
# `__buffer__`. Which means you can't actually treat the result as a buffer
3434
# (and do things like take a `len()`).
35-
if sys.version_info >= (3, 9):
36-
Buffer = typing.Union[bytes, bytearray, memoryview]
37-
else:
38-
Buffer = typing.ByteString
35+
Buffer = typing.Union[bytes, bytearray, memoryview]
3936

4037

4138
def _check_bytes(name: str, value: bytes) -> None:

0 commit comments

Comments
 (0)