[JIT] Disallow plain Optional type annotation without arg#44586
Closed
SplitInfinity wants to merge 1 commit intogh/splitinfinity/46/basefrom
Closed
[JIT] Disallow plain Optional type annotation without arg#44586SplitInfinity wants to merge 1 commit intogh/splitinfinity/46/basefrom
SplitInfinity wants to merge 1 commit intogh/splitinfinity/46/basefrom
Conversation
**Summary** This commit disallows plain `Optional` type annotations without any contained types both in type comments and in-line as Python3-style type annotations. **Test Plan** This commit adds a unit test for these two situations. [ghstack-poisoned]
This was referenced Sep 12, 2020
Codecov Report
@@ Coverage Diff @@
## gh/splitinfinity/46/base #44586 +/- ##
=========================================================
Coverage 67.98% 67.98%
=========================================================
Files 384 384
Lines 49589 49591 +2
=========================================================
+ Hits 33713 33715 +2
Misses 15876 15876
Continue to review full report at Codecov.
|
gmagogsfm
approved these changes
Sep 15, 2020
Contributor
|
@SplitInfinity merged this pull request in 43fe034. |
xuzhao9
pushed a commit
that referenced
this pull request
Sep 18, 2020
Summary: Pull Request resolved: #44586 **Summary** This commit disallows plain `Optional` type annotations without any contained types both in type comments and in-line as Python3-style type annotations. **Test Plan** This commit adds a unit test for these two situations. Test Plan: Imported from OSS Reviewed By: gmagogsfm Differential Revision: D23721517 Pulled By: SplitInfinity fbshipit-source-id: ead411e94aa0ccce227af74eb0341e2a5331370a
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
) Summary: Pull Request resolved: pytorch#44586 **Summary** This commit disallows plain `Optional` type annotations without any contained types both in type comments and in-line as Python3-style type annotations. **Test Plan** This commit adds a unit test for these two situations. Test Plan: Imported from OSS Reviewed By: gmagogsfm Differential Revision: D23721517 Pulled By: SplitInfinity fbshipit-source-id: ead411e94aa0ccce227af74eb0341e2a5331370a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
Summary
This commit disallows plain
Optionaltype annotations withoutany contained types both in type comments and in-line as
Python3-style type annotations.
Test Plan
This commit adds a unit test for these two situations.
Differential Revision: D23721517