Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Sep 25, 2024
1 parent 003337e commit 5615494
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1318,13 +1318,13 @@ interface Python {
* | excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)
* ```
*/
sealed class BaseExcepthandler(python: PyObject) : AST(python)

sealed class BaseExcepthandler(python: PyObject) : AST(python), WithLocation

/**
* ExceptHandler(expr? type, identifier? name, stmt* body)
* ast.ExceptHandler = class ExceptHandler(excepthandler) | ExceptHandler(expr? type,
* identifier? name, stmt* body)
*/
class ExceptHandler(pyObject: PyObject) : AST(pyObject), WithLocation {
class ExceptHandler(pyObject: PyObject) : AST(pyObject) {
val type: BaseExpr by lazy { "type" of pyObject }
val name: String by lazy { "name" of pyObject }
val body: kotlin.collections.List<BaseStmt> by lazy { "body" of pyObject }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ fun fromPython(pyObject: Any?): Python.BaseObject {
return when (objectname) {
"ast.Module" -> Python.AST.Module(pyObject)

// statements
// `ast.stmt`
"ast.FunctionDef" -> Python.AST.FunctionDef(pyObject)
"ast.AsyncFunctionDef" -> Python.AST.AsyncFunctionDef(pyObject)
"ast.ClassDef" -> Python.AST.ClassDef(pyObject)
Expand Down Expand Up @@ -347,7 +347,7 @@ fun fromPython(pyObject: Any?): Python.BaseObject {
"ast.Break" -> Python.AST.Break(pyObject)
"ast.Continue" -> Python.AST.Continue(pyObject)

// `"ast.expr`
// `ast.expr`
"ast.BoolOp" -> Python.AST.BoolOp(pyObject)
"ast.NamedExpr" -> Python.AST.NamedExpr(pyObject)
"ast.BinOp" -> Python.AST.BinOp(pyObject)
Expand Down Expand Up @@ -376,11 +376,11 @@ fun fromPython(pyObject: Any?): Python.BaseObject {
"ast.Tuple" -> Python.AST.Tuple(pyObject)
"ast.Slice" -> Python.AST.Slice(pyObject)

// `"ast.boolop`
// `ast.boolop`
"ast.And" -> Python.AST.And(pyObject)
"ast.Or" -> Python.AST.Or(pyObject)

// `"ast.cmpop`
// `ast.cmpop`
"ast.Eq" -> Python.AST.Eq(pyObject)
"ast.NotEq" -> Python.AST.NotEq(pyObject)
"ast.Lt" -> Python.AST.Lt(pyObject)
Expand All @@ -392,12 +392,12 @@ fun fromPython(pyObject: Any?): Python.BaseObject {
"ast.In" -> Python.AST.In(pyObject)
"ast.NotIn" -> Python.AST.NotIn(pyObject)

// `"ast.expr_context`
// `ast.expr_context`
"ast.Load" -> Python.AST.Load(pyObject)
"ast.Store" -> Python.AST.Store(pyObject)
"ast.Del" -> Python.AST.Del(pyObject)

// `"ast.operator`
// `ast.operator`
"ast.Add" -> Python.AST.Add(pyObject)
"ast.Sub" -> Python.AST.Sub(pyObject)
"ast.Mult" -> Python.AST.Mult(pyObject)
Expand All @@ -412,7 +412,7 @@ fun fromPython(pyObject: Any?): Python.BaseObject {
"ast.BitAnd" -> Python.AST.BitAnd(pyObject)
"ast.FloorDiv" -> Python.AST.FloorDiv(pyObject)

// `"ast.pattern`
// `ast.pattern`
"ast.MatchValue" -> Python.AST.MatchValue(pyObject)
"ast.MatchSingleton" -> Python.AST.MatchSingleton(pyObject)
"ast.MatchSequence" -> Python.AST.MatchSequence(pyObject)
Expand All @@ -422,7 +422,7 @@ fun fromPython(pyObject: Any?): Python.BaseObject {
"ast.MatchAs" -> Python.AST.MatchAs(pyObject)
"ast.MatchOr" -> Python.AST.MatchOr(pyObject)

// `"ast.unaryop`
// `ast.unaryop`
"ast.Invert" -> Python.AST.Invert(pyObject)
"ast.Not" -> Python.AST.Not(pyObject)
"ast.UAdd" -> Python.AST.UAdd(pyObject)
Expand Down

0 comments on commit 5615494

Please sign in to comment.