You should put a blank line between each group of imports.
So for example,
# standard libraries first, with direct imports first and then "from" imports
import os
import sys
from datetime import datetime
# similarly for third-party imports
import requests
import responses
from bs4 import BeautifulSoup
# then local/specific imports
from evalai.some_app import some_class
from evalai.some_other_app import some_other_class
.
.
.
Changes proposed:
Make import ordering consistent in get_token.py (where
import json
line came after the third-party andfrom
-style imports).As the ordering was not according to PEP 8 I made some sample changes to see the differences clearly.
In addition to PEP 8, I used Google's style guide for extended conventions.
The syntax PEP 8 recommends is:
So for example,