Skip to content

docs: add return type explanation for score method#76

Open
krauterbaquette wants to merge 2 commits intohelix-editor:masterfrom
krauterbaquette:return-doc
Open

docs: add return type explanation for score method#76
krauterbaquette wants to merge 2 commits intohelix-editor:masterfrom
krauterbaquette:return-doc

Conversation

@krauterbaquette
Copy link

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`

@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