Add IdentifiedNode abstract intermediary class by ajnelson-nist · Pull Request #1680 · RDFLib/rdflib (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation3 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

ajnelson-nist

Fixes #1526

Proposed Changes

@ajnelson-nist

This patch adds and exposes an intermediary class IdentifiedNode as a superclass of URIRef and BNode. From review of the subclass methods for identical implementations, two appeared to be able to move into this superclass.

Thanks to Nicholas Car for finding this pragmatic name.

This patch addresses at least some of Issue 1526.

References:

Cc: Nicholas Car nicholas.car@surroundaustralia.com Signed-off-by: Alex Nelson alexander.nelson@nist.gov

aucampia

Member

@aucampia aucampia left a comment • Loading

Choose a reason for hiding this comment

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

Looks good to me, thanks for the change.

nicholascar

Choose a reason for hiding this comment

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

Looks good, and I think that the only tests failing are ok as these are the not finalised pre-commit hooks.

@aucampia

Looks good, and I think that the only tests failing are ok as these are the not finalised pre-commit hooks.

yes, I disabled them now and will re-enable once that PR is merged to avoid confusion from others, the PR for pre-commits has links to my fork which has it enabled for illustrative purposes.

ashleysommer added a commit that referenced this pull request

Aug 1, 2024

@ashleysommer

When PR #1680 was merged to add the IdentifiedNode intermediate class, it was missing the required n3() fn, and missed the __slots__ directive.

nicholascar pushed a commit that referenced this pull request

Aug 1, 2024

@ashleysommer