executablebooks / github-activity

Simple markdown changelogs for GitHub repositories
https://github-activity.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
49 stars 11 forks source link

pre-commit configured and executed #55

Closed consideRatio closed 3 years ago

consideRatio commented 3 years ago

I copied a pre-commit config from kubespawner that is reused across the JupyterHub org to a large extent.

Closes #53 by enforcing style, not by documenting it - @manics what do you think?

This PR includes two misc commits

This PR has a flake8 failure still

There was one test failure I didn't fix because I was unsure how to do so. @choldgraf perhaps you can push a commit to this pr fixing this?

github_activity/graphql.py:132:60: F821 undefined name 'pageInfo'

https://github.com/executablebooks/github-activity/blob/8180a514c8caaac4ebd3abf9236581e2ee70b7f8/github_activity/graphql.py#L131-L132

choldgraf commented 3 years ago

This looks great to me!

For the flake error, I'm not quite sure what to do about it. pageInfo only exists after the first iteration (and is defined after that line which is why flake is unhappy i think). Perhaps we could set pageInfo to None at first so that is exists?

consideRatio commented 3 years ago

Aha that sounds okay to me! 👍

consideRatio commented 3 years ago

@choldgraf I pushed a commit initializing the variable before the loop - flake8 is now happy

choldgraf commented 3 years ago

Woohoo! Thanks for professionalizing this repo.a bit 🙂

consideRatio commented 3 years ago

Thanks for quick followup and merge @choldgraf! :tada: :heart: