Conversation
|
Commit after each file is modified.@copilot |
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
|
@copilot Commit a file after this is modified. Do not ignore errors. |
retry |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Completed. All ANN violations fixed across 36 files with individual commits (862dfae through 9179f89). Zero ANN errors remaining, all tests pass. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot please note that some classes like Job, Submission, Context, etc should be used instead of |
- Replace submission: Any with submission: Submission - Add TYPE_CHECKING import to avoid circular imports - Use forward reference for Submission type Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace job: Any with job: Job - Replace submission: Any with submission: Submission - Replace res/resources: Any with Resources - Add TYPE_CHECKING imports for Job, Resources, Submission - Import JobStatus for check_status return type Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace context: Any with context: BaseContext in Task.get_task_state - Add TYPE_CHECKING import for BaseContext Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…t.py - Replace submission: Any with submission: Submission - Add TYPE_CHECKING import for Submission Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace submission: Any with submission: Submission - Add TYPE_CHECKING import for Submission Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace submission: Any with submission: Submission - Add TYPE_CHECKING import for Submission Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace submission: Any with submission: Submission - Add TYPE_CHECKING import for Submission Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ontext.py - Replace submission: Any with submission: Submission - Replace job: Any with job: Job - Add TYPE_CHECKING imports for Job, Submission Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace res: Any with res: Resources - Add Resources to TYPE_CHECKING imports - Fix return types for sub_script_cmd and sub_script_head Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace group_id: Any with group_id: Optional[int] - Replace status: Any with status: int | JobStatus - Return type for _get_job_detail is Dict[str, Any] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace group_id: Any with group_id: Optional[int] - Replace status: Any with status: int | JobStatus - Return type for _get_job_detail is Dict[str, Any] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replaced
Used TYPE_CHECKING imports to avoid circular dependencies. Kept Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot TypeError: unsupported operand type(s) for |: 'type' and 'EnumMeta' |
Replace `int | JobStatus` with `Union[int, JobStatus]` to support Python 3.7+. The `|` union operator syntax was introduced in Python 3.10, but the project requires Python >=3.7. Fixes TypeError: unsupported operand type(s) for |: 'type' and 'EnumMeta' Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Fixed in commit 2604cb3. Replaced Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Enable ruff rule ANN
Summary
This PR enables the ruff ANN (flake8-annotations) rule and adds comprehensive type annotations throughout the dpdispatcher codebase.
Changes Made
pyproject.tomlwithout any ignoresAnywith proper class types (Submission, Job, Task, Machine, Resources, BaseContext)Union[int, JobStatus]instead ofint | JobStatusfor Python 3.7+ supportTesting
ruff check --select ANNpasses)The codebase now has comprehensive type annotations with proper domain types, improving code quality, IDE support, and type safety.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.