Skip to content

Commit 5c801e7

Browse files
Apply suggestions from code review
Co-authored-by: Micha Reiser <micha@reiser.io>
1 parent d2240bc commit 5c801e7

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

crates/ruff_python_ast/src/python_version.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pub struct PythonVersion {
1111
}
1212

1313
impl PythonVersion {
14-
pub const PY30: PythonVersion = PythonVersion { major: 3, minor: 0 };
1514
pub const PY37: PythonVersion = PythonVersion { major: 3, minor: 7 };
1615
pub const PY38: PythonVersion = PythonVersion { major: 3, minor: 8 };
1716
pub const PY39: PythonVersion = PythonVersion { major: 3, minor: 9 };

crates/ty_python_semantic/src/module_resolver/typeshed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ impl PyVersionRange {
283283
// Don't trust the start Python version if it's 3.0 or lower.
284284
// Typeshed doesn't attempt to give accurate start versions if a module was added
285285
// in the Python 2 era.
286-
if range_inclusive.start() <= &PythonVersion::PY30 {
286+
if range_inclusive.start() <= &(PythonVersion { major: 3, minor: 0 }) {
287287
write!(f, "<={}", range_inclusive.end())
288288
} else {
289289
write!(f, "{}-{}", range_inclusive.start(), range_inclusive.end())

0 commit comments

Comments
 (0)