Skip to content

test: return typed P2PInterface from add_p2p_connection helpers - #36547

Open
ViniciusCestarii wants to merge 1 commit into
bitcoin:masterfrom
ViniciusCestarii:typed-p2p-connection
Open

ViniciusCestarii wants to merge 1 commit into
bitcoin:masterfrom
ViniciusCestarii:typed-p2p-connection

Conversation

@ViniciusCestarii

Copy link
Copy Markdown
Contributor

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.

@DrahtBot DrahtBot added the Tests label Oct 15, 2026
@DrahtBot

DrahtBot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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.

Type Reviewers
ACK tumutech
Concept ACK fanquake

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:

  • #36990 (test: replace hard-coded RPC error codes by l0rinc)

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.

@fanquake

Copy link
Copy Markdown
Member

Concept ACK

@maflcko maflcko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use type annotations in Python code, but seems fine if others want them

@ViniciusCestarii

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Force-pushed b08c7da addressing #36547 (comment)

@tumutech

Copy link
Copy Markdown

ACK b08c7da

In an editor that reads python types, a dot on the value returned by add_p2p_connection or add_outbound_p2p_connection lists the methods of the class that was passed in, including those methods from P2PInterface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants