Skip to content

Commit

Permalink
Update pycparser stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlindholm committed Dec 25, 2022
1 parent 95b9d5f commit 91a2d5b
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 353 deletions.
3 changes: 2 additions & 1 deletion src/ast_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import re
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, TYPE_CHECKING, Union

from pycparser import CParser, c_ast as ca, c_generator
from pycparser import c_ast as ca, c_generator
from pycparser.c_parser import CParser
from pycparser.plyparser import ParseError

from .error import CandidateConstructionFailure
Expand Down
18 changes: 0 additions & 18 deletions stubs/pycparser/__init__.py

This file was deleted.

26 changes: 26 additions & 0 deletions stubs/pycparser/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -----------------------------------------------------------------
# pycparser: __init__.py
#
# This package file exports some convenience functions for
# interacting with pycparser
#
# Eli Bendersky [https://eli.thegreenplace.net/]
# License: BSD
# -----------------------------------------------------------------
__all__ = ["c_parser", "c_ast"]
__version__ = "2.19"

from typing import Any, List, Optional, Union
from . import c_ast
from .c_parser import CParser

def preprocess_file(
filename: str, cpp_path: str = "cpp", cpp_args: Union[List[str], str] = ""
) -> str: ...
def parse_file(
filename: str,
use_cpp: bool = False,
cpp_path: str = "cpp",
cpp_args: str = "",
parser: Optional[CParser] = None,
) -> c_ast.FileAST: ...
Loading

0 comments on commit 91a2d5b

Please sign in to comment.