Skip to content

Commit a065bce

Browse files
committed
Update black and reformat
1 parent 8f17630 commit a065bce

17 files changed

+695
-734
lines changed

integration-test/test/test_certificate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
class TestDelegation(TestBase):
1212
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
1313
def test_stake_delegation(self):
14-
1514
address = Address(
1615
self.payment_key_pair.verification_key.hash(),
1716
self.stake_key_pair.verification_key.hash(),

integration-test/test/test_plutus.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
class TestPlutus(TestBase):
1313
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
1414
def test_plutus_v1(self):
15-
1615
# ----------- Giver give ---------------
1716

1817
with open("./plutus_scripts/fortytwo.plutus", "r") as f:
@@ -97,7 +96,6 @@ def test_plutus_v1(self):
9796
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
9897
@pytest.mark.post_alonzo
9998
def test_plutus_v2_datum_hash(self):
100-
10199
# ----------- Giver give ---------------
102100

103101
with open("./plutus_scripts/fortytwoV2.plutus", "r") as f:
@@ -173,7 +171,6 @@ def test_plutus_v2_datum_hash(self):
173171
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
174172
@pytest.mark.post_alonzo
175173
def test_plutus_v2_inline_script_inline_datum(self):
176-
177174
# ----------- Giver give ---------------
178175

179176
with open("./plutus_scripts/fortytwoV2.plutus", "r") as f:
@@ -237,7 +234,6 @@ def test_plutus_v2_inline_script_inline_datum(self):
237234
@retry(tries=TEST_RETRIES, backoff=1.5, delay=6, jitter=(0, 4))
238235
@pytest.mark.post_alonzo
239236
def test_plutus_v2_ref_script(self):
240-
241237
# ----------- Create a reference script ---------------
242238

243239
with open("./plutus_scripts/fortytwoV2.plutus", "r") as f:

poetry.lock

Lines changed: 692 additions & 695 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pycardano/certificate.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
@dataclass(repr=False)
1717
class StakeCredential(ArrayCBORSerializable):
18-
1918
_CODE: Optional[int] = field(init=False, default=None)
2019

2120
credential: Union[VerificationKeyHash, ScriptHash]
@@ -29,23 +28,20 @@ def __post_init__(self):
2928

3029
@dataclass(repr=False)
3130
class StakeRegistration(ArrayCBORSerializable):
32-
3331
_CODE: int = field(init=False, default=0)
3432

3533
stake_credential: StakeCredential
3634

3735

3836
@dataclass(repr=False)
3937
class StakeDeregistration(ArrayCBORSerializable):
40-
4138
_CODE: int = field(init=False, default=1)
4239

4340
stake_credential: StakeCredential
4441

4542

4643
@dataclass(repr=False)
4744
class StakeDelegation(ArrayCBORSerializable):
48-
4945
_CODE: int = field(init=False, default=2)
5046

5147
stake_credential: StakeCredential

pycardano/cip/cip8.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ def verify(
151151

152152
# generate/extract the cose key
153153
if not attach_cose_key:
154-
155154
# get the verification key from the headers
156155
verification_key = decoded_message.phdr[KID]
157156

pycardano/coinselection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def select(
8484
include_max_fee: Optional[bool] = True,
8585
respect_min_utxo: Optional[bool] = True,
8686
) -> Tuple[List[UTxO], Value]:
87-
8887
available: List[UTxO] = sorted(utxos, key=lambda utxo: utxo.output.lovelace)
8988
max_fee = max_tx_fee(context) if include_max_fee else 0
9089
total_requested = Value(max_fee)

pycardano/plutus.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ def from_json(cls: Type[PlutusData], data: str) -> PlutusData:
652652

653653
@dataclass
654654
class RawPlutusData(CBORSerializable):
655-
656655
data: CBORTag
657656

658657
def to_primitive(self) -> CBORTag:

pycardano/transaction.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ def to_shallow_primitive(self):
267267

268268
@dataclass(repr=False)
269269
class _Script(ArrayCBORSerializable):
270-
271270
_TYPE: int = field(init=False, default=0)
272271

273272
script: Union[NativeScript, PlutusV1Script, PlutusV2Script]
@@ -293,7 +292,6 @@ def from_primitive(cls: Type[_Script], values: List[Primitive]) -> _Script:
293292

294293
@dataclass(repr=False)
295294
class _DatumOption(ArrayCBORSerializable):
296-
297295
_TYPE: int = field(init=False, default=0)
298296

299297
datum: Union[DatumHash, Any]
@@ -329,7 +327,6 @@ def from_primitive(
329327

330328
@dataclass(repr=False)
331329
class _ScriptRef(CBORSerializable):
332-
333330
script: _Script
334331

335332
def to_primitive(self) -> Primitive:
@@ -374,7 +371,6 @@ class _TransactionOutputLegacy(ArrayCBORSerializable):
374371

375372
@dataclass(repr=False)
376373
class TransactionOutput(CBORSerializable):
377-
378374
address: Address
379375

380376
amount: Union[Value]

pycardano/txbuilder.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,8 @@ def _merge_changes(changes):
516516
self._outputs += changes
517517

518518
if change_address:
519-
520519
if merge_change:
521-
522520
for idx, output in enumerate(original_outputs):
523-
524521
# Find any transaction outputs which already contain the change address
525522
if change_address == output.address:
526523
if change_output_index is None or output.lovelace == 0:
@@ -607,7 +604,7 @@ def _pack_tokens_for_change(
607604
output = TransactionOutput(change_address, base_coin)
608605

609606
# iteratively add tokens to output
610-
for (policy_id, assets) in change_estimator.multi_asset.items():
607+
for policy_id, assets in change_estimator.multi_asset.items():
611608
temp_multi_asset = MultiAsset()
612609
temp_value = Value(coin=0)
613610
temp_assets = Asset()
@@ -673,7 +670,6 @@ def _input_vkey_hashes(self) -> Set[VerificationKeyHash]:
673670
return results
674671

675672
def _certificate_vkey_hashes(self) -> Set[VerificationKeyHash]:
676-
677673
results = set()
678674

679675
def _check_and_add_vkey(stake_credential: StakeCredential):
@@ -697,7 +693,6 @@ def _get_total_key_deposit(self):
697693
return self.context.protocol_param.key_deposit * len(results)
698694

699695
def _withdrawal_vkey_hashes(self) -> Set[VerificationKeyHash]:
700-
701696
results = set()
702697

703698
if self.withdrawals:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ pytest = "^7.2.1"
4040
pytest-cov = "^4.0.0"
4141
flake8 = "^5.0.4"
4242
isort = "^5.11.4"
43-
black = "^22.3.0"
43+
black = "^23.1.0"
4444
sphinx-copybutton = "^0.5.0"
4545
retry = "^0.9.2"
4646
Flask = "^2.0.3"
4747
pytest-xdist = "^3.0.2"
48-
mypy = "^0.991"
48+
mypy = "^1.0.1"
4949

5050
[build-system]
5151
requires = ["poetry-core>=1.0.0"]

0 commit comments

Comments
 (0)