Skip to content

Commit

Permalink
[p] Cover azul.files with mypy (#6821)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes-ucsc committed Feb 3, 2025
1 parent 4993880 commit 5cf898b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ modules =
azul.dss,
azul.enums,
azul.es,
azul.exceptions
azul.exceptions,
azul.files
packages =
azul.openapi

Expand Down
5 changes: 1 addition & 4 deletions src/azul/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
)
import os.path
import tempfile
from typing import (
Union,
)


@contextmanager
Expand All @@ -26,7 +23,7 @@ def write_file_atomically(path, mode=0o644):
raise


def file_sha1(path: Union[str, PathLike]) -> str:
def file_sha1(path: str | PathLike) -> str:
"""
>>> file_sha1('/dev/null')
'da39a3ee5e6b4b0d3255bfef95601890afd80709'
Expand Down

0 comments on commit 5cf898b

Please sign in to comment.