| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
My awful son only gets worse |
Sorry, something went wrong.
Diagnostic diff on typing conformance testsNo changes detected when running ty on typing conformance tests ✅ |
Sorry, something went wrong.
|
Potentially some more sphinx specific candidates #21640 |
Sorry, something went wrong.
mypy_primer resultsChanges were detected when running on open source projectsscikit-build-core (https://github.com/scikit-build/scikit-build-core)
- src/scikit_build_core/_logging.py:153:13: warning[unsupported-base] Unsupported class base with type `<class 'Mapping[str, Style]'> | <class 'Mapping[str, Divergent]'>`
- Found 42 diagnostics
+ Found 41 diagnostics
pydantic (https://github.com/pydantic/pydantic)
- pydantic/fields.py:943:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:943:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:983:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:983:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1026:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:1026:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1066:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:1066:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1109:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:1109:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1148:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:1148:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1188:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
+ pydantic/fields.py:1188:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
- pydantic/fields.py:1567:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`, found `Top[dict[Unknown, Unknown]] | (((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None`
+ pydantic/fields.py:1567:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`, found `Top[dict[Unknown, Unknown]] | (((dict[str, Divergent], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None`
No memory usage changes detected ✅ |
Sorry, something went wrong.
|
.. versionadded::, .. versionchanged:: and .. deprecated:: all appear a huge amount in CPython's online documentation (see https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#describing-changes-between-versions). They might also pop up in CPython docstrings as well from time to time -- not sure? CPython's docstrings aren't really meant to be ReST because they're intended to be viewed directly in a terminal, but sometimes ReST creeps in. |
Sorry, something went wrong.
Sorry, something went wrong.
| // Special directives that should be plaintext | ||
| #[allow(clippy::used_underscore_binding)] |
There was a problem hiding this comment.
The comment suggests that it applies to the clippy allow, when it doesn't.
I suggest using a different name for _line. I assumed the variable would be unused, when, in fact, it's a tricky work around lifetimes. Maybe tmp_line or owned_line or make line a Cow?
If you really want to use _line, use expect
Sorry, something went wrong.
There was a problem hiding this comment.
realtalk this was me getting Extremely flustered at the _special_case_temp_owned_thing idiom being flagged by clippy after 10 years of me using it. I have abandoned the underscore :(
Sorry, something went wrong.
| in_literal = true; | ||
| in_any_code = true; | ||
| block_indent = line_indent; | ||
| // TODO: I hope people don't have literal blocks about markdown code fence syntax |
There was a problem hiding this comment.
Doesn't markdown allow you to use an arbitrary number of backticks?
A code fence is a sequence of at least three consecutive backtick characters (`) or tildes (~). (Tildes and backticks cannot be mixed.) A fenced code block begins with a code fence, preceded by up to three spaces of indentation.
So, we could just use a silly amount of backticks :) https://spec.commonmark.org/0.31.2/#fenced-code-blocks
Sorry, something went wrong.
There was a problem hiding this comment.
This is genius.
Sorry, something went wrong.
| "#); | ||
|
|
||
| assert_snapshot!(docstring.render_markdown(), @r#" | ||
| Check out this great example code: |
There was a problem hiding this comment.
Why do we preseve the colon here but not in literal_own_line
Sorry, something went wrong.
There was a problem hiding this comment.
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#literal-blocks
The handling of the :: marker is smart:
- If it occurs as a paragraph of its own, that paragraph is completely left out of the document.
- If it is preceded by whitespace, the marker is removed.
- If it is preceded by non-whitespace, the marker is replaced by a single colon.
When translating to markdown this amounts to "check if there's a space immediately before the ::, if there is, delete it. Otherwise, turn it into :".
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
We now handle:
Test Plan
Snapshots added/updated. I also deleted a bunch of useless checks on plaintext rendering. It's important for some edge-case tests but not for the vast majority of tests.