Skip to content

docs: fix api docs#509

Merged
0x676e67 merged 1 commit intomainfrom
chore
Feb 12, 2026
Merged

docs: fix api docs#509
0x676e67 merged 1 commit intomainfrom
chore

Conversation

@0x676e67
Copy link
Copy Markdown
Owner

No description provided.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying rnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 11c1a47
Status: ✅  Deploy successful!
Preview URL: https://e63f7d87.rnet-7tt.pages.dev
Branch Preview URL: https://chore.rnet-7tt.pages.dev

View logs

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @0x676e67, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on enhancing and correcting documentation. This includes updating the main README with a new documentation link, refining the theme settings for the MkDocs documentation site, and significantly improving the API type hints and their associated docstrings in the Python interface definition file.

Highlights

  • Documentation Link Added: A new link to the official rnet.readthedocs.io documentation was added to the README.md file, providing easier access to comprehensive resources.
  • MkDocs Theme Refinement: The mkdocs.yml configuration was updated to improve the visual theme palette, adjusting primary and accent colors for both light and dark modes, and refining the toggle icons and names for theme switching.
  • API Type Definition Enhancement: The Request TypedDict in python/rnet/__init__.pyi was extended to include new fields for headers, orig_headers, default_headers, and cookies, providing more complete type hints for request parameters.
  • Interface Binding Documentation: The docstring for the interface field in the Request TypedDict was significantly expanded to detail OS-specific binding mechanisms (e.g., SO_BINDTODEVICE, IP_BOUND_IF) and included external reference links for further information.
Changelog
  • README.md
    • Added a link to the official rnet.readthedocs.io documentation.
  • docs/mkdocs.yml
    • Updated the theme palette configuration for material theme.
    • Changed primary and accent colors for light and dark modes.
    • Modified toggle icons and names for theme switching.
  • python/rnet/init.pyi
    • Added headers, orig_headers, default_headers, and cookies fields to the Request TypedDict.
    • Expanded the docstring for the interface field to include detailed OS-specific binding information and external man-page references.
    • Relocated headers, orig_headers, default_headers, and cookies fields to appear before proxy in the Request TypedDict.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@0x676e67 0x676e67 merged commit 49a5861 into main Feb 12, 2026
2 checks passed
@0x676e67 0x676e67 deleted the chore branch February 12, 2026 00:52
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves the project's documentation by adding a link to the official documentation in the README, updating the theme configuration for the documentation site, and enhancing the docstrings for API parameters in __init__.pyi. The changes are generally good, but I have a couple of suggestions for further improvement. In docs/mkdocs.yml, I recommend using a more intuitive icon for the theme toggle. In python/rnet/__init__.pyi, I've pointed out an opportunity to improve consistency in the docstrings for the interface parameter across different request types.

# Light mode (default) - listed first to be the default
- media: "(prefers-color-scheme)"
toggle:
icon: material/link
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The icon material/link is not very intuitive for a theme toggle. It's recommended to use an icon that clearly represents the action of switching themes. The mkdocs-material documentation suggests material/theme-light-dark for the auto/system-preference mode toggle, which is more conventional and user-friendly.

        icon: material/theme-light-dark

Comment on lines 838 to 859
"""
Bind to an interface by SO_BINDTODEVICE.
Bind connections only on the specified network interface.

This option is only available on the following operating systems:

- Android
- Fuchsia
- Linux
- macOS and macOS-like systems (iOS, tvOS, watchOS and visionOS)
- Solaris and illumos

On Android, Linux, and Fuchsia, this uses the
[`SO_BINDTODEVICE`][man-7-socket] socket option. On macOS and macOS-like
systems, Solaris, and illumos, this instead uses the [`IP_BOUND_IF` and
`IPV6_BOUND_IF`][man-7p-ip] socket options (as appropriate).

Note that connections will fail if the provided interface name is not a
network interface that currently exists when a connection is established.

[man-7-socket]: https://man7.org/linux/man-pages/man7/socket.7.html
[man-7p-ip]: https://docs.oracle.com/cd/E86824_01/html/E54777/ip-7p.html
"""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This is a great improvement to the documentation for the interface parameter. For consistency across the API, consider applying the same detailed docstring to the interface parameter in the WebSocketRequest TypedDict (lines 982-985), which currently has a minimal docstring.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant