Skip to content

Commit

Permalink
CI: Include all modules into pytype checking
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 688522741
  • Loading branch information
oprypin authored and copybara-github committed Oct 28, 2024
1 parent 9852e85 commit 6df9d95
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
15 changes: 5 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@ build-backend = "setuptools.build_meta"

[tool.pytype]
inputs = [
"pytype/*.py",
"pytype/overlays/",
"pytype/pyc/",
"pytype/pyi/",
"pytype/pytd/",
"pytype/tools/",
"pytype/typegraph/",
"pytype/**/*.py",
"pytype_extensions/**/*.py",
]
exclude = [
"**/*_test.py",
"**/test_*.py",
"**/*_test_*.py",
"pytype/tools/merge_pyi/test_data/",
"pytype/tools/xref/testdata/",
]
"**/typeshed/",
"**/test_data/",
"**/testdata/",
]
4 changes: 3 additions & 1 deletion pytype/abstract/_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,9 @@ class FunctionPyTDClass(PyTDClass):
"""

def __init__(
self, func: "_function_base.Function", ctx: "context.Context"
self,
func: "_function_base.Function | _function_base.BoundFunction",
ctx: "context.Context",
) -> None:
super().__init__(
"typing.Callable",
Expand Down
4 changes: 3 additions & 1 deletion pytype/imports/pickle_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def DecodeAst(data: bytes) -> serialize_ast.SerializableAst:
def LoadAst(
filename: Path, compress: bool = False, open_function=open
) -> serialize_ast.SerializableAst:
return _Load(AstDecoder, filename, compress, open_function)
return _Load(
AstDecoder, filename, compress, open_function
) # pytype: disable=bad-return-type


def DecodeBuiltins(data: bytes) -> serialize_ast.ModuleBundle:
Expand Down

0 comments on commit 6df9d95

Please sign in to comment.