Skip to content

Commit a5a7802

Browse files
committed
chore: Run ruff
1 parent bd8b1be commit a5a7802

File tree

10 files changed

+12
-16
lines changed

10 files changed

+12
-16
lines changed

src/anchorpy/clientgen/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
IdlType,
99
IdlTypeArray,
1010
IdlTypeDef,
11-
IdlTypeDefined,
1211
IdlTypeDefAlias,
12+
IdlTypeDefined,
1313
IdlTypeDefStruct,
1414
IdlTypeOption,
1515
IdlTypeSimple,

src/anchorpy/clientgen/instructions.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
from pathlib import Path
2-
from typing import Optional, Union, cast
2+
from typing import Optional, cast
33

44
from anchorpy_idl import (
55
Idl,
66
IdlAccountItem,
77
IdlInstructionAccounts,
88
IdlSeedConst,
9-
IdlTypeArray,
10-
IdlTypeSimple,
119
)
1210
from autoflake import fix_code
1311
from black import FileMode, format_str
@@ -42,7 +40,6 @@
4240
TypedParam,
4341
)
4442
from anchorpy.coder.common import _sighash
45-
from anchorpy.coder.idl import FIELD_TYPE_MAP
4643

4744
CONST_ACCOUNTS = {
4845
"associated_token_program": "ASSOCIATED_TOKEN_PROGRAM_ID",

src/anchorpy/coder/common.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
IdlType,
1010
IdlTypeArray,
1111
IdlTypeCompound,
12-
IdlTypeDefEnum,
13-
IdlTypeDefined,
1412
IdlTypeDef,
1513
IdlTypeDefAlias,
16-
IdlTypeDefStruct,
14+
IdlTypeDefEnum,
15+
IdlTypeDefined,
1716
IdlTypeOption,
1817
IdlTypeSimple,
1918
IdlTypeVec,

src/anchorpy/coder/event.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
IdlEvent,
88
)
99
from construct import Adapter, Bytes, Construct, Sequence, Switch
10-
from pyheck import snake
1110

1211
from anchorpy.coder.idl import _typedef_layout
1312
from anchorpy.program.common import Event

src/anchorpy/coder/idl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
IdlField,
1010
IdlType,
1111
IdlTypeArray,
12-
IdlTypeDefined,
1312
IdlTypeDef,
1413
IdlTypeDefAlias,
1514
IdlTypeDefEnum,
15+
IdlTypeDefined,
1616
IdlTypeDefStruct,
1717
IdlTypeOption,
1818
IdlTypeSimple,

src/anchorpy/coder/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from typing import Any, Dict
44

5-
from anchorpy_idl import Idl, IdlTypeDef
5+
from anchorpy_idl import Idl
66
from construct import Construct, Container
77

88
from anchorpy.coder.idl import _typedef_layout_without_field_name

src/anchorpy/program/namespace/instruction.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
"""This module deals with generating program instructions."""
22
from typing import Any, Callable, Sequence, Tuple, cast
33

4-
from anchorpy_idl import IdlAccount, IdlAccountItem, IdlInstruction, IdlInstructionAccount, IdlInstructionAccounts
4+
from anchorpy_idl import (
5+
IdlAccountItem,
6+
IdlInstruction,
7+
IdlInstructionAccount,
8+
IdlInstructionAccounts,
9+
)
510
from pyheck import snake
611
from solders.instruction import AccountMeta, Instruction
712
from solders.pubkey import Pubkey

tests/client_gen/test_functional.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
from filecmp import dircmp
33
from pathlib import Path
44

5-
from anchorpy.cli import client_gen
6-
from py.path import local
75
from solana.rpc.core import RPCException
86
from solders.pubkey import Pubkey
97
from solders.rpc.errors import SendTransactionPreflightFailureMessage

tests/unit/test_clientgen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from anchorpy import Idl
44
from anchorpy.clientgen.instructions import gen_accounts
5-
from anchorpy.clientgen.types import gen_struct
65
from genpy import Suite
76

87

tests/unit/test_types_coder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from anchorpy_idl import Idl
66

77

8-
98
@pytest.mark.unit
109
def test_can_encode_and_decode_user_defined_types():
1110
"""Test that the TypesCoder can encode and decode user-defined types."""

0 commit comments

Comments
 (0)