Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 3, 2023
1 parent 73c7623 commit f94f594
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3024,7 +3024,7 @@ def dump_graph(graph: Graph, stdout: TextIO | None = None) -> None:
if state.path:
try:
size = os.path.getsize(state.path)
except os.error:
except OSError:
pass
node.sizes[mod] = size
for dep in state.dependencies:
Expand Down
2 changes: 1 addition & 1 deletion mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
def stat_proxy(path: str) -> os.stat_result:
try:
st = orig_stat(path)
except os.error as err:
except OSError as err:
print(f"stat({path!r}) -> {err}")
raise
else:
Expand Down
2 changes: 1 addition & 1 deletion mypy/metastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def write(self, name: str, data: str, mtime: float | None = None) -> bool:
if mtime is not None:
os.utime(path, times=(mtime, mtime))

except os.error:
except OSError:
return False
return True

Expand Down
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
import sys
from typing import TYPE_CHECKING, Any

if sys.version_info < (3, 8, 0):
sys.stderr.write("ERROR: You need Python 3.8 or later to use mypy.\n")
exit(1)

# we'll import stuff from the source tree, let's ensure is on the sys path
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))

Expand Down

0 comments on commit f94f594

Please sign in to comment.