Commit 2193837
authored
fix: replace assert with ValueError for state validation (#1219)
The use of `assert` for application logic or state checking is discouraged because assertions are removed when Python runs with optimization (-O).
This change replaces `assert self.caps` with an explicit `if` check that raises `ValueError`, ensuring that the driver capabilities are always validated even in optimized environments.1 parent 30dad44 commit 2193837
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
| 307 | + | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
| |||
0 commit comments