Skip to content

fixed invalid | None syntax for python 3.9#9993

Open
jasparm wants to merge 1 commit into
pgadmin-org:masterfrom
jasparm:fix/python_3_9_no_OR_operator
Open

fixed invalid | None syntax for python 3.9#9993
jasparm wants to merge 1 commit into
pgadmin-org:masterfrom
jasparm:fix/python_3_9_no_OR_operator

Conversation

@jasparm
Copy link
Copy Markdown

@jasparm jasparm commented Jun 1, 2026

Fixes issue #9992

Summary by CodeRabbit

  • Chores
    • Internal code maintenance update with no user-facing changes.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f4f4dae8-1589-4d3b-905e-b6e754e394ed

📥 Commits

Reviewing files that changed from the base of the PR and between 0d11dbc and 5b64818.

📒 Files selected for processing (1)
  • web/pgadmin/llm/tools/database.py

Walkthrough

The return type annotation of the internal _connect_readonly helper function is updated from the modern union syntax str | None to the equivalent Optional[str] notation. The function behavior is unchanged; only the type annotation style is modified for compatibility.

Changes

Type annotation compatibility

Layer / File(s) Summary
Return type annotation compatibility
web/pgadmin/llm/tools/database.py
The _connect_readonly function's return type is updated from `tuple[bool, str

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing Python 3.9 incompatibility by replacing the pipe union syntax (|) with Optional, which is the core purpose of the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jasparm
Copy link
Copy Markdown
Author

jasparm commented Jun 1, 2026

This fixes issue #9992

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.

1 participant