Address PR feedback: add --output/-o json flag to inspect command
- Remove unnecessary 'from __future__ import annotations' import
- Add --output/-o json flag to inspect command following established patterns
- Use Pretty() for default output, JSON for --output json
- Add tests for JSON output and invalid output format
Co-Authored-By: Nate Nowack <nate@prefect.io>
fix: restore netloc-based credential formatting for YAML deployments
When credentials are specified via block references in deployment YAML:
credentials: "{{ prefect.blocks.gitlab-credentials.my-block }}"
they resolve to dicts, not Block instances. PR #19236 moved provider-specific
credential formatting logic to Block.format_git_credentials(), but this broke
the YAML deployment path because dicts don't implement that protocol.
This restores the netloc-based provider detection that was removed, providing
sensible defaults for GitLab (oauth2: prefix), BitBucket (x-token-auth: prefix),
and BitBucket Server (username:token format) when credentials are dicts.
Block instances still use the protocol-based format_git_credentials() method.
Fixes #19861
Related: #19296
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
test: add coverage for non-Pydantic generic dataclass serialization
Ensures the Pydantic generic fix doesn't break standard Generic dataclasses.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix KeyError crash caused by dead cancellation tracking code in worker
Remove unused `_cancelling_flow_run_ids` set and related code that would
cause a KeyError when the scheduled removal task ran, since the flow run
ID was never actually added to the set.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>