File: utils.py

package info (click to toggle)
sphinxcontrib-websupport 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,112 kB
  • sloc: python: 1,351; javascript: 635; makefile: 53; sh: 7; ansic: 1
file content (11 lines) | stat: -rw-r--r-- 288 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
from __future__ import annotations

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from docutils import nodes


def is_commentable(node: nodes.Node) -> bool:
    # return node.__class__.__name__ in ('paragraph', 'literal_block')
    return node.__class__.__name__ == 'paragraph'