File: pattern_file.nb

package info (click to toggle)
nanobind 2.10.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,100 kB
  • sloc: cpp: 12,131; python: 6,190; ansic: 4,785; makefile: 22; sh: 15
file content (25 lines) | stat: -rw-r--r-- 487 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
# This is a pattern file used to rewrite generated stubs

# Remove an entry
remove_me:

# Change a function signature, keep the documentation
tweak_me:
    def tweak_me(arg: int):
        \doc

# Apply a pattern to multiple places
__(lt|gt)__:
    def __\1__(self, arg: int, /) -> bool: ...

test_typing_ext.__prefix__:
    # a prefix

test_typing_ext.__suffix__:
    # a suffix

test_typing_ext.Foo.__prefix__:
    # a class prefix

test_typing_ext.Foo.__suffix__:
    # a class suffix