Sort imports with isort
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
7
fioul.py
7
fioul.py
@@ -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():
|
||||||
|
|||||||
16
models.py
16
models.py
@@ -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
2
pyproject.toml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[tool.isort]
|
||||||
|
profile = "black"
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user