Skip to content

Conversation

robsdedude
Copy link

I propose to make the unasync functions of Rule public so that custom Rule implementations can more easily inherit from Rule and change the exact replacement mechanisms.

Here are my use-cases that this would enable without having to rely on internal APIs:

  • I have code examples in doc strings and I want to unasync those as well. Hence the need for a custom unasync_string)
  • I have doc references that I want to unasync. E.g., from :ref:`async-thingamajig` to :ref:`thingamajig`.
  • I want to have a more complex replacement customization that just a hard-coded mapping of identifiers. E.g. something like this
    len(name) > 6 and name.startswith("async_"):
        return name[6:]

@robsdedude robsdedude force-pushed the feat/public-rule-unasync-funcs branch from 5d08d89 to aff9c84 Compare September 29, 2025 15:39
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