File: test_compat.rst

package info (click to toggle)
python-auto-pytabs 0.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 444 kB
  • sloc: python: 999; xml: 860; sh: 24; makefile: 13; javascript: 1
file content (63 lines) | stat: -rw-r--r-- 981 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
=====
Index
=====

code-block
----------

.. pytabs-code-block:: python
    :caption: test caption

    from typing import Dict, Union, List, Optional

    def foo(x: Union[Dict[str, str], List[str]]) -> Optional[List[int]]:
        pass


code-block no upgrade
---------------------

.. code-block:: python
    :caption: test caption

    from typing import Dict, Union, List, Optional

    def foo(x: Union[Dict[str, str], List[str]]) -> Optional[List[int]]:
        pass


code-block non-python
----------------------

.. code-block:: javascript

    const x = "hello"


code-block no language
----------------------

.. code-block::

    this is something


literalinclude
--------------

.. pytabs-literalinclude:: example.py
    :language: python
    :caption: test caption


literalinclude non-python
--------------------------

.. literalinclude:: example.js
    :language: javascript


literalinclude no language
---------------------------

.. literalinclude:: example.js