Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify Optional parameters in Graph.triples_choices #3075

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slahn
Copy link

@slahn slahn commented Feb 21, 2025

Summary of changes

Change the typing of Graph.triples_choices and Store.triples_choises
to match the actual types allowed by the code.

The two non-list parameters can be None, but this is not reflected in
the type hint today.

Introduce a type alias to simplify method signatures, and update all
overloads of triples_choises to use this alias.

Checklist

  • [✓] Checked that there aren't other open pull requests for
    the same change.
  • [✓] Checked that all tests and type checking passes.
    • Did not run webtests (pytest -m "not webtest"), since I could not get them working at all.
      7266 passed, 61 skipped, 333 deselected, 330 xfailed, 36 xpassed, 6925 warnings
  • [✓] Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

The two non-list parameters can be `None`, but this is not reflected in
the type hint.

Also introduces a type alias to simplify method signatures.
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