Comments (11)
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.
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.
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.
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.
Have started tweaking type annotations in typeshed, with a view to reach parity and then transition this repo to typeshed
from sphinx.
@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.
@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.
If you are talking about state transitions, like
def blank(self, match, context, next_state):
, thencontext
is alist[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.
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.
Could I ask you to help with the upstream PRs
Okie, I will try to carve out some time for it 👍
from sphinx.
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)
- Intersphinx Mapping link not working with Plotly objects in signature HOT 4
- Internationalization doc mentions deprecated transifex-client HOT 1
- 7.3.7: missing `defusedxml` install time dependency HOT 2
- THYDUX COIN 𝕏 🥏
- Multiple labels inside math directives HOT 1
- LaTeX: footnote mark may indicate "Page N, M" but footnote M is already on page N
- Gettext builder cannot extract 'option' directive HOT 4
- `autodoc_class_signature = "separated"` cause a warning for enum with no `__init__` HOT 12
- [search] issues with the new HTML search algorithm HOT 12
- Pre-declared explicit links not working
- add_css_file return wrong URI when dealing with local files on windows platform HOT 6
- [search] Add ability to treat "-" as a normal letter, to not split search term into several words HOT 1
- Import command-line documentation from docopt HOT 2
- Add "skip to main content" a11y feature
- BUG: env.toctree_includes different between parallel and serial builds HOT 2
- LaTeX: for French language and lualatex engine polyglossia and not babel is used contrarily to Sphinx documentation
- [docs] clarify the usage of `versionadded` & co HOT 9
- Re: :scale: for SVG images in HTML builds
- sphinx raises an exception when trying to build python 3.13 doc with devhelp HOT 3
- Yandex Browser ignores the translation ban
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphinx.