Skip to content

Conversation

@SimonSchick
Copy link

See https://docs.astral.sh/ty/

I'm uncertain what steps need to be taken to mark tests as unsupported rather than Unknown in bulk.
Should I mark all failing tests as unsupported for the time being?

@python-cla-bot
Copy link

python-cla-bot bot commented Dec 17, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@@ -1 +1 @@
version = "pyrefly 0.45.2"
version = "pyrefly 0.46.0"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This auto-updated, please let me know if this should be reverted.

line_to_errors.setdefault(int(lineno), []).append(line)
return line_to_errors

class TyTypeChecker(TypeChecker):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is entirely based on the Pyright checker.

_, lineno, kind, _ = line.split(":", maxsplit=3)
kind = kind.split()[-1]
a.add(kind)
if kind not in ("major", "minor"):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we want to re-map these to error and warning but this seems to work fine-ish?


def run_tests(self, test_files: Sequence[str]) -> dict[str, str]:
command = [sys.executable, "-m", "ty", "check", ".", "--output-format", "gitlab"]
proc = run(command, stdout=PIPE, text=True, encoding="utf-8")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gitlab seems to be the only json output mode.

@SimonSchick SimonSchick changed the title Feat/add ty feat: add ty Dec 17, 2025
@hauntsaninja
Copy link
Collaborator

Thanks, but folk from ty don't yet want to add themselves to the conformance suite

@erictraut
Copy link
Collaborator

@SimonSchick, are you working with the Astral team on this? Ty is still in prerelease, so I've been waiting for them to give the green light before adding them to the conformance tests. If you have their approval, then great. Otherwise, I think we should hold off on this.

@SimonSchick
Copy link
Author

I do not but you are welcome to continue this PR at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants