-
Notifications
You must be signed in to change notification settings - Fork 30
chore: Replacemypy
with pyrefly
type checker (do not merge)
#678
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
base: main
Are you sure you want to change the base?
Conversation
- Replace mypy dependency with pyrefly ^0.26.0 - Update CI workflow from mypy-check to pyrefly-check - Update type-check Poe task to use pyrefly - Add pyrefly configuration with python_version and project_excludes - Use pyrefly --suppress-errors to auto-add noqa comments for legacy code - Test integration shows 0 errors with 530 ignored violations Co-Authored-By: AJ Steers <[email protected]>
Original prompt from AJ Steers:
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. Testing This CDK VersionYou can test this version of the CDK using the following: # Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@devin/1753838067-test-pyrefly-type-checker#egg=airbyte-python-cdk[dev]' --help
# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch devin/1753838067-test-pyrefly-type-checker Helpful ResourcesPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
- Fix pyrefly suppression comments displaced by ruff formatting - Move suppression comments to correct lines for type errors - Apply ruff format fixes to maintain code style consistency - Verify pyrefly still works: 0 errors (528 ignored) Co-Authored-By: AJ Steers <[email protected]>
…ment - Move pyrefly suppression comment to correct line after ruff formatting - Verify both ruff format --check and pyrefly type-check pass locally - Final fix for Ruff Format Check CI failure Co-Authored-By: AJ Steers <[email protected]>
mpyp
with pyrefly
type checker (do not merge)
mpyp
with pyrefly
type checker (do not merge)mypy
with pyrefly
type checker (do not merge)
…in permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
- Run pyrefly init to migrate mypy.ini to pyrefly.toml - Auto-suppress 2 errors in bin/ and docs/ files - Remove redundant [tool.pyrefly] section from pyproject.toml - Remove obsolete mypy.ini file - Pyrefly check now shows 0 errors (526 ignored) Co-Authored-By: AJ Steers <[email protected]>
feat: Replace MyPy with pyrefly type checker (do not merge)
Summary
This PR replaces MyPy with Meta's
pyrefly
type checker as a test to evaluate pyrefly as a potential MyPy alternative for the airbyte-python-cdk repository. The integration uses pyrefly's--suppress-errors
auto-noqa feature to automatically add suppression comments for existing type violations, allowing us to focus on evaluating the tool's performance and usability rather than fixing legacy type issues.Key Changes:
mypy
dependency withpyrefly ^0.26.0
mypy-check
topyrefly-check
type-check
Poe task to usepyrefly check airbyte_cdk
bin
,docs
, andunit_tests
directoriesResults: Local testing shows
0 errors (530 ignored)
- pyrefly successfully runs with auto-noqa suppression.Review & Testing Checklist for Human
pyrefly-check
job completes successfully and doesn't timeout# pyrefly: ignore
comments to ensure they're reasonable and not masking critical type safety issuespoetry run poe type-check
locally to confirm the workflow works for developersDiagram
Notes
--suppress-errors
to focus on tool evaluation rather than fixing existing type issuesThe large number of auto-generated suppressions (530) indicates significant type inconsistencies in the legacy codebase that pyrefly detected. This provides valuable insight into the codebase's type safety status while allowing evaluation of pyrefly's capabilities.