- When both minifying modules are missing, creating a copy of the debug
file is not actually desirable, a missing file is more obvious than a copy.
WebUI can handle a missing 'normal' script and fallback to 'debug' script so
modified script to skip and warn instead.
This will remove the setup dependency in "slimit" package.
In case "slimit" is missing, the non-minified JS files will be copied
as is to the build.
"slimit" is marked as a dependency for development process only.
The move to using auto-formatter makes it easier to read, submit and
speeds up development time. https://github.com/ambv/black/
Although I would prefer 79 chars, the default line length of 88 chars
used by black suffices. The flake8 line length remains at 120 chars
since black does not touch comments or docstrings and this will require
another round of fixes.
The only black setting that is not standard is the use of double-quotes
for strings so disabled any formatting of these. Note however that
flake8 will still flag usage of double-quotes. I may change my mind on
double vs single quotes but for now leave them.
A new pyproject.toml file has been created for black configuration.
* Added `from __future__ import unicode_literals` to every file so
now all strings in code are forced to be unicode strings unless
marked as byte string `b'str'` or encoded to byte string `'str'.encode('utf-8')`.
This is a large change but we have been working towards the goal of unicode
strings passed in the code so decoding external input and encoding
output as byte strings (where applicable).
Note that in Python 2 the `str` type still refers to byte strings.
* Replaced the use of `str` for `basestring` in isinstance comparison as
this was the original intention but breaks code when encoutering unicode strings.
* Marked byte strings in gtkui as the conversion to utf8 is not always handled, mostly
related to gobject signal names.
- The slimit package is now widely available so make the script
only rely on it and closure. Keeping closure as it makes the most
compact and lints the javascript but it is not as easy to install
as slimit.
* Further whitespace fixes by autopep8
* Using pep8 v1.6.2 (not currently used by pyflakes)
* Update config for pep8 and flake8 in tox.ini
* A separate pep8 entry for running autopep8. The ignores prevent
blank lines being added after docstrings.
* .tox and E133 are ignored in flake8 by default.
The order of the js files matters when minifying.
* Use the '.order' files to put specified files top of the file list.
* Sub-directory files inserted in list before root directory files.
* Sort everything else alphabetically for consistant ordering.