File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def from_union(fs, x):
4040 for f in fs :
4141 try :
4242 return f (x )
43- except :
43+ except Exception :
4444 pass
4545 assert False
4646
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def from_union(fs, x):
4444 for f in fs :
4545 try :
4646 return f (x )
47- except :
47+ except Exception :
4848 pass
4949 assert False
5050
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ async function generateSessionEvents(schemaPath?: string): Promise<void> {
7373
7474 // Fix dataclass field ordering (Any fields need defaults)
7575 code = code . replace ( / : A n y $ / gm, ": Any = None" ) ;
76+ // Fix bare except: to use Exception (required by ruff/pylint)
77+ code = code . replace ( / e x c e p t : / g, "except Exception:" ) ;
7678
7779 // Add UNKNOWN enum value for forward compatibility
7880 code = code . replace (
@@ -156,6 +158,8 @@ async function generateRpc(schemaPath?: string): Promise<void> {
156158 let typesCode = qtResult . lines . join ( "\n" ) ;
157159 // Fix dataclass field ordering
158160 typesCode = typesCode . replace ( / : A n y $ / gm, ": Any = None" ) ;
161+ // Fix bare except: to use Exception (required by ruff/pylint)
162+ typesCode = typesCode . replace ( / e x c e p t : / g, "except Exception:" ) ;
159163
160164 const lines : string [ ] = [ ] ;
161165 lines . push ( `"""
You can’t perform that action at this time.
0 commit comments