From b9a7e03074cbaacc3f270b2b8228a5b85350a2de Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 21 Feb 2020 09:56:37 +0000 Subject: Random cleanups Remove some cruft from Sphinx config files, drop the use of 'u' prefixed strings, which are unnecessary in Python 3, and generally tidy stuff up. Change-Id: Ib0f33576e160ec842d7fc82b4fcfee99829623d7 Signed-off-by: Stephen Finucane --- HACKING.rst | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) (limited to 'HACKING.rst') diff --git a/HACKING.rst b/HACKING.rst index 5a5d01d7..b5653449 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -5,30 +5,12 @@ Nova Client Style Commandments https://docs.openstack.org/hacking/latest - Step 2: Read on - Nova Client Specific Commandments --------------------------------- None so far Text encoding ------------- -- All text within python code should be of type 'unicode'. - - WRONG: - - >>> s = 'foo' - >>> s - 'foo' - >>> type(s) - - - RIGHT: - - >>> u = u'foo' - >>> u - u'foo' - >>> type(u) - - Transitions between internal unicode and external strings should always be immediately and explicitly encoded or decoded. @@ -36,13 +18,13 @@ Text encoding - All external text that is not explicitly encoded (database storage, commandline arguments, etc.) should be presumed to be encoded as utf-8. - WRONG: + Wrong:: mystring = infile.readline() myreturnstring = do_some_magic_with(mystring) outfile.write(myreturnstring) - RIGHT: + Right:: mystring = infile.readline() mytext = s.decode('utf-8') @@ -52,8 +34,8 @@ Text encoding Running Tests ------------- -The testing system is based on a combination of tox and testr. If you just -want to run the whole suite, run `tox` and all will be fine. However, if + +The testing system is based on a combination of tox and stestr. If you just +want to run the whole suite, run ``tox`` and all will be fine. However, if you'd like to dig in a bit more, you might want to learn some things about -testr itself. A basic walkthrough for OpenStack can be found at -http://wiki.openstack.org/testr +stestr itself. -- cgit v1.2.1