Skip to content

Invalid python files, that ruff parse #7633

@qarmin

Description

@qarmin

Ruff 0.0.291
Cpython 3.11.4

Tested with

ruff format . --check

and cpython part

python -m compileall .

https://github.com/qarmin/Automated-Fuzzer/releases/download/test/Cpython.no.parsable.parsable.by.ruff.zip

This makes difficult to report fuzzer problems, because I cannot with only ruff recognize if this is valid python file or not

Example of files

*f
break
yield #
#coding:ut
from pydanic import BaseModel


class HostedResult(BaseModel):
    id: str
  url: str

Example of cpython errors

    *Ï
    ^^^
SyntaxError: can't use starred expression here
*** Sorry: IndentationError: unindent does not match any outer indentation level (98_IDX_0_RAND_10049945704112701812.py, line 45)
    grouping() = "Right"
    ^^^^^^^^^^
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?
***   File "./990_IDX_0_RAND_14720601008565103604.py", line 107
    self.u<= a.rSDP = None
    ^^^^^^^^^^^^^^^
SyntaxError: cannot assign to comparison
SyntaxError: unknown encoding: u
    'id': (str,await  none_type,),  # noqa: E501
               ^^^^^^^^^^^^^^^^
SyntaxError: 'await' outside async function
    from __future__ import absolute_im
    ^
SyntaxError: future feature absolute_im is not defined

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfuzzerSurfaced via fuzzing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions