Commit Graph

7 Commits

Author SHA1 Message Date
Akihiro Motoki 11eb4e9d3e Fix W503 warnings
W503 line break before binary operator

Looking at the code base, it sounds okay to follow this check.

Change-Id: Id511e0104dc6de5b204021661d4a8776ca6d3658
2018-04-11 18:13:47 +09:00
Akihiro Motoki 95629a337e Fix H405 (multi line docstring) warnings (horizon)
H405: multi line docstring summary not separated with an empty line

Partial-Bug: #1696996
Change-Id: I58f71206def1a25f3eda04b9297f1aa7d3caa646
2017-06-09 16:04:57 +00:00
Gábor Antal 34a3aa0ba8 Handle log message interpolation by the logger
According to OpenStack Guideline[1], logged string message should be
interpolated by the logger.

[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages
Change-Id: I51f50935f1eeffe4960562d6309dfdf05814e595
Closes-Bug: #1596829
2017-03-31 20:59:16 +09:00
Radomir Dopieralski 255de3d361 Use os.path.relpath in place of string.replace
There is a standard library function for that!

Change-Id: If1de6e38c35c9c5f0fa28b756724e91daf12a776
2016-11-30 11:40:03 +01:00
David Lyle efafd2ba96 Fixing docstring formatting errors and warnings
Correcting numerous errors and warnings for doc generation.

Partial-Bug: #1486222
Change-Id: I6d6b20a433aa9965a1bafbd098e64b19886e5fca
2015-08-18 17:14:22 -06:00
Shaoquan Chen b6399c6904 Proving JS source files in consistent order
In some deployment environment, the JS source files need to be listed
in consistent order so that they will have the same cache key value for
the compressed JS file.

Change-Id: Ib187a85b7a1fca03c0eb78b411cf121017d40890
Closes-Bug: #1476383
2015-07-23 00:53:07 -06:00
Shaoquan Chen 018b39b84a Utils for auto-file-discovery
This patch creates horizon.utils.file-discovery module which provides
functionalities for automatic file-discovery.  With these infrastructural
helpers, we can build JavaScript and HTML file auto-discovery for horizon
align with th existing plug-in mechanism.

1) discover_files(base_path, sub_path='', ext='', trim_base_path=False):
   Discover all files with certain extension in given paths

2) sort_js_files(js_files):
   Sorts JavaScript files in `js_files` into source files, mock files
   and spec files based on file extension.

   Output:
   * sources: source files for production.  The order of source files
     is significant and should be listed in the below order:
     - First all the files that defines application's angular module.
       Those files have extension of `.module.js`.  The order among them
       is not significant.
     - Followed by all other source code files.  The order among them
       is not significant.

   * mocks: mock files provide mock data/services for tests.  They have
     extension of `.mock.js`. The order among them is not significant.

   * specs: spec files for testing.  They have extension of `.spec.js`.
     The order among them is not significant.

3) discover_static_files(base_path, sub_path=''):
   Discover static files in given paths, returns JavaScript sources,
   mocks, specs and HTML templates files grouped in lists.

Partially-Implements: blueprint auto-js-file-finding
Change-Id: Idd0b69451f81b2f740b10515e3e274d48b681dbe
2015-06-15 23:59:00 -07:00