mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
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:
@ -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"]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user