add flake8-checks to travis
This commit is contained in:
parent
81028f9a35
commit
337e8ee19e
|
@ -25,6 +25,8 @@ matrix:
|
||||||
env: TOXENV=pypy3
|
env: TOXENV=pypy3
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
env: TOXENV=docs
|
env: TOXENV=docs
|
||||||
|
- python: 3.4
|
||||||
|
env: TOXENV=flake8
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- python: 3.5-dev
|
- python: 3.5-dev
|
||||||
- python: nightly
|
- python: nightly
|
||||||
|
|
|
@ -9,3 +9,4 @@ universal=1
|
||||||
[flake8]
|
[flake8]
|
||||||
exclude = .git,.tox,.github,.eggs,__pycache__,doc/conf.py,build,dist,capabilities-data,test,src/escpos/constants.py
|
exclude = .git,.tox,.github,.eggs,__pycache__,doc/conf.py,build,dist,capabilities-data,test,src/escpos/constants.py
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
|
# future-imports = absolute_import, division, print_function, unicode_literals # we are not there yet
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -50,6 +50,9 @@ setuptools_scm_template = """\
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
# file generated by setuptools_scm
|
# file generated by setuptools_scm
|
||||||
# don't change, don't track in version control
|
# don't change, don't track in version control
|
||||||
|
from __future__ import absolute_import
|
||||||
|
from __future__ import division
|
||||||
|
from __future__ import print_function
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
version = '{version}'
|
version = '{version}'
|
||||||
|
|
|
@ -33,9 +33,11 @@ def str_to_bool(string):
|
||||||
"""
|
"""
|
||||||
return string.lower() in ('y', 'yes', '1', 'true')
|
return string.lower() in ('y', 'yes', '1', 'true')
|
||||||
|
|
||||||
|
|
||||||
# A list of functions that work better with a newline to be sent after them.
|
# A list of functions that work better with a newline to be sent after them.
|
||||||
REQUIRES_NEWLINE = ('qr', 'barcode', 'text', 'block_text')
|
REQUIRES_NEWLINE = ('qr', 'barcode', 'text', 'block_text')
|
||||||
|
|
||||||
|
|
||||||
# Used in demo method
|
# Used in demo method
|
||||||
# Key: The name of escpos function and the argument passed on the CLI. Some
|
# Key: The name of escpos function and the argument passed on the CLI. Some
|
||||||
# manual translation is done in the case of barcodes_a -> barcode.
|
# manual translation is done in the case of barcodes_a -> barcode.
|
||||||
|
@ -568,5 +570,6 @@ def demo(printer, **kwargs):
|
||||||
command(**params)
|
command(**params)
|
||||||
printer.cut()
|
printer.cut()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -20,4 +20,5 @@ class CodePageManager:
|
||||||
def get_encoding(self, encoding):
|
def get_encoding(self, encoding):
|
||||||
return self.data[encoding]
|
return self.data[encoding]
|
||||||
|
|
||||||
|
|
||||||
CodePages = CodePageManager(CAPABILITIES['encodings'])
|
CodePages = CodePageManager(CAPABILITIES['encodings'])
|
||||||
|
|
Loading…
Reference in New Issue