Git Product home page Git Product logo

Comments (11)

danieleades avatar danieleades commented on June 11, 2024 2

i've created a PR to track the migration here - #12012

contributions (both to the PR and upstream in typeshed) very very welcome!

from sphinx.

picnixz avatar picnixz commented on June 11, 2024 1

Good idea! I am always frustrated because of how poor autocompletion is done with docutils on Pycharm so I'll be very happy if this can be merged upstream.

from sphinx.

picnixz avatar picnixz commented on June 11, 2024 1

I won't be there next week, and I don't think I'll have time for that today. But I'll do it by in two weeks (I will take time for that).

from sphinx.

chrisjsewell avatar chrisjsewell commented on June 11, 2024 1

Is the 'context' truly generic?

If you are talking about state transitions, like def blank(self, match, context, next_state):, then context is a list[str]

I'm not super familiar with the inner workings of the docutils statemachines

I am, I've been through it in excruciating detail, because I'm writing an RST parser as we speak 😉

This all looks great, thanks for all the work!
... although obviously it would be a million time easier, if we could just type docutils itself 😅

from sphinx.

danieleades avatar danieleades commented on June 11, 2024

Have started tweaking type annotations in typeshed, with a view to reach parity and then transition this repo to typeshed

python/typeshed#11468

from sphinx.

danieleades avatar danieleades commented on June 11, 2024

@sphinx-doc/triagers @sphinx-doc/developers @sphinx-doc/former-maintainers @picnixz

can I pretty please get a solid review of python/typeshed#11469?

It introduces a generic type argument to the docutils state machine to represent the context. That generic argument will propogate through into a massive number of docutils types so is a significant change. Before that happens I want to check this is correct!
I'm not super familiar with the inner workings of the docutils statemachines. Is the 'context' truly generic? what is its type?

from the docutils docs:

context: application-specific storage.

from sphinx.

danieleades avatar danieleades commented on June 11, 2024

@sphinx-doc/triagers @sphinx-doc/developers @sphinx-doc/former-maintainers @picnixz

can I pretty please get a solid review of python/typeshed#11469?

It introduces a generic type argument to the docutils state machine to represent the context. That generic argument will propogate through into a massive number of docutils types so is a significant change. Before that happens I want to check this is correct! I'm not super familiar with the inner workings of the docutils statemachines. Is the 'context' truly generic? what is its type?

from the docutils docs:

context: application-specific storage.

stand down!

I've postponed adding generics, even if they are technically correct. The decision is blocking progress and would have significant downstream impact.
I'll revisit in a separate PR and just type the context as Any for now

from sphinx.

danieleades avatar danieleades commented on June 11, 2024

If you are talking about state transitions, like def blank(self, match, context, next_state):, then context is a list[str]

I believe that's true of the rst-specific subclasses. Is it also true of the superclass? (I'll take your word for it)

from sphinx.

picnixz avatar picnixz commented on June 11, 2024

Ah thank you chris for helping here since I am travelling (I'm currently in a train). Could I ask you to help with the upstream PRs (I can come back later if there are some questions though it's been a while since I played with docutils)?

from sphinx.

chrisjsewell avatar chrisjsewell commented on June 11, 2024

Could I ask you to help with the upstream PRs

Okie, I will try to carve out some time for it 👍

from sphinx.

danieleades avatar danieleades commented on June 11, 2024

i'm proposing that #12012 be merged, warts and all so that all future improvements to typing are made against the community-supported typeshed docutils stubs

from sphinx.

Related Issues (20)

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.