@@ -2126,67 +2126,3 @@ unfixable = ["RUF"]
2126
2126
2127
2127
Ok ( ( ) )
2128
2128
}
2129
-
2130
- #[ test]
2131
- fn verbose_show_failed_fix_errors ( ) {
2132
- let mut cmd = RuffCheck :: default ( )
2133
- . args ( [ "--select" , "UP006" , "--preview" , "-v" ] )
2134
- . build ( ) ;
2135
-
2136
- insta:: with_settings!(
2137
- {
2138
- // the logs have timestamps we need to remove
2139
- filters => vec![ (
2140
- r"\[[\d:-]+]" ,
2141
- ""
2142
- ) ]
2143
- } , {
2144
- assert_cmd_snapshot!( cmd
2145
- . pass_stdin( "import typing\n Callable = 'abc'\n def g() -> typing.Callable: ..." ) ,
2146
- @r###"
2147
- success: false
2148
- exit_code: 1
2149
- ----- stdout -----
2150
- -:3:12: UP006 Use `collections.abc.Callable` instead of `typing.Callable` for type annotation
2151
- |
2152
- 1 | import typing
2153
- 2 | Callable = 'abc'
2154
- 3 | def g() -> typing.Callable: ...
2155
- | ^^^^^^^^^^^^^^^ UP006
2156
- |
2157
- = help: Replace with `collections.abc.Callable`
2158
-
2159
- Found 1 error.
2160
-
2161
- ----- stderr -----
2162
- [ruff::resolve][DEBUG] Isolated mode, not reading any pyproject.toml
2163
- [ruff_diagnostics::diagnostic][DEBUG] Failed to create fix for NonPEP585Annotation: Unable to insert `Callable` into scope due to name conflict
2164
- "### ) ; }
2165
- ) ;
2166
- }
2167
-
2168
- #[ test]
2169
- fn no_verbose_hide_failed_fix_errors ( ) {
2170
- let mut cmd = RuffCheck :: default ( )
2171
- . args ( [ "--select" , "UP006" , "--preview" ] )
2172
- . build ( ) ;
2173
- assert_cmd_snapshot ! ( cmd
2174
- . pass_stdin( "import typing\n Callable = 'abc'\n def g() -> typing.Callable: ..." ) ,
2175
- @r###"
2176
- success: false
2177
- exit_code: 1
2178
- ----- stdout -----
2179
- -:3:12: UP006 Use `collections.abc.Callable` instead of `typing.Callable` for type annotation
2180
- |
2181
- 1 | import typing
2182
- 2 | Callable = 'abc'
2183
- 3 | def g() -> typing.Callable: ...
2184
- | ^^^^^^^^^^^^^^^ UP006
2185
- |
2186
- = help: Replace with `collections.abc.Callable`
2187
-
2188
- Found 1 error.
2189
-
2190
- ----- stderr -----
2191
- "### ) ;
2192
- }
0 commit comments