Skip to content

Commit

Permalink
chore: more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Oct 29, 2024
1 parent da8d869 commit d8fff28
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/ape/types/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def model_dump(self, *args, **kwargs) -> dict:
return attribs

def profile_statement(
self, pc: int, location: Optional["SourceLocation"] = None, tag: Optional[str] = None
self, pc: int, location: Optional[SourceLocation] = None, tag: Optional[str] = None
):
"""
Initialize a statement in the coverage profile with a hit count starting at zero.
Expand Down
7 changes: 3 additions & 4 deletions src/ape_pm/project.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import sys
from collections.abc import Iterable
from pathlib import Path
from typing import Any, Optional

from ape.utils._github import _GithubClient, github_client

Expand All @@ -9,10 +12,6 @@
else:
import toml as tomllib # type: ignore[no-redef]

from collections.abc import Iterable
from pathlib import Path
from typing import Any, Optional

from yaml import safe_load

from ape.api.config import ApeConfig
Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def assert_last_log(self, message: str):
assert message in self.head, self.fail_message

def assert_last_log_with_retries(
self, op: "Callable", message: str, tries: int = 2, delay: float = 5.0
self, op: Callable, message: str, tries: int = 2, delay: float = 5.0
):
times_tried = 0
return_value = None
Expand Down Expand Up @@ -471,7 +471,7 @@ class SubprocessRunner:
"""

def __init__(
self, root_cmd: Optional["Sequence[str]"] = None, data_folder: Optional[Path] = None
self, root_cmd: Optional[Sequence[str]] = None, data_folder: Optional[Path] = None
):
self.root_cmd = root_cmd or []
self.data_folder = data_folder
Expand Down Expand Up @@ -505,7 +505,7 @@ class ApeSubprocessRunner(SubprocessRunner):

def __init__(
self,
root_cmd: Optional[Union[str, "Sequence[str]"]] = None,
root_cmd: Optional[Union[str, Sequence[str]]] = None,
data_folder: Optional[Path] = None,
):
ape_path = Path(sys.executable).parent / "ape"
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def custom_address(zero_address):
class MyAddress(BaseAddress):
@property
def address(self) -> "AddressType":
def address(self) -> AddressType:
return zero_address

return MyAddress()
Expand Down

0 comments on commit d8fff28

Please sign in to comment.