Skip to content

Commit

Permalink
Use isort
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreeeee committed May 24, 2023
1 parent 2601c5c commit a55a742
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 26 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.isort]
profile = "black"
src_paths = ["yokkaichi"]
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from yokkaichi import __version__ as yokkaichi_ver
from setuptools import setup
from pathlib import Path
import sys
from pathlib import Path

from setuptools import setup

from yokkaichi import __version__ as yokkaichi_ver

# Load README from README.md
this_directory = Path(__file__).parent
Expand Down
8 changes: 5 additions & 3 deletions yokkaichi/MasscanScan.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from .constants.rich_console import console
from pathlib import Path
import json
import platform
from pathlib import Path

import masscan
import json

from .constants.rich_console import console


class MasscanScan:
Expand Down
12 changes: 7 additions & 5 deletions yokkaichi/ServerScan.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Import modules
from mcstatus import BedrockServer, JavaServer
from .constants.rich_console import console
import ast
import json
import threading
from datetime import datetime

import IP2Location
import threading
import json
import ast
from mcstatus import BedrockServer, JavaServer

from .constants.rich_console import console


class ServerScan:
Expand Down
25 changes: 14 additions & 11 deletions yokkaichi/__main__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# Import modules
from .constants.rich_console import console
from .port_parser import parse_port_range
from .args_to_cfg import args_to_cfg
from .MasscanScan import MasscanScan
from .ServerScan import ServerScan
from yokkaichi import __version__
import argparse
import pathlib
import platform
import time
from datetime import datetime
from . import config_loader

import IP2Location
import platform
import argparse
import requests
import pathlib
import tomli
import time

from yokkaichi import __version__

from . import config_loader
from .args_to_cfg import args_to_cfg
from .constants.rich_console import console
from .MasscanScan import MasscanScan
from .port_parser import parse_port_range
from .ServerScan import ServerScan


def display_version():
Expand Down
3 changes: 2 additions & 1 deletion yokkaichi/config_loader.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import tomli

from .constants.rich_console import console
from .port_parser import parse_port_range
from .structs.CFG import CFG
import tomli

CONFIG_VERSION = "1"
# TODO: Bring this back to a separate file
Expand Down
3 changes: 2 additions & 1 deletion yokkaichi/tests/test_args_to_cfg.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from yokkaichi.structs.CFG import CFG
from dataclasses import dataclass

import yokkaichi.args_to_cfg
from yokkaichi.structs.CFG import CFG


@dataclass
Expand Down
5 changes: 3 additions & 2 deletions yokkaichi/tests/test_config_loader.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from yokkaichi.structs.CFG import CFG
import yokkaichi.config_loader
import tomli

import yokkaichi.config_loader
from yokkaichi.structs.CFG import CFG

DEFAULT_CFG = """
version = "1"
Expand Down

0 comments on commit a55a742

Please sign in to comment.