Skip to content

Refactor code by removing internal ok variable#194

Open
phiwuu wants to merge 1 commit into
mainfrom
internal/source-manager-remove-ok-variable
Open

Refactor code by removing internal ok variable#194
phiwuu wants to merge 1 commit into
mainfrom
internal/source-manager-remove-ok-variable

Conversation

@phiwuu
Copy link
Copy Markdown
Member

@phiwuu phiwuu commented May 21, 2026

Refactor method register_file:
The internal variable ok represents an internal state that tracks the control flow of the try-except block.
The variable is not needed after all, as we can directly return True or False in the appropriate control flows using early return.

This refactoring simplifies code maintenance.

@phiwuu phiwuu requested a review from a team as a code owner May 21, 2026 16:03
@phiwuu phiwuu added the internal Affects the CI, tests or refactorings only, not relevant to the end-user label May 21, 2026
@phiwuu phiwuu force-pushed the internal/source-manager-remove-ok-variable branch from 10e215f to 3c281ea Compare May 21, 2026 16:05
Refactor method `register_file`:
The internal variable `ok` represents an internal state that tracks
the control flow of the try-except block.
The variable is not needed after all, as we can directly return
`True` or `False` in the appropriate control flows using early return.

This refactoring simplifies code maintenance.
@phiwuu phiwuu force-pushed the internal/source-manager-remove-ok-variable branch from 3c281ea to b5e4d3b Compare May 21, 2026 16:07
@phiwuu phiwuu enabled auto-merge (squash) May 21, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Affects the CI, tests or refactorings only, not relevant to the end-user

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant