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

typing for client __init__ #3357

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Vulwsztyn
Copy link

@Vulwsztyn Vulwsztyn commented Aug 19, 2024

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

I only added typings to __init__ method of client:Redis class

I realise this exists: #3252

But there were some comments and it is dead since the end of May, while I hope this PR introduces so little change that it is instantly mergeable.

@vladvildanov
Copy link
Collaborator

@Vulwsztyn Tests are failing, cause of conditional OpenSSL dependency

@Vulwsztyn
Copy link
Author

@vladvildanov thanks I'll make it unconditional

@vladvildanov
Copy link
Collaborator

@Vulwsztyn Thank you for your contribution!

@Vulwsztyn Vulwsztyn force-pushed the typing_for_client_init branch 3 times, most recently from 3771028 to d6a4326 Compare September 4, 2024 09:23
@Vulwsztyn
Copy link
Author

@vladvildanov I changed the typing to string literals so that it doesn't require imports and removed the conditional imports

@Vulwsztyn
Copy link
Author

@vladvildanov Any insight as to why the tests are failing now? Should I do something?

@Vulwsztyn
Copy link
Author

Vulwsztyn commented Sep 11, 2024

@vladvildanov I fixed the linting issues. Sorry it took so long.

> invoke linters
All done! ✨ 🍰 ✨
134 files would be left unchanged.
Running flynt v.0.69
Running flynt in dry-run mode. No files will be changed.

Flynt run has finished. Stats:

Execution time:                            2.488s
Files modified:                            0

_-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_.
Please run your tests before committing. Did flynt get a perfect conversion? give it a star at: 
~ https://github.com/ikamensh/flynt ~
Thank you for using flynt. Upgrade more projects and recommend it to your colleagues!
> invoke linters
All done! ✨ 🍰 ✨
134 files would be left unchanged.
Running flynt v.0.69
Running flynt in dry-run mode. No files will be changed.

Flynt run has finished. Stats:

Execution time:                            2.488s
Files modified:                            0

_-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_._-_.
Please run your tests before committing. Did flynt get a perfect conversion? give it a star at: 
~ https://github.com/ikamensh/flynt ~
Thank you for using flynt. Upgrade more projects and recommend it to your colleagues!

@Vulwsztyn
Copy link
Author

rebased unto master

@vladvildanov
Copy link
Collaborator

@Vulwsztyn OpenSSL is still an issue if you have a look in CI logs

@vladvildanov vladvildanov added the techdebt Things that can be improved or refactored label Sep 19, 2024
@Vulwsztyn
Copy link
Author

@vladvildanov Thanks for the ping.

I don't get something here. In this line

import OpenSSL
in this project we import OpenSSL, but it is not a dependency of this project? Should it remain so?

@vladvildanov
Copy link
Collaborator

@Vulwsztyn
Copy link
Author

Removed the typing requiring openssl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
techdebt Things that can be improved or refactored
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants