Skip to content

Commit 3977a02

Browse files
committed
Add Str.kind field to typed_ast stubs
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]: python/typed_ast#49
1 parent f7c9677 commit 3977a02

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

third_party/3/typed_ast/ast27.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ class Num(expr):
246246

247247
class Str(expr):
248248
s = ... # type: bytes
249+
kind = ... # type: str
249250

250251
class Attribute(expr):
251252
value = ... # type: expr

third_party/3/typed_ast/ast3.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ class Num(expr):
264264

265265
class Str(expr):
266266
s = ... # type: str
267+
kind = ... # type: str
267268

268269
class FormattedValue(expr):
269270
value = ... # type: expr

0 commit comments

Comments
 (0)