Sort imports with isort

This commit is contained in:
2022-07-21 00:32:59 +02:00
parent d52c8df6f3
commit e749128b16
5 changed files with 21 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
from configparser import ConfigParser
import os import os
from configparser import ConfigParser
conf = ConfigParser() conf = ConfigParser()
ini_file = os.path.dirname(__file__) + "/fioul.ini" ini_file = os.path.dirname(__file__) + "/fioul.ini"

View File

@@ -1,13 +1,14 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import json
from argparse import ArgumentParser from argparse import ArgumentParser
from config import conf
from datetime import date from datetime import date
from models import Price, IntegrityError
import requests import requests
import json
import webapp import webapp
from config import conf
from models import IntegrityError, Price
def get_today_price_from_internet(): def get_today_price_from_internet():

View File

@@ -1,10 +1,14 @@
from config import conf from peewee import (
from peewee import MySQLDatabase AutoField,
from peewee import SqliteDatabase DateField,
from peewee import Model IntegerField,
from peewee import AutoField, DateField, IntegerField IntegrityError,
Model,
MySQLDatabase,
SqliteDatabase,
)
from peewee import IntegrityError from config import conf
backend = conf["db"].get("backend", None) backend = conf["db"].get("backend", None)
if backend == "sqlite": if backend == "sqlite":

2
pyproject.toml Normal file
View File

@@ -0,0 +1,2 @@
[tool.isort]
profile = "black"

View File

@@ -1,8 +1,9 @@
from bottle import hook, request, route, run, static_file, view
import models
from models import Price
import os import os
from bottle import hook, request, route, run, static_file, view
import models
from models import Price
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Web application # Web application