Skip to content

Commit

Permalink
Tinkering with import style
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcantrell committed Nov 1, 2024
1 parent 6819eb8 commit 206a1f1
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 14 deletions.
10 changes: 6 additions & 4 deletions src/swaystatus/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import sys
import toml
from pathlib import Path

from argparse import ArgumentParser
from .loop import start
from pathlib import Path

from .config import config
from .modules import Modules
from .logging import logger, configure as configure_logging
from .env import bin_name, config_home, environ_path, environ_paths
from .logging import logger, configure as configure_logging
from .loop import start
from .modules import Modules


def parse_args():
Expand Down
2 changes: 2 additions & 0 deletions src/swaystatus/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"""

import os

from types import MethodType

from .logging import logger
from .subprocess import PopenStreamHandler

Expand Down
1 change: 1 addition & 0 deletions src/swaystatus/env.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import sys

from pathlib import Path

bin_name = os.path.basename(sys.argv[0])
Expand Down
8 changes: 5 additions & 3 deletions src/swaystatus/loop.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import sys
import locale
import json
import locale
import sys

from signal import signal, SIGINT, SIGUSR1
from threading import Thread
from .updater import Updater

from .logging import logger
from .updater import Updater


def configure_signal_handlers(updater):
Expand Down
5 changes: 3 additions & 2 deletions src/swaystatus/modules.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import sys
from uuid import uuid4
from pathlib import Path

from importlib import import_module, metadata
from importlib.util import spec_from_file_location, module_from_spec
from pathlib import Path
from uuid import uuid4


class Modules:
Expand Down
2 changes: 1 addition & 1 deletion src/swaystatus/subprocess.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from threading import Thread
from subprocess import Popen, PIPE
from threading import Thread


def proxy_lines(pipe, handler):
Expand Down
3 changes: 2 additions & 1 deletion src/swaystatus/updater.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import time
import json
import time

from signal import SIGSTOP, SIGCONT


Expand Down
1 change: 1 addition & 0 deletions tests/test_element.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from swaystatus.element import BaseElement


Expand Down
3 changes: 2 additions & 1 deletion tests/test_modules.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import shutil
import pytest
import shutil

from pathlib import Path
from swaystatus import modules

Expand Down
5 changes: 3 additions & 2 deletions tests/test_updater.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import os
import json
import random
import os
import pytest
import random

from swaystatus.element import BaseElement
from swaystatus.updater import Updater

Expand Down

0 comments on commit 206a1f1

Please sign in to comment.