Skip to content

AttributeError when use pygram.python_grammar_no_print_statement #4

Description

@ipfans

I am trying to port yapf to awpa, but I got a error about pygram.python_grammar_no_print_statement:

  File "projects/yapf/yapf/__init__.py", line 39, in <module>
    from yapf.yapflib import yapf_api
  File "projects/yapf/yapf/yapflib/yapf_api.py", line 42, in <module>
    from yapf.yapflib import blank_line_calculator
  File "projects/yapf/yapf/yapflib/blank_line_calculator.py", line 29, in <module>
    from yapf.yapflib import pytree_utils
  File "projects/yapf/yapf/yapflib/pytree_utils.py", line 82, in <module>
    _GRAMMAR_FOR_PY3 = pygram.python_grammar_no_print_statement.copy()
AttributeError: module 'awpa.pygram' has no attribute 'python_grammar_no_print_statement'

I checked that it should work as https://github.com/pyga/awpa/blob/master/awpa/refactor.py#L198, So am I missing something? How can I fix this error?

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