File: test_type_hints_init.yaml

package info (click to toggle)
python-consolekit 1.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,152 kB
  • sloc: python: 2,835; makefile: 8
file content (30 lines) | stat: -rw-r--r-- 1,305 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
29
30
- case: mypy_path_from_env
  mypy_config: |
    ignore_missing_imports = True
    no_silence_site_packages = False
    follow_imports = silent
  main: |
    import click
    from consolekit import click_command, click_group
    from consolekit.commands import MarkdownHelpGroup

    class MyCommand(click.Command):
        pass

    @click_command()
    def command():
        pass

    @click_group()
    def group():
        pass

    reveal_type(click_command())  # N: Revealed type is "def (def (*Any, **Any) -> Any) -> click.core.Command"
    reveal_type(click_command(cls=MyCommand))  # N: Revealed type is "def (def (*Any, **Any) -> Any) -> main.MyCommand"
    reveal_type(click_command(cls=click.Command))  # N: Revealed type is "def (def (*Any, **Any) -> Any) -> click.core.Command"
    reveal_type(command)  # N: Revealed type is "click.core.Command"

    reveal_type(click_group())  # N: Revealed type is "def (def (*Any, **Any) -> Any) -> click.core.Group"
    reveal_type(click_group(cls=MarkdownHelpGroup))  # N: Revealed type is "def (def (*Any, **Any) -> Any) -> consolekit.commands.MarkdownHelpGroup"
    reveal_type(click_group(cls=click.Group))  # N: Revealed type is "def (def (*Any, **Any) -> Any) -> click.core.Group"
    reveal_type(group)  # N: Revealed type is "click.core.Group"