Skip to content

Commit

Permalink
Make getFormatFieldAtRange a little more concise (#16821)
Browse files Browse the repository at this point in the history
N/A. This is purely a refactor and changes no behavior.

Summary of the issue:
UIATextInfo._getFormatFieldAtRange is flagged as being too complex (C901). This change makes it simpler.

Description of user facing changes
None

Description of development approach
Pull each of the if statements into a separate helper function. This makes _getFormatFieldAtRange much more concise and simple.

I am submitting this change as a separate PR because I plan to continue working on this function and want to separate the refactoring from the change in logic behavior. Also I changed a fair number of lines, so I want to get this in quickly to avoid future merge conflicts.
  • Loading branch information
TristanBurchett authored Jul 14, 2024
1 parent 41418d7 commit 58e3361
Showing 1 changed file with 185 additions and 199 deletions.
Loading

0 comments on commit 58e3361

Please sign in to comment.