File: whitespace_parser.pyi

package info (click to toggle)
python-libcst 1.4.0-1.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,928 kB
  • sloc: python: 76,235; makefile: 10; sh: 2
file content (28 lines) | stat: -rw-r--r-- 973 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

from typing import Optional, Sequence, Union

from libcst._nodes.whitespace import (
    EmptyLine,
    Newline,
    ParenthesizedWhitespace,
    SimpleWhitespace,
    TrailingWhitespace,
)
from libcst._parser.types.config import BaseWhitespaceParserConfig as Config
from libcst._parser.types.whitespace_state import WhitespaceState as State

def parse_simple_whitespace(config: Config, state: State) -> SimpleWhitespace: ...
def parse_empty_lines(
    config: Config,
    state: State,
    *,
    override_absolute_indent: Optional[str] = None,
) -> Sequence[EmptyLine]: ...
def parse_trailing_whitespace(config: Config, state: State) -> TrailingWhitespace: ...
def parse_parenthesizable_whitespace(
    config: Config, state: State
) -> Union[SimpleWhitespace, ParenthesizedWhitespace]: ...