From 44e6b6e0d4063d0c87ba0318ad2095185deaad17 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Tue, 18 Dec 2018 10:37:19 -0800 Subject: [PATCH] Add Str.kind field to typed_ast stubs (#2699) We recently cut a new-ish release of typed-ast that [adds a new field][0] named `kind` to the `ast27.Str` and `ast3.Str` classes. This field stores whatever string modifiers (like `b` or `u`) were present on the original string. As a note, I've confirmed that this field is indeed a str (and not bytes) for ast27's Str class. [0]: https://github.com/python/typed_ast/pull/49 --- third_party/3/typed_ast/ast27.pyi | 1 + third_party/3/typed_ast/ast3.pyi | 1 + 2 files changed, 2 insertions(+) diff --git a/third_party/3/typed_ast/ast27.pyi b/third_party/3/typed_ast/ast27.pyi index ac775a02c..1a08798e0 100644 --- a/third_party/3/typed_ast/ast27.pyi +++ b/third_party/3/typed_ast/ast27.pyi @@ -246,6 +246,7 @@ class Num(expr): class Str(expr): s = ... # type: bytes + kind = ... # type: str class Attribute(expr): value = ... # type: expr diff --git a/third_party/3/typed_ast/ast3.pyi b/third_party/3/typed_ast/ast3.pyi index 810c8a6b0..2e18242dc 100644 --- a/third_party/3/typed_ast/ast3.pyi +++ b/third_party/3/typed_ast/ast3.pyi @@ -264,6 +264,7 @@ class Num(expr): class Str(expr): s = ... # type: str + kind = ... # type: str class FormattedValue(expr): value = ... # type: expr