Conversation
|
@AlexWaygood this alternate form of #22932 but with extension mapping enabled from #22934 configured, covering the three code block languages I found in mdtests. It's a much smaller diff, but does result in class methods dropping their spacing between them. |
|
I'd be very happy indeed with this formatting! I don't mind too much the spaces going away, -- to me, this diff: class Foo:
@property
def foo(self): ...
-
@property
def bar(self): ...
-
@property
def baz(self): ...is much less annoying than this diff, which we see lots of in the other PR 😄 class Foo: ...
+
+
class Bar: ...
+
+
class Baz: ... |
35ed3d0 to
3eebdf9
Compare
9bcba89 to
0796bbf
Compare
Typing conformance resultsNo changes detected ✅ |
|
Looks like this will also be dependent on getting a solution for #22637, and either supporting the blacken-docs directives or adding a ruff equivalent to a bunch of files. |
|
0796bbf to
4b0f2d4
Compare
4b0f2d4 to
1165d9f
Compare
cefa871 to
b32cf11
Compare
e435d83 to
1f54054
Compare
1f54054 to
16934d6
Compare
|
I think this is blocked on waiting for the next release of ruff so that it doesn't depend on trying to |
...t/snapshots/final.md_-_Tests_for_the_`@typi…_-_Cannot_override_a_me…_(338615109711a91b).snap
Outdated
Show resolved
Hide resolved
9a24d60 to
e79a977
Compare
AlexWaygood
left a comment
There was a problem hiding this comment.
LGTM, thank you for doing this!!
We still have a few <!-- blacken-docs:off --> HTML comments in the resources/mdtest directory. As a followup, we should audit those to see which ones are no longer necessary (because ruffen-docs, unlike blacken-docs, will automatically skip examples that include invalid Python syntax in them). And it would be nice to switch over the ones that we do still need to use <!-- fmt:off --> rather than a blacken-docs-specific comment. (This will require changing the hardcoded allowlist of HMTL comments at
ruff/crates/ty_test/src/parser.rs
Line 523 in 11b6cfd
| from b import Foo | ||
|
|
||
| __all__ = ['Foo'] | ||
| __all__ = ["Foo"] |
There was a problem hiding this comment.
huh, I wonder why blacken-docs didn't complain about this one
crates/ty_python_semantic/resources/mdtest/narrow/type_guards.md
Outdated
Show resolved
Hide resolved
crates/ty_python_semantic/resources/mdtest/narrow/type_guards.md
Outdated
Show resolved
Hide resolved
crates/ty_python_semantic/resources/mdtest/conditional/if_statement.md
Outdated
Show resolved
Hide resolved
e79a977 to
1a86e75
Compare
1a86e75 to
5981b2e
Compare
Memory usage reportMemory usage unchanged ✅ |
crates/ty_python_semantic/resources/mdtest/diagnostics/semantic_syntax_errors.md
Outdated
Show resolved
Hide resolved
5981b2e to
e2ee456
Compare
* main: (209 commits) [ty] Defer base inference for functional `type(...)` classes (#22792) flake8-executable: allow global flags in uv shebangs (EXE003) (#22582) [ty] Add `replace-imports-with-any` option (#23122) Update html comments in mdtests (#23269) Apply ruff formatting to mdtests (#22935) [ty] Exclude test-related symbols from non-first-party packages in auto-import completions [ty] Refactor `CursorTest` helper to support site-packages [ty] Qualify inlay hint edit symbol when possibly referencing another variable (#23265) [ty] Avoid `UnionBuilder` overhead when creating a new union from the filtered elements of an existing union (#22352) [ty] Refactor TypedDict key assignment validation (#23262) [ty] Improve Python environment path documentation (#23256) [ty] loop control flow analysis using loop header definitions Prepare for 0.15.1 (#23253) Remove docker-run-action (#23254) [ty] Allow discovering dependencies in system Python environments (#22994) Ensure pending suppression diagnostics are reported (#23242) [`isort`] support for configurable import section heading comments (#23151) [ty] Fix method calls on subclasses of `Any` (#23248) [ty] Fix bound method access on `None` (#23246) Make range suppression test snapshot actually useful (#23251) ...
prekhook to replaceblacken-docswith running ruff from local checkout.