Reorganize imports

This commit is contained in:
Alexey Leshchenko 2022-02-18 12:36:55 +03:00
parent 45632b8265
commit c8a9dcbcd7

View File

@ -1,19 +1,23 @@
from notionparser import Parser import argparse
import copy
import logging
import os import os
import sys import sys
import logging
import urllib.parse import urllib.parse
import argparse
from pathlib import Path from pathlib import Path
from notionparser import Parser
log = logging.getLogger("loconotion") log = logging.getLogger("loconotion")
try: try:
import colorama
import requests import requests
import toml import toml
except ModuleNotFoundError as error: except ModuleNotFoundError as error:
log.critical( log.critical(
f"ModuleNotFoundError: {error}. have your installed the requirements?") f"ModuleNotFoundError: {error}. Have you installed the requirements?")
sys.exit() sys.exit()
@ -87,9 +91,6 @@ def setup_logging(args):
log.addHandler(log_screen_handler) log.addHandler(log_screen_handler)
log.propagate = False log.propagate = False
try: try:
import colorama
import copy
LOG_COLORS = { LOG_COLORS = {
logging.DEBUG: colorama.Fore.GREEN, logging.DEBUG: colorama.Fore.GREEN,
logging.INFO: colorama.Fore.BLUE, logging.INFO: colorama.Fore.BLUE,