-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…issuecomment-657167922 and introduce regression test
- Loading branch information
1 parent
6184ffd
commit d5f56a0
Showing
6 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
load("@rules_python//python:defs.bzl", "py_library") | ||
|
||
py_library( | ||
name = "foo", | ||
srcs = ["bar.py"], | ||
deps = [ | ||
"//test/types", | ||
], | ||
srcs_version = "PY3", | ||
visibility = ["//test:__subpackages__"], | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from test.types import FooEnumType, SeqOfMaybeInts | ||
|
||
blah: SeqOfMaybeInts = [1, None, 2, None, 3, 4, 5] | ||
blurgh: FooEnumType = FooEnumType.BAR |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("@rules_python//python:defs.bzl", "py_library") | ||
|
||
py_library( | ||
name = "types", | ||
srcs = ["__init__.py"], | ||
deps = [], | ||
srcs_version = "PY3", | ||
visibility = ["//test:__subpackages__"], | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import enum | ||
from typing import List, Optional | ||
|
||
|
||
class FooEnumType(enum.IntEnum): | ||
BAR = 1 | ||
BAZ = 2 | ||
BEE = 3 | ||
BOO = 4 | ||
|
||
|
||
SeqOfMaybeInts = List[Optional[int]] |