Skip to content

Commit

Permalink
Fix text_signature of various methods
Browse files Browse the repository at this point in the history
  • Loading branch information
pvcnt authored and inducer committed Oct 31, 2024
1 parent 6107035 commit 770663e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ fn parse(filename: &str, content: &str, dialect_opt: Option<Dialect>) -> PyResul
/// .. automethod:: lint
#[pymethods]
impl AstModule {
#[pyo3(text_signature = "(self) -> list[Lint]")]
#[pyo3(text_signature = "() -> list[Lint]")]
fn lint(&self) -> Vec<Lint> {
self.0.lint(None).map(|lint| Lint {
location: lint.location.dupe(),
Expand Down Expand Up @@ -592,7 +592,7 @@ impl Globals {
}

#[staticmethod]
#[pyo3(text_signature = "() -> Globals")]
#[pyo3(text_signature = "(extensions: list[LibraryExtension]) -> Globals")]
fn extended_by(extensions: Vec<LibraryExtension>) -> PyResult<Globals> {
let exts: Vec<starlark::environment::LibraryExtension> =
extensions.iter().map(|ext| ext.0).collect();
Expand Down Expand Up @@ -671,7 +671,7 @@ impl Module {
Ok(())
}

#[pyo3(text_signature = "(self, name: str, callable: Callable) -> None")]
#[pyo3(text_signature = "(name: str, callable: Callable) -> None")]
fn add_callable(&self, name: &str, callable: PyObject) {
let b = self
.0
Expand All @@ -680,7 +680,7 @@ impl Module {
self.0.set(name, b);
}

#[pyo3(text_signature = "(self) -> FrozenModule")]
#[pyo3(text_signature = "() -> FrozenModule")]
fn freeze(mod_cell: &PyCell<Module>) -> PyResult<FrozenModule> {
let module = mod_cell
.replace(Module(starlark::environment::Module::new()))
Expand Down

0 comments on commit 770663e

Please sign in to comment.