Skip to content

Commit 9b24970

Browse files
authored
Merge pull request #1601 from google/google_sync
Google sync
2 parents a4d7003 + 6b19453 commit 9b24970

16 files changed

Lines changed: 68 additions & 49 deletions

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Version 2024.03.19:
2+
3+
Updates:
4+
* Add 'default' field to pytd.TypeParameter.
5+
6+
Bug fixes:
7+
* Raise an error when a non-class is passed to a class match case.
8+
19
Version 2024.03.11:
210

311
Updates:

pytype/CMakeLists.txt

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ py_library(
55
api
66
DEPS
77
.config
8-
.errors
98
.io
109
.load_pytd
10+
pytype.errors.errors
1111
)
1212

1313
toplevel_py_binary(
@@ -41,29 +41,14 @@ py_library(
4141
DEPS
4242
._utils
4343
.datatypes
44-
.errors
4544
.file_utils
4645
.imports_map_loader
4746
.module_utils
47+
pytype.errors.errors
4848
pytype.pyc.pyc
4949
pytype.typegraph.cfg_utils
5050
)
5151

52-
py_library(
53-
NAME
54-
errors
55-
SRCS
56-
errors.py
57-
DEPS
58-
._utils
59-
.debug
60-
.error_printer
61-
.pretty_printer
62-
pytype.abstract.abstract
63-
pytype.overlays.overlays
64-
pytype.pytd.pytd
65-
)
66-
6752
py_library(
6853
NAME
6954
load_pytd
@@ -102,7 +87,6 @@ py_library(
10287
.convert
10388
.convert_structural
10489
.debug
105-
.errors
10690
.imports_map_loader
10791
.io
10892
.load_pytd
@@ -113,6 +97,7 @@ py_library(
11397
.tracer_vm
11498
.vm
11599
pytype.directors.directors
100+
pytype.errors.errors
116101
)
117102

118103
py_library(
@@ -126,20 +111,6 @@ py_library(
126111
pytype.typegraph.cfg
127112
)
128113

129-
py_library(
130-
NAME
131-
error_printer
132-
SRCS
133-
error_printer.py
134-
DEPS
135-
.matcher
136-
.pretty_printer
137-
pytype.abstract.abstract
138-
pytype.overlays.overlays
139-
pytype.pytd.pytd
140-
pytype.typegraph.cfg
141-
)
142-
143114
filegroup(
144115
NAME
145116
test_data
@@ -253,13 +224,13 @@ py_library(
253224
.attribute
254225
.config
255226
.convert
256-
.errors
257227
.load_pytd
258228
.matcher
259229
.output
260230
.tracer_vm
261231
.vm_utils
262232
pytype.abstract.abstract
233+
pytype.errors.errors
263234
pytype.overlays.overlays
264235
pytype.typegraph.cfg
265236
pytype.typegraph.cfg_utils
@@ -512,8 +483,8 @@ py_test(
512483
typegraph_metrics_test.py
513484
DEPS
514485
.context
515-
.errors
516486
.vm
487+
pytype.errors.errors
517488
pytype.tests.test_base
518489
pytype.typegraph.cfg
519490
)
@@ -600,9 +571,9 @@ py_test(
600571
.compare
601572
.config
602573
.context
603-
.errors
604574
.load_pytd
605575
pytype.abstract.abstract
576+
pytype.errors.errors
606577
pytype.pytd.pytd
607578
pytype.tests.test_base
608579
)
@@ -638,9 +609,9 @@ py_test(
638609
DEPS
639610
.config
640611
.context
641-
.errors
642612
.load_pytd
643613
pytype.abstract.abstract
614+
pytype.errors.errors
644615
pytype.tests.test_base
645616
)
646617

@@ -662,12 +633,12 @@ py_test(
662633
.config
663634
.constant_folding
664635
.context
665-
.errors
666636
.load_pytd
667637
.state
668638
pytype.abstract.abstract
669639
pytype.blocks.blocks
670640
pytype.directors.directors
641+
pytype.errors.errors
671642
pytype.pyc.pyc
672643
pytype.pytd.pytd
673644
pytype.tests.test_base
@@ -776,6 +747,7 @@ add_subdirectory(abstract)
776747
add_subdirectory(ast)
777748
add_subdirectory(blocks)
778749
add_subdirectory(directors)
750+
add_subdirectory(errors)
779751
add_subdirectory(imports)
780752
add_subdirectory(inspect)
781753
add_subdirectory(overlays)

pytype/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# pylint: skip-file
2-
__version__ = '2024.03.11'
2+
__version__ = '2024.03.19'

pytype/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
from typing import List, overload
1313

1414
from pytype import datatypes
15-
from pytype import errors
1615
from pytype import file_utils
1716
from pytype import imports_map_loader
1817
from pytype import module_utils
1918
from pytype import utils
19+
from pytype.errors import errors
2020
from pytype.pyc import compiler
2121
from pytype.typegraph import cfg_utils
2222

pytype/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from pytype import attribute
99
from pytype import config
1010
from pytype import convert
11-
from pytype import errors
1211
from pytype import load_pytd
1312
from pytype import matcher
1413
from pytype import output
@@ -17,6 +16,7 @@
1716
from pytype.abstract import abstract
1817
from pytype.abstract import abstract_utils
1918
from pytype.abstract import function
19+
from pytype.errors import errors
2020
from pytype.overlays import special_builtins
2121
from pytype.typegraph import cfg
2222
from pytype.typegraph import cfg_utils

pytype/directors/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ py_test(
6262
directors_test.py
6363
DEPS
6464
.directors
65-
pytype.errors
65+
pytype.errors.errors
6666
)

pytype/directors/directors_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import sys
44
import textwrap
55

6-
from pytype import errors
76
from pytype.directors import directors
7+
from pytype.errors import errors
88
import unittest
99

1010
_TEST_FILENAME = "my_file.py"

pytype/errors/CMakeLists.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
add_package()
2+
3+
py_library(
4+
NAME
5+
errors
6+
DEPS
7+
._errors
8+
.error_printer
9+
)
10+
11+
py_library(
12+
NAME
13+
_errors
14+
SRCS
15+
errors.py
16+
DEPS
17+
.error_printer
18+
pytype._utils
19+
pytype.debug
20+
pytype.pretty_printer
21+
pytype.abstract.abstract
22+
pytype.overlays.overlays
23+
pytype.pytd.pytd
24+
)
25+
26+
py_library(
27+
NAME
28+
error_printer
29+
SRCS
30+
error_printer.py
31+
DEPS
32+
pytype.matcher
33+
pytype.pretty_printer
34+
pytype.abstract.abstract
35+
pytype.overlays.overlays
36+
pytype.pytd.pytd
37+
pytype.typegraph.cfg
38+
)

pytype/errors/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)