-
Notifications
You must be signed in to change notification settings - Fork 17
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
Refactor configuration- and comment-related logic #57
base: develop
Are you sure you want to change the base?
Conversation
Update Dockerfile: specify Python 3.7
4d7ec91
to
8296a1d
Compare
Would you mind pasting what |
Hey sorry, for some reason I don't receive email notifications for pull requests so I didn't realize you created this >1 month ago. TBH I'm not too sure about Codacy too. It's my first time using it >< |
No worries! Your call on whether to ignore Codacy or not. It seems pretty buggy, and Prospector F999 seems to be non-specific by design so I have no idea what the issue is. https://github.com/PyCQA/prospector/blob/f431c838cc86b84d68b5f0350ae9113257995262/prospector/tools/pyflakes/__init__.py Will you be willing to merge? |
Hi, sorry for the late reply. Just an update that I'm still looking through your code changes and I'll follow up with a more conclusive reply soon :) (It's my holiday break now so I'm taking things really chill haha) |
@darrenwee hey you still there? I've left a review with comments :) |
@darrenwee Alright, looks good. Make a PR into the |
@fterh there you go! I think you can edit PRs as the owner of the repo so you can make these changes on your own next time! (edit button next to the title) |
I migrated
comment.py
to a more object-oriented approach. This doesn't add any new features, but it makes it easier to maintain and make changes to the bot. This also grants developers the lovely support of autocomplete and type hints for easier development.This paves the way for migrating the split-long-comment-into-two-comments logic below into a nicer abstraction so that concerns are properly separated and you don't have to limit the bot to exactly two comments.
sneakpeek/scan.py
Lines 70 to 83 in 5e25bae
I also modified some parts of
config.py
. The version and repo link is now put insideabout.yaml
so that no source code changes are required to bump the version - this makes the git history cleaner for code. It also removes the magic strings from other classes/files.Since I did this, I decided to also create a unified interface to access all bot configuration parameters, the
BotConfig
, which you can inject wherever needed.