Skip to content

[JIT] Disallow plain Optional type annotation without arg#44586

Closed
SplitInfinity wants to merge 1 commit intogh/splitinfinity/46/basefrom
gh/splitinfinity/46/head
Closed

[JIT] Disallow plain Optional type annotation without arg#44586
SplitInfinity wants to merge 1 commit intogh/splitinfinity/46/basefrom
gh/splitinfinity/46/head

Conversation

@SplitInfinity
Copy link
Copy Markdown

@SplitInfinity SplitInfinity commented Sep 12, 2020

Stack from ghstack:

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.

Differential Revision: D23721517

**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]
SplitInfinity pushed a commit that referenced this pull request Sep 12, 2020
**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-source-id: b02dfb8
Pull Request resolved: #44586
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 12, 2020

Codecov Report

Merging #44586 into gh/splitinfinity/46/base will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                    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           
Impacted Files Coverage Δ
torch/_jit_internal.py 93.49% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18bafaa...67b9949. Read the comment docs.

@facebook-github-bot
Copy link
Copy Markdown
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
@facebook-github-bot facebook-github-bot deleted the gh/splitinfinity/46/head branch September 20, 2020 14:17
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants