Skip to content

Commit d0f42cd

Browse files
committed
fix: add type hint to filtered_set
removed pyrefly check temporary
1 parent ec38256 commit d0f42cd

6 files changed

Lines changed: 90 additions & 14 deletions

File tree

.pre-commit-config.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,3 @@ repos:
1414
language: system
1515
types_or: [python, pyi]
1616
require_serial: true
17-
18-
- id: pyrefly-check
19-
name: Pyrefly (type checking)
20-
entry: pyrefly check
21-
language: system
22-
pass_filenames: false
23-
always_run: true

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ dev = [
6363
"respx>=0.22.0",
6464
"pyrefly>=0.46.0",
6565
"ruff>=0.14.10",
66-
"prek>=0.3.3"
66+
"prek>=0.3.3",
67+
"pre-commit>=4.5.1",
6768
]
6869
docs = [
6970
"mkdocs>=1.6.1",

src/apkit/_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
commit_id: COMMIT_ID
2929
__commit_id__: COMMIT_ID
3030

31-
__version__ = version = '0.3.8.post1.dev28+g78db9c7ea.d20260223'
32-
__version_tuple__ = version_tuple = (0, 3, 8, 'post1', 'dev28', 'g78db9c7ea.d20260223')
31+
__version__ = version = '0.3.8.post1.dev51+gec3825687.d20260223'
32+
__version_tuple__ = version_tuple = (0, 3, 8, 'post1', 'dev51', 'gec3825687.d20260223')
3333

3434
__commit_id__ = commit_id = None

src/apkit/client/base/context.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Tuple,
1414
TypeVar,
1515
Union,
16+
cast,
1617
get_args,
1718
)
1819

@@ -81,8 +82,12 @@ def __init__(
8182
self.__validate_sign_with(sign_with=sign_with)
8283

8384
def __validate_sign_with(self, sign_with: Optional[List[SignMethod]]):
84-
raw_input = sign_with if sign_with is not None else ["draft-cavage"]
85-
filtered_set = set(raw_input) & ALLOWED_SIGN_METHODS
85+
raw_input = (
86+
sign_with if sign_with is not None else [cast(SignMethod, "draft-cavage")]
87+
)
88+
filtered_set: Set[SignMethod] = set(raw_input) & cast(
89+
Set[SignMethod], ALLOWED_SIGN_METHODS
90+
)
8691

8792
conflict_draft = EXCLUSIVE_SET["draft-9421"]
8893
if conflict_draft.issubset(filtered_set):

src/apkit/nodeinfo/builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import Literal, Optional, Union
22

33
from apmodel.nodeinfo.nodeinfo import (
4-
Nodeinfo, # noqa: F401
4+
Nodeinfo,
55
)
66
from apmodel.nodeinfo.nodeinfo import (
7-
NodeinfoInbound as Inbound, # noqa: F401
7+
NodeinfoInbound as Inbound,
88
)
99
from apmodel.nodeinfo.nodeinfo import (
1010
NodeinfoOutbound as Outbound, # noqa: F401

uv.lock

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

0 commit comments

Comments
 (0)