Skip to content

Conversation

Pterjudin
Copy link

This PR improves code clarity and maintainability by:

  • Extracting repeated state checks into a isFinalState() helper.
  • Using ReadonlyArray for cancelHandlers for immutability.
  • Encapsulating onCancel logic in a createOnCancel() method.
  • Improving cancel() with better error handling and cleanup.
  • Adding explicit type annotations for private fields.
    *Ensuring consistent use of semicolons and adding JSDoc comments.

NB:No changes to functionality; purely refactoring for readability and robustness.

@tiangolo
Copy link
Member

This is all code in the automatically generated client, so it shouldn't really be modified by hand. 😅

So, I'll pass on this one, but thanks for the interest! ☕

@tiangolo tiangolo closed this Feb 15, 2025
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.

2 participants