Skip to content

Commit 5c8b8b1

Browse files
stranger6667Stranger6667
authored andcommitted
chore(python): Distribute typing information
Ref: #167
1 parent 486f251 commit 5c8b8b1

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

bindings/python/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Added
6+
7+
- Distribute typing information. [#167](https://github.com/Stranger6667/css-inline/issues/167)
8+
59
### Changed
610

711
- Update `PyO3` to `0.18.0`.

bindings/python/css_inline.pyi

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
class CSSInliner:
2+
def __init__(
3+
self,
4+
inline_style_tags: bool = True,
5+
remove_style_tags: bool = False,
6+
base_url: str | None = None,
7+
load_remote_stylesheets: bool = True,
8+
extra_css: str | None = None,
9+
) -> None: ...
10+
def inline(self, html: str) -> str: ...
11+
def inline_many(self, html: list[str]) -> list[str]: ...
12+
13+
def inline(
14+
html: str,
15+
inline_style_tags: bool = True,
16+
remove_style_tags: bool = False,
17+
base_url: str | None = None,
18+
load_remote_stylesheets: bool = True,
19+
extra_css: str | None = None,
20+
) -> str: ...
21+
def inline_many(
22+
html: list[str],
23+
inline_style_tags: bool = True,
24+
remove_style_tags: bool = False,
25+
base_url: str | None = None,
26+
load_remote_stylesheets: bool = True,
27+
extra_css: str | None = None,
28+
) -> list[str]: ...
29+
30+
class InlineError(ValueError): ...

0 commit comments

Comments
 (0)