Merge pull request #10 from jonafato/isort

Use isort
This commit is contained in:
th3r00t
2019-11-09 10:56:22 -05:00
committed by GitHub
10 changed files with 40 additions and 10 deletions

View File

@@ -10,3 +10,15 @@ repos:
rev: v1.3.0
hooks:
- id: trailing-whitespace
# Python import formatting
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.3
hooks:
- id: seed-isort-config
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21-2
hooks:
- id: isort
additional_dependencies: ["toml"]

View File

@@ -1,3 +1,4 @@
import sys
import os
import sys
sys.path.insert(0, os.path.abspath('.'))

View File

@@ -1,6 +1,8 @@
#!/usr/bin/python
import sys
import requests
# sys.path.insert(1, 'lib/')

View File

@@ -2,9 +2,10 @@
import cgi
import sys
sys.path.insert(0, '../')
from config import Config
sys.path.insert(0, '../')
class Frontend():
"""Dynamic frontend display functions"""

View File

@@ -1,8 +1,10 @@
#!/usr/bin/python
import sys
import sqlite3
import sys
# sys.path.insert(1, '../')
from config import Config
db_pointer = Config().catalogue_db

View File

@@ -2,11 +2,10 @@
import sys
from config import Config
from lib.library import Catalogue
from lib.pyShelf import InitFiles
from lib.pyShelf import BookServer
from lib.pyShelf import BookDisplay
from lib.display import Frontend
from lib.library import Catalogue
from lib.pyShelf import BookDisplay, BookServer, InitFiles
# sys.path.insert(1, 'lib/')
config = Config() # Get configuration settings

10
pyproject.toml Normal file
View File

@@ -0,0 +1,10 @@
[tool.isort]
force_grid_wrap = 0
include_trailing_comma = true
line_length = 88
multi_line_output = 3
use_parentheses = true
# NOTE: the known_third_party setting is managed by
# seed-isort-config and should not be modified directly.
# Any changes made to this setting will be overwritten.
known_third_party = ["PIL", "bs4", "requests"]

View File

@@ -1,2 +1,3 @@
import sys
sys.path.insert(1, '../lib/')

View File

@@ -1,8 +1,9 @@
import sys
import unittest
from lib.pyShelf import BookDisplay, BookServer
from lib.display import Frontend
from lib.pyShelf import BookDisplay, BookServer
sys.path.insert(0, '../lib')
sys.path.insert(1, '../')

View File

@@ -1,5 +1,6 @@
import unittest
import sys
import unittest
# sys.path.insert(1, '../')
from lib.storage import Storage