Skip to content

Commit f94f594

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

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

mypy/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3024,7 +3024,7 @@ def dump_graph(graph: Graph, stdout: TextIO | None = None) -> None:
30243024
if state.path:
30253025
try:
30263026
size = os.path.getsize(state.path)
3027-
except os.error:
3027+
except OSError:
30283028
pass
30293029
node.sizes[mod] = size
30303030
for dep in state.dependencies:

mypy/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
def stat_proxy(path: str) -> os.stat_result:
3434
try:
3535
st = orig_stat(path)
36-
except os.error as err:
36+
except OSError as err:
3737
print(f"stat({path!r}) -> {err}")
3838
raise
3939
else:

mypy/metastore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def write(self, name: str, data: str, mtime: float | None = None) -> bool:
112112
if mtime is not None:
113113
os.utime(path, times=(mtime, mtime))
114114

115-
except os.error:
115+
except OSError:
116116
return False
117117
return True
118118

setup.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
import sys
99
from typing import TYPE_CHECKING, Any
1010

11-
if sys.version_info < (3, 8, 0):
12-
sys.stderr.write("ERROR: You need Python 3.8 or later to use mypy.\n")
13-
exit(1)
14-
1511
# we'll import stuff from the source tree, let's ensure is on the sys path
1612
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
1713

0 commit comments

Comments
 (0)