sglang
sglang copied to clipboard
Updated the use of `Type | None` to `Optional[Type]` for support `[email protected]`
Motivation
So Python 3.8 is supported. The versions here, they are not tested like this on the regular CI, so it can be missed but we should be careful. I don't think, the version of dependencies here necessarily stops this code path from running.
Modifications
https://discuss.python.org/t/clarification-for-pep-604-is-foo-int-none-to-replace-all-use-of-foo-optional-int/26945/2 All of the replacements are safe.
Checklist
- [ ] Format your code according to the Code Formatting with Pre-Commit.
- [ ] Add unit tests as outlined in the Running Unit Tests.
- [ ] Update documentation / docstrings / example tutorials as needed, according to Writing Documentation.
- [ ] Provide throughput / latency benchmark results and accuracy evaluation results as needed, according to Benchmark and Profiling and Accuracy Results.
- [ ] For reviewers: If you haven't made any contributions to this PR and are only assisting with merging the main branch, please remove yourself as a co-author when merging the PR.
- [ ] Please feel free to join our Slack channel at https://slack.sglang.ai to discuss your PR.