Commit Graph

6 Commits

Author SHA1 Message Date
Van Hung Pham 8c017470ad Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators.
We can use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys will more readable.

2.In py2, the performance about list should be negligible, as link [2].

[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Id1cab2190424f1ac8b48cae43e4006f1d720be0c
2017-07-12 13:43:55 +07:00
Navid Pustchi ed931a00d8 Fix D204 PEP257 violation and enable D301 and D209
Currently tox ignores D204, D209 and D301:
D204: 1 blank line required after class docstring.
D209: Multi-line docstring closing quotes should be on a separate line.
D301: Use r""" if any backslashes in a docstring.

This change makes keystonemiddleware docstrings compliant with D204.
D209 and D301 is already passing, so this commit also enables them.

Change-Id: I11e02ef5af7fc793f1a2438e091bbfb18618a7f5
2016-05-06 16:36:15 +00:00
Navid Pustchi d7bf1a759d Fix D400 PEP257 violation
Currently tox ignores D400:
D400: First line should end with a period.

This change makes keystonemiddleware docstrings compliant with D400.

Change-Id: Icff2b744d72ae74492cfc6515b91f393fa2b50bf
2016-05-06 14:47:41 +00:00
Brant Knudson 45136e0580 Remove bandit.yaml in favor of defaults
This patch removes the bandit.yaml and just uses the defaults. As
such there are a few flagged issues that needed correcting.

The hits are now marked with "# nosec" so that they'll be ignored
since the hits were not security-related.

Co-Authored-By: Brant Knudson <bknudson@us.ibm.com>
Co-Authored-By: Eric Brown <browne@vmware.com>

Change-Id: Ib253a4a21156b6606c356ade46c72c6ace01a1af
2016-03-09 09:45:47 -08:00
Dolph Mathews 714807208b Refactor: extract echo_app from enclosing class
This allows the echo WSGI app itself to be consumed directly by external
users (such as in a real deployment with Apache httpd), rather than
being run by wsgiref.

This also corrects the position of the docstring, which described
echo_app (a WSGI app), not EchoService (which served the app).

Change-Id: Ic3c69ad8bb08e4d45f5e2b8114b09ae10770161a
2015-05-06 14:29:02 +01:00
Lance Bragstad 809967f189 Pull echo service out of auth_token.
Move Keystonemiddleware's Echo service out of keystonemiddleware.auth_token and
into its own module.

Change-Id: I9e557582e8361d6c2aa6e73a357b0d6c9c88ea4e
Closes-Bug: 1433251
2015-04-08 02:42:23 +00:00