Skip to content

Commit ec62f38

Browse files
committed
🔨 reformat code
1 parent 1a47d9e commit ec62f38

31 files changed

+80
-64
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ document:
77
sphinx-autogen -o docs/source/generated/ docs/source/*.rst
88
sphinx-build -b html docs/source/ docs/build/
99

10-
<<<<<<< HEAD
1110
format:
1211
isort -y $(find pyexcel_io -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
1312
black -l 79 pyexcel_io
1413
black -l 79 tests
15-
=======
14+
1615
lint:
1716
bash lint.sh
1817

19-
>>>>>>> master
18+

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@
6969
# -- Options for intersphinx extension ---------------------------------------
7070

7171
# Example configuration for intersphinx: refer to the Python standard library.
72-
intersphinx_mapping = {'https://docs.python.org/': None}
72+
intersphinx_mapping = {'https://docs.python.org/': None}

pyexcel_io/__init__.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
:license: New BSD License, see LICENSE for more details
99
"""
1010
import logging
11-
from ._compact import NullHandler
1211

13-
logging.getLogger(__name__).addHandler(NullHandler()) # noqa
12+
import pyexcel_io.plugins as plugins
1413

1514
from .io import get_data, iget_data, save_data # noqa
16-
import pyexcel_io.plugins as plugins
15+
from ._compact import NullHandler
16+
17+
logging.getLogger(__name__).addHandler(NullHandler()) # noqa
1718

1819

1920
BLACK_LIST = [__name__, "pyexcel_webio", "pyexcel_text"]
@@ -25,7 +26,5 @@
2526
PREFIX_PATTERN = "^pyexcel_.*$"
2627

2728
plugins.load_plugins(
28-
PREFIX_PATTERN,
29-
__path__, # noqa: F821
30-
BLACK_LIST,
31-
WHITE_LIST)
29+
PREFIX_PATTERN, __path__, BLACK_LIST, WHITE_LIST # noqa: F821
30+
)

pyexcel_io/book.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"""
1010
import pyexcel_io.manager as manager
1111
from pyexcel_io._compact import PY2, OrderedDict, isstream
12+
1213
from .constants import MESSAGE_ERROR_03, MESSAGE_WRONG_IO_INSTANCE
1314

1415

pyexcel_io/database/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
:license: New BSD License, see LICENSE for more details
99
"""
1010
from pyexcel_io.plugins import IOPluginInfoChain
11-
from pyexcel_io.constants import DB_DJANGO, DB_SQL
12-
11+
from pyexcel_io.constants import DB_SQL, DB_DJANGO
1312

1413
IOPluginInfoChain(__name__).add_a_reader(
1514
relative_plugin_class_path="exporters.django.DjangoBookReader",

pyexcel_io/exceptions.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ class IntegerAccuracyLossError(Exception):
4646
b=get_sheet(file_name='abc.ods')
4747
b[0,0] != s[0,0]
4848
"""
49+
4950
def __init__(self, message):
5051
custom_message = (
51-
message + '\n' +
52-
"In order to keep its accuracy, please save as string. Then " +
53-
"convert to int, long or float after the value will be read back"
52+
message
53+
+ "\n"
54+
+ "In order to keep its accuracy, please save as string. Then "
55+
+ "convert to int, long or float after the value will be read back"
5456
)
5557

5658
super(IntegerAccuracyLossError, self).__init__(custom_message)

pyexcel_io/io.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
import warnings
1212
from types import GeneratorType
1313

14-
from pyexcel_io._compact import isstream, PY2
14+
from pyexcel_io import constants
1515
from pyexcel_io.plugins import READERS, WRITERS
16+
from pyexcel_io._compact import PY2, isstream
1617
from pyexcel_io.exceptions import NoSupportingPluginFound
1718

1819

@@ -124,7 +125,7 @@ def save_data(afile, data, file_type=None, **keywords):
124125
keywords.update(dict(file_stream=afile, file_type=file_type))
125126
else:
126127
keywords.update(dict(file_name=afile, file_type=file_type))
127-
keywords['single_sheet_in_book'] = single_sheet_in_book
128+
keywords["single_sheet_in_book"] = single_sheet_in_book
128129
with get_writer(**keywords) as writer:
129130
writer.write(to_store)
130131

pyexcel_io/plugins.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77
:copyright: (c) 2014-2017 by Onni Software Ltd.
88
:license: New BSD License, see LICENSE for more details
99
"""
10-
from lml.loader import scan_plugins_regex
11-
from lml.plugin import PluginManager
12-
from lml.plugin import PluginInfoChain, PluginInfo
13-
1410
import pyexcel_io.utils as ioutils
1511
import pyexcel_io.manager as manager
1612
import pyexcel_io.constants as constants
1713
import pyexcel_io.exceptions as exceptions
14+
from lml.loader import scan_plugins_regex
15+
from lml.plugin import PluginInfo, PluginManager, PluginInfoChain
1816

1917
ERROR_MESSAGE_FORMATTER = "one of these plugins for %s data in '%s': %s"
2018
UPGRADE_MESSAGE = "Please upgrade the plugin '%s' according to \
@@ -137,5 +135,5 @@ def load_plugins(plugin_name_patterns, path, black_list, white_list):
137135
plugin_name_patterns=plugin_name_patterns,
138136
pyinstaller_path=path,
139137
black_list=black_list,
140-
white_list=white_list
138+
white_list=white_list,
141139
)

pyexcel_io/readers/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"""
1010
from pyexcel_io.plugins import IOPluginInfoChain
1111

12-
1312
IOPluginInfoChain(__name__).add_a_reader(
1413
relative_plugin_class_path="csvr.CSVBookReader",
1514
file_types=["csv"],

pyexcel_io/readers/csvz.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from pyexcel_io.book import BookReader
1313
from pyexcel_io._compact import PY2, StringIO
1414
from pyexcel_io.constants import FILE_FORMAT_CSVZ
15+
1516
from .csvr import NamedContent, CSVinMemoryReader
1617

1718

0 commit comments

Comments
 (0)