File: elements.py

package info (click to toggle)
python-html2text 2025.4.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 976 kB
  • sloc: python: 1,659; sh: 32; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from typing import Dict, Optional


class AnchorElement:
    __slots__ = ["attrs", "count", "outcount"]

    def __init__(self, attrs: Dict[str, Optional[str]], count: int, outcount: int):
        self.attrs = attrs
        self.count = count
        self.outcount = outcount


class ListElement:
    __slots__ = ["name", "num"]

    def __init__(self, name: str, num: int):
        self.name = name
        self.num = num