-
Notifications
You must be signed in to change notification settings - Fork 7
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
Added abstract backend base with Gitlab implementation #102
Conversation
I'll probably need ideas on how to handle Access. I have a feeling it should be moved to the backend. |
assigner/backends/base.py
Outdated
raise NotImplementedError | ||
|
||
@classmethod | ||
def from_url(cls, url: str, token: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into returning a self type from a class method in type annotations.
I think this is the recommended way:
python/mypy#1212 (comment)
Though I also saw this:
python/mypy#1212 (comment)
Thoughts? I really like these type annotations; I'll keep adding them where I can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think python/peps@ada7d35 is what you want?
I also am a big fan of the type annotations; eventually I want to be able to integrate mypy here but there's a bit of footwork involved in writing annotations for some of the libraries we depend on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that's what I want. I tried reading this at 7 last night and I couldn't comprehend it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to make all my comments part of a review but you can see 'em just the same.
@LinuxMercedes I rebased off master and squashed some commits. Please look with your wizard eyes. |
Let me get #111 into shape and then we can put the last bit of polish on this! Thank you so much for being patient and humoring my nitpicking ❤️ |
823aabc
to
43bad19
Compare
1281c63
to
a8fb4a3
Compare
850c5c0
to
b498670
Compare
29408f9
to
763f3eb
Compare
Fixed pyflakes error about imports in __init__.py Converted to @require_backend calling @config_context. Added basic mock backend. Updated double decorator calls. Removed changelog message about backend.
Added hook for MockBackend in config. Mock backend now works but doesn't do much. Updated doc / references to base repo to now reference template repo. Added linting error exception.
Moved Access into backend, fixed unit tests and remaining TODOs. Renamed requires_backend to requires_backend_and_config renamed config_context to requires_config. Added changelog messages. Added note about base repo -> template repo. Send integer Access level rather than enum name
Updated tests. Rembed unneeded pyflakes override. Ran sed on files to appease nitpicks. Moved changelog to the correct spot. Fixed linting error with asigner_test test case.
Removed artifact config.py Fixed get integration test errors.
763f3eb
to
bcf3a29
Compare
@brhoades The only thing I think I have left to do for this is to finish up the last commit -- adding more return type signatures. Care to give it a once-over and an LGTM? ❤️ |
Also add a couple git ones that got missed.
d5291be
to
454f27b
Compare
LGTM 👍 |
🎉 🎉 🎉 🎉 🎉 |
See description in #95 (fixes #95). I've added and separated backends as described there. I want to add a mock backend so I can test this locally next.