Skip to content

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Dec 26, 2025

Add pyrefly type checker and pyrefly-docs hooks to pre-commit configuration.


Note

Integrates pyrefly type checking into the tooling and applies minimal code tweaks to satisfy it.

  • Add pyrefly and pyrefly-docs pre-push hooks in .pre-commit-config.yaml and include them in CI skip list
  • Configure [tool.pyrefly] and add pyrefly to dev dependencies in pyproject.toml
  • Update spelling_private_dict.txt with pyrefly
  • Minor typing/inline pyrefly ignores: annotate WebDriver in admin/create_secrets_files.py; add # pyrefly: ignore[bad-argument-type] on copy.replace(...) in target_manager.py and _requests_mock_server/mock_web_services_api.py (no functional changes)

Written by Cursor Bugbot for commit b7fcaf6. This will update automatically on new commits. Configure here.

]
files_to_create = [file for file in required_files if not file.exists()]
driver = None
driver: WebDriver | None = None
Copy link

Choose a reason for hiding this comment

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

Runtime NameError from TYPE_CHECKING-only import annotation

The annotation driver: WebDriver | None = None references WebDriver, which is only imported inside if TYPE_CHECKING:. Since TYPE_CHECKING is False at runtime and the file lacks from __future__ import annotations, Python evaluates this annotation at runtime and raises NameError: name 'WebDriver' is not defined. PEP 649's deferred evaluation only applies to Python 3.14+, but this project requires 3.13+. Either add from __future__ import annotations or use a string annotation "WebDriver | None".

Additional Locations (1)

Fix in Cursor Fix in Web

@adamtheturtle adamtheturtle merged commit c9edefe into main Dec 26, 2025
104 checks passed
@adamtheturtle adamtheturtle deleted the add-pyrefly branch December 26, 2025 16:26
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.

2 participants