mkdocstrings-github 0.6.2__py3-none-any.whl → 0.6.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocstrings-github
3
- Version: 0.6.2
3
+ Version: 0.6.4
4
4
  Summary: A GitHub Action handler for mkdocstrings
5
5
  Author-email: Mark Hu <watermarkhu@gmail.com>
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
1
  mkdocstrings_handlers/github/__init__.py,sha256=0WdFUIq4Xu2ZFtlZNIYCQSoqcx3Ot9Wv41_X_dwbFww,248
2
2
  mkdocstrings_handlers/github/config.py,sha256=r7efiI-vKbVEeD6utrc55h4RP6VIlabqDebhiIIx_ZA,7120
3
3
  mkdocstrings_handlers/github/handler.py,sha256=4El8kAupC4np2lwzvvMHi9AyHzeT4D6f8eUJO0RfKxY,8781
4
- mkdocstrings_handlers/github/objects.py,sha256=v1GchB9fzqasnXbVEOXoDzOR2iVTwcfPQ9mFT4sdjgs,7625
4
+ mkdocstrings_handlers/github/objects.py,sha256=0E899mr7SQBPAZ7W4i0aIi5dyXIdfdxOm57vatXst0k,7818
5
5
  mkdocstrings_handlers/github/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  mkdocstrings_handlers/github/rendering.py,sha256=pFk621Fqp_R6ZS2dJ0zwEEez0Urqpekial6kqKYDag8,3371
7
7
  mkdocstrings_handlers/github/templates/material/_macros.html.jinja,sha256=1TNUgoOIxm-a1S7eiESrW1fYuzXOjrwFqXQSyA4tkkU,1576
@@ -12,7 +12,7 @@ mkdocstrings_handlers/github/templates/material/outputs.html.jinja,sha256=Z9QD1K
12
12
  mkdocstrings_handlers/github/templates/material/secrets.html.jinja,sha256=jQ_HaG2ivbZTH74pyV4BAFGQu5Vn03kA_vaEbTSABds,2839
13
13
  mkdocstrings_handlers/github/templates/material/style.css,sha256=Nfmds-xHtPJ_IzOv5svA7ih5talHDTiQryN_n0DGdZs,1553
14
14
  mkdocstrings_handlers/github/templates/material/workflow.html.jinja,sha256=5dLdHRSQyulyFAVCVZAR_pkw-WXxCtM20cj6RS7IH1Q,4206
15
- mkdocstrings_github-0.6.2.dist-info/METADATA,sha256=-q58ad0sFPB7UkECg2UhNPKaCDRnYSU34mqQOlmIrLc,4052
16
- mkdocstrings_github-0.6.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
17
- mkdocstrings_github-0.6.2.dist-info/licenses/LICENSE,sha256=5enZtJ4zSp0Ps3jTqFQ4kadcx62BhgTaDNPrXWb3g3E,1069
18
- mkdocstrings_github-0.6.2.dist-info/RECORD,,
15
+ mkdocstrings_github-0.6.4.dist-info/METADATA,sha256=-zh-SNdtNgvBgKy3k7LDSJJoe5iOpcCRNFjYBld--7w,4052
16
+ mkdocstrings_github-0.6.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
17
+ mkdocstrings_github-0.6.4.dist-info/licenses/LICENSE,sha256=5enZtJ4zSp0Ps3jTqFQ4kadcx62BhgTaDNPrXWb3g3E,1069
18
+ mkdocstrings_github-0.6.4.dist-info/RECORD,,
@@ -6,18 +6,21 @@ from typing import Any, Literal, Optional
6
6
 
7
7
  from ruamel.yaml import YAML
8
8
  from ruamel.yaml.comments import CommentedMap
9
-
10
- yaml = YAML()
11
-
9
+ from ruamel.yaml.tokens import CommentToken
12
10
 
13
11
  GROUP_PATTERN = r"#\s*group:\s*(.+)$"
12
+ yaml = YAML()
14
13
 
15
14
 
16
15
  def group_from_map(map: CommentedMap) -> str:
17
16
  """Extract group string from a comment line if it matches the group pattern."""
18
17
  if map.ca.comment:
19
- for comment in map.ca.comment:
20
- if comment is not None:
18
+ for comments in map.ca.comment:
19
+ if comments is None:
20
+ continue
21
+ elif isinstance(comments, CommentToken):
22
+ comments = [comments]
23
+ for comment in comments:
21
24
  group_matches = re.finditer(GROUP_PATTERN, comment.value)
22
25
  group_string = next((m.group(1).strip() for m in group_matches), "")
23
26
  if group_string: