Git Product home page Git Product logo

Comments (3)

auscompgeek avatar auscompgeek commented on July 19, 2024

I think this is a pybind11-stubgen bug in disguise. The docstring in the AST of the stub wouldn't match the actual docstring.

from sphinxify.

virtuald avatar virtuald commented on July 19, 2024

Hm? The original content has a \# and the content output by sphinxify also has a \#? How is that a stubgen bug?

from sphinxify.

auscompgeek avatar auscompgeek commented on July 19, 2024

Here's a real example that doesn't involve sphinxify:

https://github.com/robotpy/mostrobotpy/blob/375e0468b1e1a838d3d3cc63e2a49a5ae568d28c/subprojects/robotpy-wpimath/gen/controls/SwerveDrivePoseEstimator.yml#L7-L26

This produces the following in the .pyi:

class SwerveDrive4PoseEstimator(SwerveDrive4PoseEstimatorBase):
    """
    This class wraps Swerve Drive Odometry to fuse latency-compensated
    vision measurements with swerve drive encoder distance measurements. It is
    intended to be a drop-in for :class:`SwerveDriveOdometry`.
    
    :meth:`update` should be called every robot loop.
    
    :meth:`addVisionMeasurement` can be called as infrequently as you want; if you
    never call it, then this class will behave as regular encoder odometry.
    
    The state-space system used internally has the following states (x) and outputs (y):
    
    :math:`x = [x, y, \theta]^T` in the field-coordinate system
    containing x position, y position, and heading.
    
    :math:`y = [x, y, \theta]^T` from vision containing x position, y
    position, and heading; or :math:`y = [theta]^T` containing gyro
    heading.
    """

Here the \t is being interpreted as a tab, since the backslash isn't escaped in any way. pydoc correctly preserves the backslash, so the __doc__ is correct, but the .pyi contents are not.

from sphinxify.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.