Skip to content

Commit 51ebd42

Browse files
authored
Added new properties to easily check the node type (#186)
1 parent ac14256 commit 51ebd42

File tree

5 files changed

+166
-39
lines changed

5 files changed

+166
-39
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ clean-test: ## remove test and coverage artifacts
4747
rm -fr htmlcov/
4848

4949
lint: ## check style with ruff
50-
ruff selectolax tests
50+
ruff format selectolax tests
51+
ruff check --fix selectolax tests
5152
mypy selectolax tests
5253

5354
test: ## run tests quickly with the default Python

selectolax/lexbor.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ cdef class LexborNode:
233233
cdef:
234234
lxb_dom_node_t *node
235235
public LexborHTMLParser parser
236+
cdef bint _is_node_type(self, lxb_dom_node_type_t expected_type)
236237

237238
@staticmethod
238239
cdef LexborNode new(lxb_dom_node_t *node, LexborHTMLParser parser)

0 commit comments

Comments
 (0)