Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@whitdog47
Copy link
Contributor

@whitdog47 whitdog47 commented May 17, 2025

This PR continues the previousl efforts to make None defaults and type conversions more explicit.

  • In interactive.py, we found a few more explicit int() conversions needed for project and entity identifier fields.
  • In the case severity and priority models, explicit default values (i.e. “= None”) have been added for optional fields.
  • In the case models, explicit defaults have been set for multiple fields to improve clarity and consistency.

@whitdog47 whitdog47 requested review from Copilot and wssheldon May 17, 2025 00:13
@whitdog47 whitdog47 self-assigned this May 17, 2025
@whitdog47 whitdog47 added the bug Something isn't working label May 17, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to make None defaults and type conversions more explicit.

  • In interactive.py, explicit int() conversions are introduced for project and entity identifier fields.
  • In the case severity and priority models, explicit default values (i.e. “= None”) have been added for optional fields.
  • In the case models, explicit defaults have been set for multiple fields to improve clarity and consistency.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/dispatch/plugins/dispatch_slack/case/interactive.py Added explicit int() conversions for project and engagement IDs as well as entity ids.
src/dispatch/case/severity/models.py Set explicit default values for optional fields in Pydantic models.
src/dispatch/case/priority/models.py Assigned explicit defaults for optional fields and formatted the default_listener_doc for clarity.
src/dispatch/case/models.py Introduced explicit default assignments for optional fields in various Pydantic models.

@wssheldon
Copy link
Contributor

I'm assuming anything that was Optional without a default before (or with it I suppose) that was updated to * | None must now set a default of None?

Does this get all of them?

@whitdog47
Copy link
Contributor Author

@wssheldon turns out there were 31 more files that needed it!

@whitdog47 whitdog47 merged commit 9ff885f into main May 19, 2025
9 checks passed
@whitdog47 whitdog47 deleted the fix/more-default-none-values branch May 19, 2025 15:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants