Skip to content

Commit ea2820a

Browse files
sharkdpMichaReiser
andcommitted
Compare on PythonVersion directly
Co-authored-by: Micha Reiser <[email protected]>
1 parent 692150d commit ea2820a

File tree

1 file changed

+2
-2
lines changed
  • crates/red_knot_python_semantic/src

1 file changed

+2
-2
lines changed

crates/red_knot_python_semantic/src/types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::symbol::{Boundness, Symbol};
2828
use crate::types::diagnostic::TypeCheckDiagnosticsBuilder;
2929
use crate::types::mro::{ClassBase, Mro, MroError, MroIterator};
3030
use crate::types::narrow::narrowing_constraint;
31-
use crate::{Db, FxOrderSet, Module, Program};
31+
use crate::{Db, FxOrderSet, Module, Program, PythonVersion};
3232

3333
mod builder;
3434
mod diagnostic;
@@ -1927,7 +1927,7 @@ impl<'db> KnownClass {
19271927
// typing_extensions has a 3.13+ re-export for the `typing.NoDefault`
19281928
// singleton, but not for `typing._NoDefaultType`. So we need to switch
19291929
// to `typing._NoDefaultType` for newer versions:
1930-
if python_version.major >= 3 && python_version.minor >= 13 {
1930+
if python_version >= PythonVersion::PY313 {
19311931
CoreStdlibModule::Typing
19321932
} else {
19331933
CoreStdlibModule::TypingExtensions

0 commit comments

Comments
 (0)