Conversation
benmod
left a comment
There was a problem hiding this comment.
All good except those imports in the init.py file that the linter wrongly thought were unused but are actually used by anybody using the library.
| @@ -1,9 +1,5 @@ | |||
| from .token_encode import OpenPAYGOTokenEncoder | |||
There was a problem hiding this comment.
Why removing those imports? They are left at top level so that you can access them importing just the module, if we remove them it will break existing tools using it.
There was a problem hiding this comment.
It raised "unused variable" warnings. I think the recommended approach is to use __all__. Let me try to adapt. Do you have a piece of code, where I can test?
There was a problem hiding this comment.
Nothing public but basically you should be able to import all of those variables when importing openpaygo. Like from openpaygo import TokenType should work.
There was a problem hiding this comment.
I personally find it a bit odd, if from openpaygo import TokenType works, but from openpaygo import * and then openpaygo.TokenType doesn't. Using __all__ should be non-breaking. WDYT?
Apply'ing
blackandruffto the repository.Doing this in a first step, such that we can add the merge commit to
.git-blame-ignore-revsfile in a second step, see https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-viewAfter that, adding CI to check linting of Pull Requests.
Note: This should be merged using Squash&Rebase