@@ -116,7 +116,10 @@ def maybe_exit(return_code: int) -> None:
116116
117117 if not skip_ty and config .get ("ty" , {}).get ("enabled" , True ):
118118 print_event ("ty check..." , newline = False )
119- result = subprocess .run (["ty" , "check" , path , "--no-progress" ])
119+ ty_args = ["ty" , "check" , path , "--no-progress" ]
120+ for e in config .get ("exclude" , []):
121+ ty_args .extend (["--exclude" , e ])
122+ result = subprocess .run (ty_args )
120123 maybe_exit (result .returncode )
121124
122125 if not skip_biome and config .get ("biome" , {}).get ("enabled" , True ):
@@ -131,7 +134,9 @@ def maybe_exit(return_code: int) -> None:
131134
132135 if not skip_annotations and config .get ("annotations" , {}).get ("enabled" , True ):
133136 print_event ("annotations..." , newline = False )
134- exclude_patterns = config .get ("annotations" , {}).get ("exclude" , [])
137+ # Combine top-level exclude with annotation-specific exclude
138+ exclude_patterns = list (config .get ("exclude" , []))
139+ exclude_patterns .extend (config .get ("annotations" , {}).get ("exclude" , []))
135140 ann_result = check_annotations (path , exclude_patterns or None )
136141 if ann_result .missing_count > 0 :
137142 click .secho (
@@ -152,7 +157,9 @@ def maybe_exit(return_code: int) -> None:
152157def annotations (path : str , details : bool , as_json : bool ) -> None :
153158 """Check type annotation status"""
154159 config = get_code_config ()
155- exclude_patterns = config .get ("annotations" , {}).get ("exclude" , [])
160+ # Combine top-level exclude with annotation-specific exclude
161+ exclude_patterns = list (config .get ("exclude" , []))
162+ exclude_patterns .extend (config .get ("annotations" , {}).get ("exclude" , []))
156163 result = check_annotations (path , exclude_patterns or None )
157164 if as_json :
158165 _print_annotations_json (result )
0 commit comments