File: test_annotations.yml

package info (click to toggle)
python-atom 0.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,616 kB
  • sloc: cpp: 9,040; python: 6,249; makefile: 123
file content (24 lines) | stat: -rw-r--r-- 874 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
#------------------------------------------------------------------------------
# Copyright (c) 2022-2024, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
#------------------------------------------------------------------------------
- case: annotated_member
  parametrized:
    - member: List
      annotation: List[int]
      member_instance: List()
      member_type: atom.list.List[builtins.int]
      member_value_type: builtins.list[builtins.int]
  main: |
    import _io
    from typing import Type
    from atom.api import Atom, {{ member }}

    class A(Atom):
      m: {{ annotation }} = {{ member_instance }}

    reveal_type(A.m)  # N: Revealed type is "{{ member_type }}"
    reveal_type(A().m)  # N: Revealed type is "{{ member_value_type }}"