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

Annotate Serializer.serialize and descendants #2970

Merged

Conversation

ajnelson-nist
Copy link
Contributor

This patch aligns the type signatures on Serializer subclasses, including renaming the arbitrary-keywords dictionary to always be **kwargs. This is in part to prepare for the possibility of adding *args as a positional-argument delimiter.

References:

Summary of changes

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
    • Note: This might bump into PR 2115, but I don't think I see any files that both PRs touched.
  • Checked that all tests and type checking passes.
  • If the change adds new features or changes the RDFLib public API:
  • If the change has a potential impact on users of this project: (Skipped - believed N/A)
    • Added or updated tests that fail without the change.
    • Updated relevant documentation to avoid inaccuracies.
    • Considered adding additional documentation.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

This patch aligns the type signatures on `Serializer` subclasses,
including renaming the arbitrary-keywords dictionary to always be
`**kwargs`.  This is in part to prepare for the possibility of adding
`*args` as a positional-argument delimiter.

References:
* RDFLib#1890 (comment)

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
@ajnelson-nist ajnelson-nist marked this pull request as ready for review November 4, 2024 16:33
@ajnelson-nist
Copy link
Contributor Author

This PR is ready for review and merge.

I'll be folding it into #1978 too.

@coveralls
Copy link

Coverage Status

coverage: 90.249% (+0.001%) from 90.248%
when pulling 2dfdfc0 on ajnelson-nist:issue-1890-serializer-types
into 086a4f7 on RDFLib:main.

@ashleysommer
Copy link
Contributor

Nice one. Thanks.

@ashleysommer ashleysommer merged commit 06bd927 into RDFLib:main Nov 4, 2024
22 checks passed
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.

3 participants