mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00
Add Python version support to ruff analyze CLI (#13426)
This commit is contained in:
parent
2823487bf8
commit
ff11db61b4
7 changed files with 30 additions and 6 deletions
|
@ -54,6 +54,13 @@ impl TryFrom<(&str, &str)> for PythonVersion {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<(u8, u8)> for PythonVersion {
|
||||
fn from(value: (u8, u8)) -> Self {
|
||||
let (major, minor) = value;
|
||||
Self { major, minor }
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for PythonVersion {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let PythonVersion { major, minor } = self;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue