Skip to content

Python reserved words #2

Open
Open

Description

@kyleconroy

Version

1.10.0

What happened?

Python output looks good!

Minor issue.

I had a column name named class. This generated a python dataclass that did not escape the reserved word. Not sure if the solution is to

* not name things "class" (my workaround)

* quote class in the dataclass (like type hinting can do in python)

* warn user and reject reserved words as column names/dataclass field names

(I have seen this in mysql with type as column name too.)

Relevant log output

No response

Database schema

No response

SQL queries

No response

Configuration

No response

Playground URL

No response

What operating system are you using?

macOS

What database engines are you using?

MySQL

What type of code are you generating?

Python

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions