Skip to content

Commit

Permalink
refactor: isort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed May 12, 2024
1 parent d026b15 commit 7921d7d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions x_notes/__main__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from loguru import logger

from .helpers import load_notes, save_metadata, save_notes
from .notes import get_notes
from .statuses import add_statuses
from .helpers import load_notes, save_notes, save_metadata


if __name__ == "__main__":
logger.info("Fetching notes ...")
Expand Down
2 changes: 1 addition & 1 deletion x_notes/fetch_tweets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import asyncio
from .tweets import fetch_tweets

from .tweets import fetch_tweets

if __name__ == "__main__":
loop = asyncio.get_event_loop()
Expand Down
6 changes: 3 additions & 3 deletions x_notes/github.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Tuple
from base64 import b64encode
from os import environ
from nacl import encoding, public
import requests
from typing import Tuple

import requests
from nacl import encoding, public

_base_url = f"https://api.github.com/repos/{environ['REPO']}/actions/secrets"
_headers = {
Expand Down
5 changes: 3 additions & 2 deletions x_notes/helpers.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from collections import defaultdict
import csv
import json
from collections import defaultdict
from datetime import date, datetime, timedelta, timezone
from io import StringIO
import json
from typing import Any, Generator

import requests


Expand Down
4 changes: 2 additions & 2 deletions x_notes/notes.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from datetime import datetime, timedelta, timezone
import re
from datetime import datetime, timedelta, timezone
from typing import Any
from .helpers import to_isoformat, get_generator

from .helpers import get_generator, to_isoformat

url_re = re.compile(r"(https?://[^\s]+)")
one_week_ago = (datetime.now(timezone.utc) - timedelta(days=7)).timestamp()
Expand Down
2 changes: 1 addition & 1 deletion x_notes/statuses.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any
from .helpers import get_generator, to_isoformat

from .helpers import get_generator, to_isoformat

helpful = "CURRENTLY_RATED_HELPFUL"
unhelpful = "CURRENTLY_RATED_NOT_HELPFUL"
Expand Down
4 changes: 3 additions & 1 deletion x_notes/tweets.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import json
from os import environ
from typing import Any

from loguru import logger
from twscrape import API, NoAccountError

from .github import update_secret
from .helpers import load_notes, save_notes, get_tweets_with_multi_notes
from .helpers import get_tweets_with_multi_notes, load_notes, save_notes


async def login() -> API:
Expand Down

0 comments on commit 7921d7d

Please sign in to comment.