@@ -152,20 +152,23 @@ pub enum AnalyzeCommand {
152
152
pub struct AnalyzeGraphCommand {
153
153
/// List of files or directories to include.
154
154
#[ clap( help = "List of files or directories to include [default: .]" ) ]
155
- pub files : Vec < PathBuf > ,
155
+ files : Vec < PathBuf > ,
156
156
/// The direction of the import map. By default, generates a dependency map, i.e., a map from
157
157
/// file to files that it depends on. Use `--direction dependents` to generate a map from file
158
158
/// to files that depend on it.
159
159
#[ clap( long, value_enum, default_value_t) ]
160
- pub direction : Direction ,
160
+ direction : Direction ,
161
161
/// Attempt to detect imports from string literals.
162
162
#[ clap( long) ]
163
- pub detect_string_imports : bool ,
163
+ detect_string_imports : bool ,
164
164
/// Enable preview mode. Use `--no-preview` to disable.
165
165
#[ arg( long, overrides_with( "no_preview" ) ) ]
166
166
preview : bool ,
167
167
#[ clap( long, overrides_with( "preview" ) , hide = true ) ]
168
168
no_preview : bool ,
169
+ /// The minimum Python version that should be supported.
170
+ #[ arg( long, value_enum) ]
171
+ target_version : Option < PythonVersion > ,
169
172
}
170
173
171
174
// The `Parser` derive is for ruff_dev, for ruff `Args` would be sufficient
@@ -789,6 +792,7 @@ impl AnalyzeGraphCommand {
789
792
None
790
793
} ,
791
794
preview : resolve_bool_arg ( self . preview , self . no_preview ) . map ( PreviewMode :: from) ,
795
+ target_version : self . target_version ,
792
796
..ExplicitConfigOverrides :: default ( )
793
797
} ;
794
798
0 commit comments