Skip to content

Commit

Permalink
tests: update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
machow committed Aug 26, 2024
1 parent af25133 commit 419913a
Showing 1 changed file with 99 additions and 47 deletions.
146 changes: 99 additions & 47 deletions quartodoc/tests/__snapshots__/test_renderers.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,47 @@
'''
# quartodoc.tests.example_signature.a_complex_signature { #quartodoc.tests.example_signature.a_complex_signature }

`tests.example_signature.a_complex_signature(x: [list](`list`)\[[C](`quartodoc.tests.example_signature.C`) \| [int](`int`) \| None\], y: [pathlib](`pathlib`).[Pathlib](`pathlib.Pathlib`))`
```python
tests.example_signature.a_complex_signature(
x: list[C | int | None]
y: pathlib.Pathlib
)
```

## Parameters {.doc-section .doc-section-parameters}

| Name | Type | Description | Default |
|--------|--------------------------------------------------------------------------------------|-----------------|------------|
| `x` | [list](`list`)\[[C](`quartodoc.tests.example_signature.C`) \| [int](`int`) \| None\] | The x parameter | _required_ |
| `y` | [pathlib](`pathlib`).[Pathlib](`pathlib.Pathlib`) | The y parameter | _required_ |
| x | [list](`list`)\[[C](`quartodoc.tests.example_signature.C`) \| [int](`int`) \| None\] | The x parameter | _required_ |
| y | [pathlib](`pathlib`).[Pathlib](`pathlib.Pathlib`) | The y parameter | _required_ |
'''
# ---
# name: test_render_annotations_complex_no_interlinks
'''
# quartodoc.tests.example_signature.a_complex_signature { #quartodoc.tests.example_signature.a_complex_signature }

`tests.example_signature.a_complex_signature(x: list\[C \| int \| None\], y: pathlib.Pathlib)`
```python
tests.example_signature.a_complex_signature(
x: list[C | int | None]
y: pathlib.Pathlib
)
```

## Parameters {.doc-section .doc-section-parameters}

| Name | Type | Description | Default |
|--------|--------------------------|-----------------|------------|
| `x` | list\[C \| int \| None\] | The x parameter | _required_ |
| `y` | pathlib.Pathlib | The y parameter | _required_ |
| x | list\[C \| int \| None\] | The x parameter | _required_ |
| y | pathlib.Pathlib | The y parameter | _required_ |
'''
# ---
# name: test_render_doc_class[embedded]
'''
# quartodoc.tests.example_class.C { #quartodoc.tests.example_class.C }

`tests.example_class.C(self, x, y)`
```python
tests.example_class.C(self, x, y)
```

The short summary.

Expand All @@ -42,8 +54,8 @@

| Name | Type | Description | Default |
|--------|--------|----------------------|------------|
| `x` | str | Uses signature type. | _required_ |
| `y` | int | Uses manual type. | _required_ |
| x | str | Uses signature type. | _required_ |
| y | int | Uses manual type. | _required_ |

## Attributes

Expand All @@ -61,7 +73,9 @@

### D { #quartodoc.tests.example_class.C.D }

`tests.example_class.C.D()`
```python
tests.example_class.C.D()
```

A nested class

Expand All @@ -74,13 +88,17 @@

### some_class_method { #quartodoc.tests.example_class.C.some_class_method }

`tests.example_class.C.some_class_method()`
```python
tests.example_class.C.some_class_method()
```

A class method

### some_method { #quartodoc.tests.example_class.C.some_method }

`tests.example_class.C.some_method()`
```python
tests.example_class.C.some_method()
```

A method
'''
Expand All @@ -89,7 +107,9 @@
'''
# quartodoc.tests.example_class.C { #quartodoc.tests.example_class.C }

`tests.example_class.C(self, x, y)`
```python
tests.example_class.C(self, x, y)
```

The short summary.

Expand All @@ -100,8 +120,8 @@

| Name | Type | Description | Default |
|--------|--------|----------------------|------------|
| `x` | str | Uses signature type. | _required_ |
| `y` | int | Uses manual type. | _required_ |
| x | str | Uses signature type. | _required_ |
| y | int | Uses manual type. | _required_ |

## Attributes

Expand All @@ -119,7 +139,9 @@

## D { #quartodoc.tests.example_class.C.D }

`tests.example_class.C.D()`
```python
tests.example_class.C.D()
```

A nested class

Expand All @@ -132,13 +154,17 @@

## some_class_method { #quartodoc.tests.example_class.C.some_class_method }

`tests.example_class.C.some_class_method()`
```python
tests.example_class.C.some_class_method()
```

A class method

## some_method { #quartodoc.tests.example_class.C.some_method }

`tests.example_class.C.some_method()`
```python
tests.example_class.C.some_method()
```

A method
'''
Expand All @@ -147,7 +173,9 @@
'''
# quartodoc.tests.example_class.AttributesTable { #quartodoc.tests.example_class.AttributesTable }

`tests.example_class.AttributesTable(self)`
```python
tests.example_class.AttributesTable(self)
```

The short summary.

Expand Down Expand Up @@ -182,7 +210,9 @@

### AClass { #quartodoc.tests.example.AClass }

`tests.example.AClass()`
```python
tests.example.AClass()
```

A class

Expand All @@ -200,7 +230,9 @@

##### a_method { #quartodoc.tests.example.AClass.a_method }

`tests.example.AClass.a_method()`
```python
tests.example.AClass.a_method()
```

A method

Expand All @@ -212,7 +244,9 @@

### a_func { #quartodoc.tests.example.a_func }

`tests.example.a_func()`
```python
tests.example.a_func()
```

A function
'''
Expand All @@ -239,7 +273,9 @@

## AClass { #quartodoc.tests.example.AClass }

`tests.example.AClass()`
```python
tests.example.AClass()
```

A class

Expand All @@ -257,7 +293,9 @@

#### a_method { #quartodoc.tests.example.AClass.a_method }

`tests.example.AClass.a_method()`
```python
tests.example.AClass.a_method()
```

A method

Expand All @@ -269,7 +307,9 @@

## a_func { #quartodoc.tests.example.a_func }

`tests.example.a_func()`
```python
tests.example.a_func()
```

A function
'''
Expand All @@ -278,7 +318,9 @@
'''
# example.a_func { #quartodoc.tests.example.a_func }

`a_func()`
```python
a_func()
```

A function
'''
Expand All @@ -287,7 +329,9 @@
'''
# example.a_nested_alias { #quartodoc.tests.example.a_nested_alias }

`tests.example.a_nested_alias()`
```python
tests.example.a_nested_alias()
```

A nested alias target
'''
Expand All @@ -296,32 +340,36 @@
'''
# f_numpy_with_linebreaks { #quartodoc.tests.example_docstring_styles.f_numpy_with_linebreaks }

`tests.example_docstring_styles.f_numpy_with_linebreaks(a, b)`
```python
tests.example_docstring_styles.f_numpy_with_linebreaks(a, b)
```

A numpy style docstring.

## Parameters {.doc-section .doc-section-parameters}

| Name | Type | Description | Default |
|--------|--------|------------------|------------|
| `a` | | The a parameter. | _required_ |
| `b` | str | The b parameter. | _required_ |
| a | | The a parameter. | _required_ |
| b | str | The b parameter. | _required_ |
'''
# ---
# name: test_render_docstring_styles[google]
'''
# f_google { #quartodoc.tests.example_docstring_styles.f_google }

`tests.example_docstring_styles.f_google(a, b)`
```python
tests.example_docstring_styles.f_google(a, b)
```

A google style docstring.

## Parameters {.doc-section .doc-section-parameters}

| Name | Type | Description | Default |
|--------|--------|------------------|------------|
| `a` | int | The a parameter. | _required_ |
| `b` | str | The b parameter. | _required_ |
| a | int | The a parameter. | _required_ |
| b | str | The b parameter. | _required_ |

## Custom Admonition {.doc-section .doc-section-Custom-Admonition}

Expand All @@ -332,16 +380,18 @@
'''
# f_numpy { #quartodoc.tests.example_docstring_styles.f_numpy }

`tests.example_docstring_styles.f_numpy(a, b)`
```python
tests.example_docstring_styles.f_numpy(a, b)
```

A numpy style docstring.

## Parameters {.doc-section .doc-section-parameters}

| Name | Type | Description | Default |
|--------|--------|------------------|------------|
| `a` | | The a parameter. | _required_ |
| `b` | str | The b parameter. | _required_ |
| a | | The a parameter. | _required_ |
| b | str | The b parameter. | _required_ |

## Custom Admonition {.doc-section .doc-section-Custom-Admonition}

Expand All @@ -352,16 +402,18 @@
'''
# f_sphinx { #quartodoc.tests.example_docstring_styles.f_sphinx }

`tests.example_docstring_styles.f_sphinx(a, b)`
```python
tests.example_docstring_styles.f_sphinx(a, b)
```

A sphinx style docstring.

## Parameters {.doc-section .doc-section-parameters}

| Name | Type | Description | Default |
|--------|--------|------------------|------------|
| `a` | int | The a parameter. | _required_ |
| `b` | str | The b parameter. | _required_ |
| a | int | The a parameter. | _required_ |
| b | str | The b parameter. | _required_ |
'''
# ---
# name: test_render_numpydoc_section_return[int\n A description.]
Expand All @@ -387,7 +439,7 @@

| Name | Type | Description | Default |
|--------|--------|----------------|------------|
| `int` | | A description. | _required_ |
| int | | A description. | _required_ |

# Returns {.doc-section .doc-section-returns}

Expand All @@ -404,19 +456,19 @@
List
# Parameters {.doc-section .doc-section-parameters}

<code>[`int`]{.parameter-name} [:]{.parameter-annotation-sep} []{.parameter-annotation}</code>
<code>[**int**]{.parameter-name} [:]{.parameter-annotation-sep} []{.parameter-annotation} [ = ]{.parameter-default-sep} [None]{.parameter-default}</code>

: A description.

# Returns {.doc-section .doc-section-returns}

<code>[]{.parameter-name} [:]{.parameter-annotation-sep} [int]{.parameter-annotation}</code>
<code>[]{.parameter-name} [:]{.parameter-annotation-sep} [int]{.parameter-annotation} [ = ]{.parameter-default-sep} [None]{.parameter-default}</code>

: A description.

# Attributes {.doc-section .doc-section-attributes}

<code>[int]{.parameter-name} [:]{.parameter-annotation-sep} []{.parameter-annotation}</code>
<code>[**int**]{.parameter-name} [:]{.parameter-annotation-sep} []{.parameter-annotation} [ = ]{.parameter-default-sep} [None]{.parameter-default}</code>

: A description.
'''
Expand Down Expand Up @@ -444,7 +496,7 @@

| Name | Type | Description | Default |
|--------|--------|----------------|------------|
| `name` | | A description. | _required_ |
| name | | A description. | _required_ |

# Returns {.doc-section .doc-section-returns}

Expand All @@ -461,19 +513,19 @@
List
# Parameters {.doc-section .doc-section-parameters}

<code>[`name`]{.parameter-name} [:]{.parameter-annotation-sep} []{.parameter-annotation}</code>
<code>[**name**]{.parameter-name} [:]{.parameter-annotation-sep} []{.parameter-annotation} [ = ]{.parameter-default-sep} [None]{.parameter-default}</code>

: A description.

# Returns {.doc-section .doc-section-returns}

<code>[name]{.parameter-name} [:]{.parameter-annotation-sep} [int]{.parameter-annotation}</code>
<code>[**name**]{.parameter-name} [:]{.parameter-annotation-sep} [int]{.parameter-annotation} [ = ]{.parameter-default-sep} [None]{.parameter-default}</code>

: A description.

# Attributes {.doc-section .doc-section-attributes}

<code>[name]{.parameter-name} [:]{.parameter-annotation-sep} [int]{.parameter-annotation}</code>
<code>[**name**]{.parameter-name} [:]{.parameter-annotation-sep} [int]{.parameter-annotation} [ = ]{.parameter-default-sep} [None]{.parameter-default}</code>

: A description.
'''
Expand Down

0 comments on commit 419913a

Please sign in to comment.