Skip to content

Add some types to OLConnection#12113

Open
cdrini wants to merge 1 commit intointernetarchive:masterfrom
cdrini:refactor/connection-types
Open

Add some types to OLConnection#12113
cdrini wants to merge 1 commit intointernetarchive:masterfrom
cdrini:refactor/connection-types

Conversation

@cdrini
Copy link
Collaborator

@cdrini cdrini commented Mar 17, 2026

Small refactor. While investigating the db pathway added some types to clear up ambiguities.

Technical

Testing

Screenshot

Stakeholders

Copilot AI review requested due to automatic review settings March 17, 2026 18:08
@github-project-automation github-project-automation bot moved this to Waiting Review/Merge from Staff in Ray's Project Mar 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Python type annotations around the Open Library infobase connection factory and related connection wrappers to reduce ambiguity when tracing the DB connection pathway.

Changes:

  • Added type hints to ConnectionMiddleware.__init__ and HybridConnection.__init__.
  • Refactored OLConnection to inline the connection-selection logic and added return typing plus cast(...) for local/remote connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Waiting Review/Merge from Staff

Development

Successfully merging this pull request may close these issues.

3 participants