Skip to content

py5_tools.translators.processingpy2imported acting strange (converting class names it should not touch) #111

Closed

Description

@villares

A sort of minimal example of the problem:

pp2i = py5_tools.translators.processingpy2imported
source = """
def setup():
    size(400, 400)
    
def draw():
    noStroke()
    rect(200, 200, 100, 100)
    m = MyClass()

class MyClass:
    pass
"""
result = pp2i.translate_code(source)
print(result)

Result:

def setup():
    size(400, 400)


def draw():
    no_stroke()
    rect(200, 200, 100, 100)
    m = my_class()

class my_class:
    pass

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