File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ impl UrlPattern {
7676 dict. set_item ( "pathname" , self . 0 . pathname ( ) ) . unwrap ( ) ;
7777 dict. set_item ( "search" , self . 0 . search ( ) ) . unwrap ( ) ;
7878 dict. set_item ( "hash" , self . 0 . hash ( ) ) . unwrap ( ) ;
79+ dict. set_item ( "hasRegExpGroups" , self . 0 . has_regexp_groups ( ) ) . unwrap ( ) ;
7980 format ! ( "URLPattern({})" , dict)
8081 }
8182
@@ -194,6 +195,11 @@ impl UrlPattern {
194195 pub fn get_hash ( & self ) -> PyResult < & str > {
195196 Ok ( self . 0 . hash ( ) )
196197 }
198+
199+ #[ getter]
200+ pub fn get_hasRegExpGroups ( & self ) -> PyResult < bool > {
201+ Ok ( self . 0 . has_regexp_groups ( ) )
202+ }
197203}
198204
199205#[ derive( FromPyObject ) ]
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ class URLPattern:
7676 def search (self ) -> str : ...
7777 @property
7878 def hash (self ) -> str : ...
79+ @property
80+ def hasRegExpGroups (self ) -> bool : ...
7981
8082class URLPatternInit (TypedDict , total = False ):
8183 protocol : str
You can’t perform that action at this time.
0 commit comments