Major fixes and new features
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
22
venv/lib/python3.12/site-packages/mypy/parse.py
Normal file
22
venv/lib/python3.12/site-packages/mypy/parse.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from mypy.errors import Errors
|
||||
from mypy.nodes import MypyFile
|
||||
from mypy.options import Options
|
||||
|
||||
|
||||
def parse(
|
||||
source: str | bytes, fnam: str, module: str | None, errors: Errors | None, options: Options
|
||||
) -> MypyFile:
|
||||
"""Parse a source file, without doing any semantic analysis.
|
||||
|
||||
Return the parse tree. If errors is not provided, raise ParseError
|
||||
on failure. Otherwise, use the errors object to report parse errors.
|
||||
|
||||
The python_version (major, minor) option determines the Python syntax variant.
|
||||
"""
|
||||
if options.transform_source is not None:
|
||||
source = options.transform_source(source)
|
||||
import mypy.fastparse
|
||||
|
||||
return mypy.fastparse.parse(source, fnam=fnam, module=module, errors=errors, options=options)
|
||||
Reference in New Issue
Block a user