Skip to content

Commit 4c23977

Browse files
authored
Merge branch 'master' into feat/migrate-away-from-melos
2 parents 06fa073 + 26e29ca commit 4c23977

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

utilities/jorm-metrics-server/jorm_metrics_server/models/active_plans.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
"""This module provides a model for the /api/v0/vote/active/plans endpoint."""
22

33
# cspell: words pydantic
4-
# ruff: noqa
5-
6-
from typing import Optional
74

85
from pydantic import BaseModel, Field
96

@@ -61,7 +58,7 @@ class VotePlanProposalTallyPrivateStateEncrypted(BaseModel):
6158
"""
6259

6360
encrypted_tally: str
64-
total_stake: Optional[int] = Field(default=None)
61+
total_stake: int | None = Field(default=None)
6562

6663

6764
class VotePlanProposalTallyPrivateState(BaseModel):
@@ -74,10 +71,10 @@ class VotePlanProposalTallyPrivateState(BaseModel):
7471
Decrypted tally state.
7572
"""
7673

77-
encrypted: Optional[VotePlanProposalTallyPrivateStateEncrypted] = Field(
74+
encrypted: VotePlanProposalTallyPrivateStateEncrypted | None = Field(
7875
default=None, alias="Encrypted"
7976
)
80-
decrypted: Optional[VotePlanProposalTallyPrivateStateDecrypted] = Field(
77+
decrypted: VotePlanProposalTallyPrivateStateDecrypted | None = Field(
8178
default=None, alias="Decrypted"
8279
)
8380

@@ -110,10 +107,10 @@ class VotePlanProposalTally(BaseModel):
110107
private (VotePlanProposalTallyPrivate): Private tally result.
111108
"""
112109

113-
public: Optional[VotePlanProposalTallyPublic] = Field(
110+
public: VotePlanProposalTallyPublic | None = Field(
114111
default=None, alias="Public"
115112
)
116-
private: Optional[VotePlanProposalTallyPrivate] = Field(
113+
private: VotePlanProposalTallyPrivate | None = Field(
117114
default=None, alias="Private"
118115
)
119116

utilities/jorm-metrics-server/jorm_metrics_server/scraper.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
This module provides a scraper for scraping metrics from the Jormungandr API.
33
"""
44

5-
# ruff: noqa
6-
7-
from typing import Callable
5+
from collections.abc import Callable
86

97
from .client import ApiClient
108

0 commit comments

Comments
 (0)