Skip to content

ebb-lint barfs on f-strings #20

Open
@Julian

Description

(Tracked upstream via pyga/awpa#14, but filing it here too since it affects ebb-lint)

⊙  flake83 =(printf "f'oo'")                                                                                                                                                                                                                                                                           jberman@USNYHJBERMANMB2
/Users/jberman/.local/share/virtualenvs/style3/site-packages/ebb_lint/checkers/check_docstrings.py:16: DeprecationWarning: Flags not at the start of the expression '\n    (?xi)\n    \\A(?:' (truncated)
  _bad_test_docstring_starts = re.compile(r"""
/Users/jberman/.local/share/virtualenvs/style3/site-packages/ebb_lint/checkers/check_docstrings.py:21: DeprecationWarning: Flags not at the start of the expression '\n    (?x)\n    ^:\n   ' (truncated)
  _sphinx_info_fields = re.compile(r"""
Traceback (most recent call last):
  File "/Users/jberman/.local/bin/flake83", line 8, in <module>
    sys.exit(main())
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/ebb_lint/flake8.py", line 216, in run
    tree, trailing_newline = self._grammar.parse_source(self.source)
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/awpa/pgen2/grammar.py", line 142, in parse_source
    tree = Driver(self, convert=convert).parse_string(source)
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/awpa/pgen2/driver.py", line 111, in parse_string
    return self.parse_tokens(tokens, debug)
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/awpa/pgen2/driver.py", line 75, in parse_tokens
    if p.addtoken(type, value, (prefix, start)):
  File "/Users/jberman/.local/share/virtualenvs/style3/site-packages/awpa/pgen2/parse.py", line 159, in addtoken
    raise ParseError("bad input", type, value, context)
awpa.pgen2.parse.ParseError: bad input: type=3, value="'oo'", context=('', (1, 1))

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