Skip to content

Commit

Permalink
Fix type hints issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhwaniartefact committed Oct 23, 2024
1 parent 6f1b182 commit 251adc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions fixity/fixity.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from typing import Optional
from typing import TextIO
from typing import Type
from typing import Union
from uuid import uuid4

from . import reporting
Expand Down Expand Up @@ -312,9 +311,9 @@ def get_handler(stream, timestamps, log_level=None):

def main(
argv: Optional[List[str]] = None,
logger: Union[logging.Logger] = None,
logger: Optional[logging.Logger] = None,
stream: Optional[TextIO] = None,
) -> Union[int, bool, Type[Exception]]:
) -> Optional[int, bool, Type[Exception]]:
if logger is None:
logger = get_logger()
if stream is None:
Expand Down
3 changes: 1 addition & 2 deletions tests/test_fixity.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,6 @@ def test_scanall_handles_exception_if_storage_service_raises_exception(
@mock.patch("requests.get")
def test_main_verifies_urls_with_trailing_slash(
_get: mock.Mock,
mock_check_fixity: List[mock.Mock],
monkeypatch: pytest.MonkeyPatch,
) -> None:
_get.side_effect = [
Expand Down Expand Up @@ -706,7 +705,7 @@ def test_main_verifies_urls_with_trailing_slash(
)


def test_main_validate_arguments() -> None:
def test_main_validates_arguments() -> None:
response = fixity.main(["scan"])

assert str(response) == "An AIP UUID must be specified when scanning a single AIP"
Expand Down

0 comments on commit 251adc2

Please sign in to comment.