Skip to content

Commit 94fb198

Browse files
authored
chore(CI): add linting and test view updates (#12)
1 parent 2bbd623 commit 94fb198

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

.github/workflows/test.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@ on:
66
pull_request:
77

88
jobs:
9+
style:
10+
name: Enforce Styleguide
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v5
15+
- uses: astral-sh/ruff-action@v3
16+
- run: ruff format --check --diff
17+
918
test:
1019
name: Functional Tests
1120
runs-on: ubuntu-latest
1221

1322
steps:
1423
- uses: actions/checkout@v5
1524
- uses: ApeWorX/github-action@v3
16-
- run: ape compile
25+
- run: ape compile --size
1726
- run: pip install .
18-
- run: ape test -s
27+
- run: ape test -s --gas

ruffsack/messages/admin.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
from enum import Flag
2+
from typing import TYPE_CHECKING
23

3-
from ape.types.address import AddressType
44
from eip712 import EIP712Message
55
from eth_abi import encode as abi_encode
6-
from packaging.version import Version
6+
7+
if TYPE_CHECKING:
8+
from ape.types.address import AddressType
9+
from packaging.version import Version
710

811

912
class ModifyBase(EIP712Message):
1013
_name_ = "Ruffsack Wallet"
11-
parent: "bytes32"
12-
action: "uint256" # type: ignore
14+
parent: "bytes32" # type: ignore[name-defined] # noqa: F821
15+
action: "uint256" # type: ignore[name-defined] # noqa: F821
1316
data: "bytes"
1417

1518

@@ -25,8 +28,8 @@ def __call__(
2528
self,
2629
parent: bytes,
2730
*args,
28-
version: Version | None = None,
29-
address: AddressType | None = None,
31+
version: "Version | None" = None,
32+
address: "AddressType | None" = None,
3033
chain_id: int = 1,
3134
) -> ModifyBase:
3235
class Modify(ModifyBase):

ruffsack/messages/execute.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111

1212
class Call(EIP712Type):
13-
target: "address" # type: ignore
14-
value: "uint256" # type: ignore
13+
target: "address" # type: ignore[name-defined] # noqa: F821
14+
value: "uint256" # type: ignore[name-defined] # noqa: F821
1515
data: "bytes"
1616

1717

1818
class ExecuteBase(EIP712Message):
1919
_name_ = "Ruffsack Wallet"
2020

21-
parent: "bytes32"
21+
parent: "bytes32" # type: ignore[name-defined] # noqa: F821
2222
calls: list[Call] = []
2323

2424

0 commit comments

Comments
 (0)