Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
fizyk committed Jun 1, 2021
1 parent c958447 commit 846c44f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pytest_postgresql/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def stop(self: T, sig: Optional[int] = None, exp_sig: Optional[int] = None) -> T
shell=True,
)
try:
super().stop(sig, exp_sig) # type: ignore[arg-type]
super().stop(sig, exp_sig)
except ProcessFinishedWithError:
# Finished, leftovers ought to be cleaned afterwards anyway
pass
Expand Down
16 changes: 14 additions & 2 deletions src/pytest_postgresql/factories/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import platform
import subprocess
from _warnings import warn
from typing import Union, Iterable, Callable, List, Iterator, Optional
from typing import Union, Iterable, Callable, List, Iterator, Optional, Tuple, Set

import pytest
from _pytest.fixtures import FixtureRequest
Expand All @@ -35,7 +35,19 @@
def postgresql_proc(
executable: Optional[str] = None,
host: Optional[str] = None,
port: Union[str, int, Iterable, None] = -1,
port: Union[
None,
str,
int,
Tuple[int, int],
Set[int],
List[str],
List[int],
List[Tuple[int, int]],
List[Set[int]],
List[Union[Set[int], Tuple[int, int]]],
List[Union[str, int, Tuple[int, int], Set[int]]],
] = -1,
user: Optional[str] = None,
password: Optional[str] = None,
dbname: Optional[str] = None,
Expand Down

0 comments on commit 846c44f

Please sign in to comment.