-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Move corpus tests to ty_python_semantic
#18609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
667e6a3 to
0c4652b
Compare
…er__rules__flake8_return__tests__RET504_RET504.py.snap.new
|
|
Could you also move the corpus itself from |
carljm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you! I agree with @AlexWaygood that preferably the actual corpus would move as well.
* main: [ty] Add some "inside string" tests for `object.<CURSOR>` completions [ty] Pull types on synthesized Python files created by mdtest (#18539) Update Rust crate anstyle to v1.0.11 (#18583) [`pyupgrade`] Fix `super(__class__, self)` detection in UP008 (super-call-with-parameters) (#18478) [ty] Generate the top and bottom materialization of a type (#18594) `SourceOrderVisitor` should visit the `Identifier` part of the `PatternKeyword` node (#18635) Update salsa (#18636) [ty] Update mypy_primer doc (#18638) [ty] Improve support for `object.<CURSOR>` completions [ty] Add `CoveringNode::find_last` [ty] Refactor covering node representation [ty] Infer the Python version from `--python=<system installation>` on Unix (#18550) [`flake8-return`] Fix `RET504` autofix generating a syntax error (#18428) Fix incorrect salsa `return_ref` attribute (#18605) Move corpus tests to `ty_python_semantic` (#18609) [`pyupgrade`] Don't offer fix for `Optional[None]` in non-pep604-annotation-optional (`UP045)` or non-pep604-annotation-union (`UP007`) (#18545) [`pep8-naming`] Suppress fix for `N804` and `N805` if the recommend name is already used (#18472) [`ruff`] skip fix for `RUF059` if dummy name is already bound (unused-unpacked-variable) (#18509)
This is slightly more annoying than I thought. The main reason the tests were in
ty_projectis that we have access to theProjectDatabase. We don't have any suchDbstruct available inty_python_semanticother thanTestDbwhich is gated behindcfg(test)and integration tests can't enable individual features.We have a few options here:
--all-features.CorpusDbsimilar to what we do inty_testSemanticDbstruct inty_python_semanticand expose it alwaysI opted for another
CorpusDb. This is a bit annoying when adding new methods to theDbtrait but we do this only very rarely.