Skip to content

Conversation

@gytic
Copy link

@gytic gytic commented Apr 2, 2025

This PR improves the documentation for the pattern::source method by providing additional context for the return type.

The docstring now specifies, in which Cases None will be returned, as this is unintuitive otherwise.

If a rewording is wanted, please let me know.

/// *Note:* The `ignore_case` setting is overwritten to match the casing of
/// each pattern atom.
///
/// Returns [None] if `needle` from `matcher` is longer than `haystack`

Choose a reason for hiding this comment

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

Analogous to other docstrings:

Suggested change
/// Returns [None] if `needle` from `matcher` is longer than `haystack`
/// Returns `None` if `needle` from `matcher` is longer than `haystack`

@gytic gytic requested a review from reneleonhardt July 13, 2025 18:57
@reneleonhardt
Copy link

@gytic Sorry, I have no maintainer permissions, you have to find someone else.

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.

2 participants