DEV: Improve code readability (PR #8967)

Follow-up to b0f72ca1 and 8e27fa1b.

GitHub

You’ve signed the CLA, udan11. Thank you! This pull request is ready for review.