Skip to content

Commit 20e82c0

Browse files
.
1 parent 5eb8138 commit 20e82c0

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

website/docs/error-kinds.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,6 +1504,19 @@ if "abc":
15041504
...
15051505
```
15061506

1507+
## regex
1508+
1509+
This error is raised when Pyrefly can statically detect an invalid regular expression pattern or an invalid literal group access on a regular expression match.
1510+
1511+
```python
1512+
import re
1513+
1514+
re.compile("(") # missing ), unterminated subpattern at position 0 [regex]
1515+
1516+
if m := re.search("(?P<name>.*)", "example"):
1517+
m.group("missing") # No such group: 'missing' [regex]
1518+
```
1519+
15071520
## reveal-type
15081521

15091522
Default severity: `info`

0 commit comments

Comments
 (0)