New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split up logic in sphinx.transforms.i18n.Locale.apply
#11166
Conversation
Before, the apply method was one big 400-line chunk. This just splits it up into more manageable chunks by introducing a _NodeUpdater auxiliary class holding logic for updating various types of references.
To give a bit of context, I did this as a prelude to trying my hand on actual functionality changes (like for #11157). I was finding the Locale transform pretty hard to follow. |
Would anyone be able to review this PR? I understand that this is not necessarily the most fun type of PR, as it doesn't add anything by itself, but I have some planned i18n improvements that depend on it. |
For some reason
|
# Conflicts: # sphinx/transforms/i18n.py
sphinx.transforms.i18n.Locale.apply
Thank you @jeanas! A |
Sorry for leaving those type errors! Thank you for taking care of them yourself, I wasn't expecting it from a busy maintainer. The failed test seems flaky? I'm not sure why it failed, but it then passed on master. |
Before, the apply method was one big 400-line chunk. This just splits it up into more manageable chunks by introducing a _NodeUpdater auxiliary class holding logic for updating various types of references.
Feature or Bugfix
Purpose
Make the
Locale
transform easier to understand and modify.