Add GitHub action for pre-commit (#2515)

* Add GitHub action file for pre-commit

* Fix errors exposed by pre-commit hook:

- Remove executable bit from files without shebang. I checked those
  file and it was not needed.
- Fix with black

* Apply suggestions from code review

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Dhruv
2020-09-30 18:53:34 +05:30
committed by GitHub
parent ae65f55de3
commit acaeb22bbd
5 changed files with 16 additions and 1 deletions

View File

@ -15,7 +15,7 @@ def extract_user_profile(script) -> dict:
May raise json.decoder.JSONDecodeError
"""
data = script.contents[0]
info = json.loads(data[data.find('{"config"'): -1])
info = json.loads(data[data.find('{"config"') : -1])
return info["entry_data"]["ProfilePage"][0]["graphql"]["user"]