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

Conversation

@mvilanova
Copy link
Contributor

No description provided.

@mvilanova mvilanova self-assigned this May 8, 2025
@mvilanova mvilanova added enhancement New feature or request chore labels May 8, 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 modernizes the codebase to leverage built‐in type annotations and generic types introduced in recent Python versions. Key changes include replacing typing.Optional and typing.List with the union operator (|) and built‐in generics (e.g. list[..]), and updating function signatures in service, model, view, and helper modules accordingly.

Reviewed Changes

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

Show a summary per file
File Description
src/dispatch/data/alert/service.py Updated return types from Optional to Alert
src/dispatch/data/alert/models.py Converted Optional and List types to union types and built‐in generics
src/dispatch/cost_model/service.py Changed List returns to list[...] using the new built‐in generics
src/dispatch/conversation/service.py Updated function return annotations from Optional to union type
src/dispatch/config.py Converted typing.List parameter in get_env_tags to list[...]
src/dispatch/conference/service.py Updated return types from Optional to union types
src/dispatch/conference/flows.py Modernized list parameters in function signatures
src/dispatch/case_cost_type/service.py Updated function return types from Optional to union types
src/dispatch/case_cost_type/models.py Replaced Optional types with union types for better consistency
src/dispatch/case_cost/service.py Updated various return types from List[Optional[...]] to list[...]
src/dispatch/case_cost/models.py Converted Optional and List annotations to union and built‐in generics
src/dispatch/case/views.py Changed response_model annotations to use built‐in list types
src/dispatch/case/type/service.py Replaced Optional with union types in function signatures
src/dispatch/case/severity/service.py Updated return types to use union types
src/dispatch/case/service.py Modernized nearly all Optional and List type hints in service functions
src/dispatch/case/priority/service.py Updated function annotations with the new union operator

@mvilanova mvilanova changed the title [WIP] chore(typing): modernizes codebase to use Python 3.9+ built-in types chore(typing): modernizes codebase to use Python 3.9+ built-in types May 8, 2025
@mvilanova mvilanova merged commit 4f4e739 into main May 8, 2025
8 of 9 checks passed
@mvilanova mvilanova deleted the chore/updates-typing branch May 8, 2025 18:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

chore enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants