-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
AstroidRelated to astroidRelated to astroidBug 🪲Needs astroid updateNeeds an astroid update (probably a release too) before being mergableNeeds an astroid update (probably a release too) before being mergableNeeds reproduction 🔍Need a way to reproduce it locally on a maintainer's machineNeed a way to reproduce it locally on a maintainer's machine
Description
Bug description
Compiling the below Rust code gives me a working binary, that I can then import as a module and run without any issues. However when I try to run pylint on the code that calls it pylint simply just hangs while trying to lint the binary.
use pyo3::types::PyModuleMethods;
#[pyo3::pyclass]
#[pyo3(module = "happy_hour.refreshments")]
#[derive(Clone, PartialEq)]
pub enum Cocktails {
Mojito {
sugar: u32,
rum: u32,
mint: u32,
lime_wedges: u32,
soda_water: u32,
consumers: Vec<u32>,
},
MintJulep {
bourbon: u32,
mint: u32,
consumers: Vec<u32>,
},
}
#[pyo3::pymodule]
fn refreshments(
py: pyo3::Python<'_>,
m: &pyo3::Bound<pyo3::prelude::PyModule>,
) -> pyo3::PyResult<()> {
m.add_class::<Cocktails>()?;
return Ok(());
}
This essentially boils down to this:
class Cocktails:
@final
class Mojito(Cocktails):
sugar: int
rum: int
mint: int
lime_wedges: int
soda_water: int
consumers: list[int]
@final
class MintJulep(Cocktails):
bourbon: int
mint: int
consumers: list[int]
Command used
pylint module/xy.py
Pylint output
pylint hangs on run.
When I hook up a debugger I get it recursively calling transforms._visit()
and transforms._visit_generic()

Expected behavior
Expecting the linting to finish without any issues
Pylint version
pylint 3.3.8
astroid 3.3.11
Python 3.12.10
OS / Environment
Windows 10
Metadata
Metadata
Assignees
Labels
AstroidRelated to astroidRelated to astroidBug 🪲Needs astroid updateNeeds an astroid update (probably a release too) before being mergableNeeds an astroid update (probably a release too) before being mergableNeeds reproduction 🔍Need a way to reproduce it locally on a maintainer's machineNeed a way to reproduce it locally on a maintainer's machine