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

fix: narrow the context identifier type from Node to IdentifiedNode #2069

Merged

Conversation

aucampia
Copy link
Member

Summary of changes

Narrow the context identifier type from Node to IdentifiedNode as
Node is too broad and no supported format (N3, RDF) allows using
anything other than IdentifiedNode as context identifiers.

The only change here that has a runtime impact is the change in
Graph.__init__ to check isinstance against Node instead
of IdentifiedNode.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Checked that all tests and type checking passes.
  • For changes that have a potential impact on users of this project:
    • Considered updating our changelog (CHANGELOG.md).
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@aucampia aucampia marked this pull request as ready for review July 31, 2022 11:15
@aucampia aucampia requested a review from a team July 31, 2022 11:15
@coveralls
Copy link

coveralls commented Jul 31, 2022

Coverage Status

Coverage remained the same at 90.447% when pulling e034de8 on aucampia:iwana-20220731T1225-narrow_identifier into 2d61846 on RDFLib:master.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

lgtm

Narrow the context identifier type from `Node` to `IdentifiedNode` as
`Node` is too broad and no supported format (N3, RDF) allows using
anything other than `IdentifiedNode` as context identifiers.

The only change here that has a runtime impact is the change in
`Graph.__init__` to check isinstance against `Node` instead
of `IdentifiedNode`.
@aucampia aucampia force-pushed the iwana-20220731T1225-narrow_identifier branch from 59f4734 to e034de8 Compare August 2, 2022 18:35
@aucampia aucampia merged commit cfa4180 into RDFLib:master Aug 2, 2022
@aucampia aucampia deleted the iwana-20220731T1225-narrow_identifier branch April 9, 2023 15:05
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.

None yet

2 participants