mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 05:43:06 +00:00
Cleanup with ruff check (#963)
* Implement improvements suggested by ruff check. * Add ruff check to CI. * Add changelog fragment.
This commit is contained in:
@@ -312,7 +312,7 @@ class OpensshCertificateOption:
|
||||
|
||||
@classmethod
|
||||
def from_string(
|
||||
cls: t.Type[_OpensshCertificateOption], option_string: str
|
||||
cls: t.Type[_OpensshCertificateOption], option_string: str # noqa: UP006
|
||||
) -> _OpensshCertificateOption:
|
||||
if not isinstance(option_string, str):
|
||||
raise ValueError(
|
||||
@@ -573,7 +573,7 @@ class OpensshCertificate:
|
||||
|
||||
@classmethod
|
||||
def load(
|
||||
cls: t.Type[_OpensshCertificate], path: str | os.PathLike
|
||||
cls: t.Type[_OpensshCertificate], path: str | os.PathLike # noqa: UP006
|
||||
) -> _OpensshCertificate:
|
||||
if not os.path.exists(path):
|
||||
raise ValueError(f"{path} is not a valid path.")
|
||||
|
||||
Reference in New Issue
Block a user