#! /usr/bin/env python
-__all__ = ['get_config']
-
import os
from ConfigParser import SafeConfigParser
+__all__ = ['get_config']
+
def _find_config_dirs_posix():
config_dirs = []
#! /usr/bin/env python
-__all__ = ['Author', 'Book', 'Extension', 'Genre', 'Language',
- 'AuthorBook', 'BookGenre', 'open_db', 'init_db',
- 'insert_name', 'insert_author', 'update_counters',
- ]
-
import os
from sqlobject import SQLObject, StringCol, UnicodeCol, IntCol, BoolCol, \
ForeignKey, DateCol, DatabaseIndex, RelatedJoin, \
connectionForURI, sqlhub, SQLObjectNotFound, dberrors
from .config import get_config
+__all__ = ['Author', 'Book', 'Extension', 'Genre', 'Language',
+ 'AuthorBook', 'BookGenre', 'open_db', 'init_db',
+ 'insert_name', 'insert_author', 'update_counters',
+ ]
+
class Author(SQLObject):
surname = UnicodeCol(notNull=True)
#! /usr/bin/env python
-__all__ = ['import_glst']
-
import codecs
import os
from sqlobject import sqlhub, SQLObjectNotFound
from .db import Genre
+__all__ = ['import_glst']
+
def parse_glst_file(glst_filename):
glst_file = codecs.open(glst_filename, 'r', 'utf-8')
-__all__ = ['import_inpx']
-
import os
from zipfile import ZipFile
from sqlobject import sqlhub
from .db import Author, Book, Extension, Genre, Language, \
insert_name, insert_author
+__all__ = ['import_inpx']
+
EOT = chr(4) # INP field separator
+from sqlobject.sqlbuilder import AND, func
+from .db import Author, Book, Extension, Genre, Language
+
__all__ = [
'mk_search_conditions',
'search_authors', 'search_books', 'search_extensions',
'search_genres', 'search_languages',
]
-from sqlobject.sqlbuilder import AND, func
-from .db import Author, Book, Extension, Genre, Language
-
def _mk_search_conditions_with_operator(table, case_sensitive, comparison_op,
values, expressions):
versionpath = join(abspath(dirname(__file__)), 'm_librarian', '__version__.py')
load_source('m_librarian_version', versionpath)
-from m_librarian_version import __version__
+# Ignore: E402 module level import not at top of file
+from m_librarian_version import __version__ # noqa
setup(name='m_librarian',
version=__version__,
-__all__ = ['TestCase', 'main']
-
-
import os
import unittest
from m_librarian.db import open_db, init_db
from m_librarian.inp import import_inpx
+__all__ = ['TestCase', 'main']
+
class TestCase(unittest.TestCase):
def setUp(self):