File: test.py

package info (click to toggle)
accessible-pygments 0.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,076 kB
  • sloc: python: 1,451; sh: 48; javascript: 33; makefile: 3
file content (40 lines) | stat: -rw-r--r-- 816 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
31
32
33
34
35
36
37
38
39
40
"""
    isort:skip_file
"""

import package
from package import Class1, Class2, func_1, func_2
from package3 import *


class TestClass(BaseClass1, BaseClass2):
    """ Hola! """
    def __init__(self, x: int, y: List[Union[None, str]], z='default',
                 *args, **kwargs):
        super().__init__()
        self.x = x  # type: int

    def method1(self):
        pass


@decorator
async def test2(x, y, z):
    async for i in x:
        yield y
    with open('text', 'r', encoding='utf-8') as f:
        while True:
            x += 1

@requires_authorization
def somefunc(param1='', param2=0):
    r'''A docstring'''
    if param1 > param2: # interesting
        print('Gre\'ater')
    return (param2 - param1 + 1 + 0b10l) or None

class SomeClass:
    pass

>>> message = '''interpreter
... prompt'''