Skip to content

Commit 7f54170

Browse files
committed
👕 coding style update
1 parent b512b1d commit 7f54170

File tree

10 files changed

+70
-22
lines changed

10 files changed

+70
-22
lines changed

.isort.cfg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[settings]
2+
line_length=79
3+
known_first_party=lml, pyexcel, odfpy
4+
known_third_party=nose
5+
indent=' '
6+
multi_line_output=3
7+
length_sort=1
8+
default_section=FIRSTPARTY
9+
no_lines_before=LOCALFOLDER
10+
sections=FUTURE,STDLIB,FIRSTPARTY,THIRDPARTY,LOCALFOLDER

.moban.d/custom_README.rst.jj2

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{%extends 'README.rst.jj2' %}
2+
3+
{%block documentation_link%}
4+
{%endblock%}
5+
6+
{%block description%}
7+
**pyexcel-ods** is a tiny wrapper library to read, manipulate and write data in
8+
ods format using python 2.6 and python 2.7. You are likely to use it with
9+
`pyexcel <https://github.com/pyexcel/pyexcel>`_.
10+
`pyexcel-ods3 <https://github.com/pyexcel/pyexcel-ods3>`_ is a sister library that
11+
depends on ezodf and lxml. `pyexcel-odsr <https://github.com/pyexcel/pyexcel-odsr>`_
12+
is the other sister library that has no external dependency but do ods reading only
13+
{%endblock%}
14+
15+
{% block pagination_note%}
16+
Special notice 30/01/2017: due to the constraints of the underlying 3rd party
17+
library, it will read the whole file before returning the paginated data. So
18+
at the end of day, the only benefit is less data returned from the reading
19+
function. No major performance improvement will be seen.
20+
21+
With that said, please install `pyexcel-odsr <https://github.com/pyexcel/pyexcel-odsr>`_
22+
and it gives better performance in pagination.
23+
{%endblock%}
24+
25+
{%block extras %}
26+
Credits
27+
================================================================================
28+
29+
ODSReader is originally written by `Marco Conti <https://github.com/marcoconti83/read-ods-with-odfpy>`_
30+
{%endblock%}

.moban.d/custom_setup.py.jj2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% extends 'setup.py.jj2' %}
2+
3+
{%block platform_block%}
4+
{%endblock%}
5+
6+
{%block compat_block%}
7+
{%endblock%}

pyexcel_ods/odsr.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@
2121
# See the License for the specific language governing permissions and
2222
# limitations under the License.
2323

24-
import pyexcel_io.service as service
25-
from pyexcel_io._compact import OrderedDict
26-
from pyexcel_io.book import BookReader
27-
from pyexcel_io.sheet import SheetReader
24+
from odf.text import P
25+
from odf.table import Table, TableRow, TableCell
2826

27+
# Thanks to grt for the fixes
28+
from odf.teletype import extractText
2929
from odf.namespaces import OFFICENS
3030
from odf.opendocument import load
31-
from odf.table import Table, TableCell, TableRow
3231

33-
# Thanks to grt for the fixes
34-
from odf.teletype import extractText
35-
from odf.text import P
32+
import pyexcel_io.service as service
33+
from pyexcel_io.book import BookReader
34+
from pyexcel_io.sheet import SheetReader
35+
from pyexcel_io._compact import OrderedDict
3636

3737

3838
class ODSSheet(SheetReader):

pyexcel_ods/odsw.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
"""
1010
import sys
1111

12+
from odf.text import P
13+
from odf.table import Table, TableRow, TableCell
14+
from odf.namespaces import OFFICENS
15+
from odf.opendocument import OpenDocumentSpreadsheet
16+
1217
import pyexcel_io.service as converter
1318
from pyexcel_io.book import BookWriter
1419
from pyexcel_io.sheet import SheetWriter
1520

16-
from odf.namespaces import OFFICENS
17-
from odf.opendocument import OpenDocumentSpreadsheet
18-
from odf.table import Table, TableCell, TableRow
19-
from odf.text import P
20-
2121
PY2 = sys.version_info[0] == 2
2222

2323
PY27_BELOW = PY2 and sys.version_info[1] < 7

tests/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import datetime # noqa
21
import os # noqa
2+
import datetime # noqa
33

44
import pyexcel
5+
56
from nose.tools import eq_, raises # noqa
67

78

tests/test_bug_fixes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# -*- encoding: utf-8 -*-
33
import os
44

5-
import psutil
65
import pyexcel as pe
6+
from pyexcel_ods import get_data, save_data
7+
8+
import psutil
79
from nose import SkipTest
810
from nose.tools import eq_, raises
911
from pyexcel_io.exceptions import IntegerAccuracyLossError
1012

11-
from pyexcel_ods import get_data, save_data
12-
1313
IN_TRAVIS = "TRAVIS" in os.environ
1414

1515

tests/test_multiple_sheets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import sys
33

44
import pyexcel
5-
from nose.tools import raises
6-
75
from base import PyexcelMultipleSheetBase
86

7+
from nose.tools import raises
8+
99
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
1010
from ordereddict import OrderedDict
1111
else:

tests/test_stringio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import os
22

33
import pyexcel
4-
from nose.tools import eq_
5-
64
from base import create_sample_file1
75

6+
from nose.tools import eq_
7+
88

99
class TestStringIO:
1010
def test_ods_stringio(self):

tests/test_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22

3-
from base import PyexcelHatWriterBase, PyexcelWriterBase
3+
from base import PyexcelWriterBase, PyexcelHatWriterBase
44
from pyexcel_ods.odsr import ODSBook as Reader
55
from pyexcel_ods.odsw import ODSWriter as Writer
66

0 commit comments

Comments
 (0)