Skip to content

Commit

Permalink
Merge pull request #660 from google/google_sync
Browse files Browse the repository at this point in the history
Google sync
  • Loading branch information
rchen152 committed Aug 28, 2020
2 parents dcebc4a + c8bbde9 commit 3c7a3a0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
@@ -1,3 +1,6 @@
Version 2020.08.28
* Let multiple PyTDFunction signatures match when *args/**kwargs is present.

Version 2020.08.17
* Allow `# type: ignore` in more places in pyi files.
* Support TypedDict function-based syntax in pyi files.
Expand Down
2 changes: 1 addition & 1 deletion pytype/__version__.py
@@ -1,2 +1,2 @@
# pylint: skip-file
__version__ = '2020.08.17'
__version__ = '2020.08.28'
9 changes: 6 additions & 3 deletions pytype/pyi/parser.py
Expand Up @@ -1304,10 +1304,13 @@ def parse_string(src, python_version, name=None, filename=None, platform=None):


def parse_file(filename, python_version, name=None, platform=None):
src = read_file(filename)
return parse_string(src, python_version, name, filename, platform)


def read_file(filename):
with open(filename, "r") as fi:
src = fi.read()
return _Parser(version=python_version, platform=platform).parse(
src, name, filename)
return fi.read()


def canonical_pyi(pyi, python_version, multiline_args=False):
Expand Down

0 comments on commit 3c7a3a0

Please sign in to comment.