mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 15:14:39 +00:00
test: return typed P2PInterface from add_p2p_connection helpers #36547
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36547
Loading…
Reference in a new issue
No description provided.
Delete branch "typed-p2p-connection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Return type of add_p2p_connection and add_outbound_p2p_connection is not explicitly typed so LSPs treats the return as Any.
Add explicit return type to improve DX.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Base:
6799119cef7ead71e2b2fc7928a0ea58d720c708Head:
b08c7da4d19cf259f86a7b91a473fb6014f19eb0I found no actionable issues in this static review.
Full review report
Concept ACK
I don't use type annotations in Python code, but seems fine if others want them
nit: at some point the lines are getting long enough to split them. Maybe now? (same below)
I agree. Done on
b08c7da4d1Thanks for the review. Force-pushed
b08c7da4d1addressing https://github.com/bitcoin/bitcoin/pull/36547#discussion_r4292253804ACK
b08c7da4d1In an editor that reads python types, a dot on the value returned by
add_p2p_connectionoradd_outbound_p2p_connectionlists the methods of the class that was passed in, including those methods from P2PInterface.