Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: generate python pyi stubs #62

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

python: generate python pyi stubs #62

wants to merge 1 commit into from

Conversation

Tristramg
Copy link
Contributor

This allows to have type hints and comments when using the library

Closes #61

Marked as draft as upstream dependencies are not met yet

This allows to have type hints and comments when using the library

Signed-off-by: Tristram Gräbener <[email protected]>
fn new() -> Self {
Self {
inner: liblrs::builder::Builder::new(),
}
}

/// Add a new topological node (e.g. a railway switch)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Add a new topological node (e.g. a railway switch)
/// Add a new topological node (e.g., a railway switch)

/// Add a new segment
///
/// The geometry represents the curve
/// start_node_index and end_node_index are the topological extremeties returned by `add_node`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// start_node_index and end_node_index are the topological extremeties returned by `add_node`
/// `start_node_index` and `end_node_index` are the topological extremeties returned by `add_node`

@@ -70,6 +74,7 @@ impl From<Point> for geo_types::Coord {
}
}

#[gen_stub_pyclass]
#[pyclass]
/// Represent a position on an [`LrmScale`] relative as an `offset` to an [`Anchor`].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Represent a position on an [`LrmScale`] relative as an `offset` to an [`Anchor`].
/// Represents a position on an [`LrmScale`] relative as an `offset` to an [`Anchor`].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate .pyi stubs
2 participants