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

[pyjks] Fill in jks.bks and other modules, improved constructors #10815

Merged
merged 8 commits into from
Oct 6, 2023

Conversation

intgr
Copy link
Contributor

@intgr intgr commented Oct 1, 2023

Additionally:

  • Fixed type of PrivateKeyEntry.__init__(encrypted=) argument
  • Improved type of SecretKeyEntry.__init__(sealed_obj=) argument
  • Removed defaults from constructor args that shouldn't be None (alias, timestamp, etc).
  • Added | None to constructor arguments that may be None
  • Replaced = ... with = None where appropriate
  • Added @overload constructors for encrypted and unencrypted usages
  • Added helpful comments to __init__ constructors

Additionally 1 fix to `jks.PrivateKeyEntry.__init__`
@github-actions

This comment has been minimized.

@intgr intgr marked this pull request as ready for review October 1, 2023 16:28
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@intgr
Copy link
Contributor Author

intgr commented Oct 1, 2023

Ah thanks again, I forgot the * in args list.

@AlexWaygood
Copy link
Member

We should improve the stubtest error message there — that kind of thing comes up a lot, and stubtest could be clearer about what's gone wrong in this case!

@AlexWaygood
Copy link
Member

We should improve the stubtest error message there — that kind of thing comes up a lot, and stubtest could be clearer about what's gone wrong in this case!

Filed python/mypy#16210 to improve this!

@github-actions

This comment has been minimized.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks! Notes below.

stubs/pyjks/jks/bks.pyi Outdated Show resolved Hide resolved
stubs/pyjks/jks/bks.pyi Outdated Show resolved Hide resolved
stubs/pyjks/jks/jks.pyi Outdated Show resolved Hide resolved
@github-actions

This comment has been minimized.

…s, timestamp, etc).

* Added `| None` to constructor arguments that may be None
* Added `@overload` constructors for encrypted and unencrypted usages
* Replaced `= ...` with `= None` where appropriate
* Added helpful comments to `__init__` constructors
@intgr intgr changed the title [pyjks] Fill in jks.bks and remaining modules [pyjks] Fill in jks.bks and other modules, improved constructors Oct 5, 2023
@intgr
Copy link
Contributor Author

intgr commented Oct 5, 2023

Pushed lots of changes:

  • Improved type of SecretKeyEntry.__init__(sealed_obj=) argument
  • Removed defaults from constructor args that shouldn't be None (alias, timestamp, etc).
  • Added | None to constructor arguments that may be None
  • Replaced = ... with = None where appropriate
  • Added @overload constructors for encrypted and unencrypted usages

I could split these back out and open separate PR if you'd prefer.

@intgr intgr requested a review from srittau October 5, 2023 21:11
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks!

@srittau srittau merged commit ee6df10 into python:main Oct 6, 2023
47 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