Skip to content

Commit

Permalink
Add msgspec dep, fix lint issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
rchen152 committed Mar 4, 2024
1 parent dcd8daf commit 4141f50
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pytype/abstract/_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,8 @@ def __hash__(self):
for name, val in self.formal_type_parameters.items():
# The 'is not True' check is to prevent us from incorrectly caching
# the hash when val.resolved == LateAnnotation._RESOLVING.
if val.is_late_annotation() and val.resolved is not True: # pylint: disable=g-bool-id-comparison # pytype: disable=attribute-error
if (val.is_late_annotation() and
val.resolved is not True): # pylint: disable=g-bool-id-comparison # pytype: disable=attribute-error
cache = False
items.append((name, val.full_name))
hashval = hash((self.base_cls, tuple(items)))
Expand Down
2 changes: 1 addition & 1 deletion pytype/pytd/pytd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_class_type_equality(self):

def test_iter(self):
n = pytd.NamedType("int")
fields = [f for f in n]
fields = list(n)
self.assertEqual(fields, [n.name])

def test_union_type_eq(self):
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ importlab>=0.8
immutabledict>=4.1.0
jinja2>=3.1.2
libcst>=1.0.1
msgspec>=0.18.6
networkx<3.2
ninja>=1.10.0.post2
pybind11>=2.10.1
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ install_requires =
immutabledict>=4.1.0
jinja2>=3.1.2
libcst>=1.0.1
msgspec>=0.18.6
networkx<3.2
ninja>=1.10.0.post2
pycnite>=2023.10.11
Expand Down

0 comments on commit 4141f50

Please sign in to comment.