Skip to content

Add optional label parameter for pkcs11 support#241

Draft
krishnavema wants to merge 1 commit intoSSSD:masterfrom
krishnavema:smartcard-pkcs11
Draft

Add optional label parameter for pkcs11 support#241
krishnavema wants to merge 1 commit intoSSSD:masterfrom
krishnavema:smartcard-pkcs11

Conversation

@krishnavema
Copy link
Copy Markdown
Contributor

@krishnavema krishnavema commented Mar 27, 2026

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an optional label parameter to the add_cert and add_key methods in the smartcard utility, allowing for PKCS#11 object labeling. Feedback was provided to update the docstrings for these methods to accurately reflect the str | None type hint for the new parameter to ensure consistency with the function signatures.

Comment on lines +98 to +99
:param label: Label for the PKCS#11 object, defaults to None.
:type label: str, optional
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The type hint for the label parameter is str | None, but the docstring specifies :type label: str. To ensure documentation accuracy and prevent potential confusion for developers using this method, the type in the docstring should match the type hint in the function signature.

Suggested change
:param label: Label for the PKCS#11 object, defaults to None.
:type label: str, optional
:param label: Label for the PKCS#11 object, defaults to None.
:type label: str | None, optional

Comment on lines +124 to +125
:param label: Label for the PKCS#11 object, defaults to None.
:type label: str, optional
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The type hint for the label parameter is str | None, but the docstring specifies :type label: str. To ensure documentation accuracy and prevent potential confusion for developers using this method, the type in the docstring should match the type hint in the function signature.

Suggested change
:param label: Label for the PKCS#11 object, defaults to None.
:type label: str, optional
:param label: Label for the PKCS#11 object, defaults to None.
:type label: str | None, optional

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