← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~blr/turnip/+git/turnip:fix-rst-warnings into turnip:master

 

Kit Randel has proposed merging ~blr/turnip/+git/turnip:fix-rst-warnings into turnip:master.

Commit message:
* Correct invalid RST in README.
* Add RST validation to lint target.
* Add docutils 0.12.
* Remove unused import ConnectionDone.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~blr/turnip/+git/turnip/+merge/294747

Pypi is not currently rendering the turnip readme correctly (https://pypi.python.org/pypi/turnip/0.1.1), as it contains invalid RST.

12:07 < lifeless> wgrant: https://pypi.python.org/pypi/turnip/0.1.1 <- note the rendering

Bzr prereq: https://code.launchpad.net/~blr/turnip/dependencies/+merge/294752
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~blr/turnip/+git/turnip:fix-rst-warnings into turnip:master.
diff --git a/Makefile b/Makefile
index b088b7a..80bf28c 100644
--- a/Makefile
+++ b/Makefile
@@ -63,6 +63,7 @@ tags:
 
 lint: $(ENV)
 	@$(FLAKE8) --exclude=__pycache__,version_info.py turnip
+	$(PYTHON) setup.py check --restructuredtext --strict
 
 run-api: $(ENV)
 	$(PSERVE) api.ini --reload
diff --git a/README b/README
index 2a13241..edc0da1 100644
--- a/README
+++ b/README
@@ -1,4 +1,3 @@
-======
 turnip
 ======
 
@@ -52,17 +51,17 @@ between its servers. The only change is that turnip requests can specify
 arbitrary named parameters, not just a hostname.
 
 The relevant part of the Git pack protocol's git-proto-request is
-represented in ABNF as follows:
+represented in ABNF as follows::
 
    git-proto-request = request-command SP pathname NUL [ host-parameter NUL ]
    host-parameter = "host=" hostname [ ":" port ]
 
-turnip-proto-request alters it to this:
+turnip-proto-request alters it to this::
 
-   turnip-proto-request = request-command SP pathname NUL *( param NUL )
+   turnip-proto-request = request-command SP pathname NUL \*( param NUL )
    param = param-name "=" param-value
-   param-name = *( %x01-3C / %x3E-FF ) ; exclude NUL and =
-   param-value = *%x01-FF ; exclude NUL
+   param-name = \*( %x01-3C / %x3E-FF ) ; exclude NUL and =
+   param-value = \*%x01-FF ; exclude NUL
 
 The only additional parameters implemented today are
 'turnip-stateless-rpc' and 'turnip-advertise-refs', which are used by
diff --git a/requirements.txt b/requirements.txt
index 636668b..eafd823 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,6 +2,7 @@ beautifulsoup4==4.3.2
 cffi==0.9.1
 contextlib2==0.4.0
 cornice==0.19.0
+docutils==0.12
 envdir==0.7
 extras==0.0.3
 fixtures==1.0.0
diff --git a/turnip/pack/ssh.py b/turnip/pack/ssh.py
index ebbf86a..006331d 100644
--- a/turnip/pack/ssh.py
+++ b/turnip/pack/ssh.py
@@ -26,10 +26,7 @@ from twisted.internet import (
     protocol,
     reactor,
     )
-from twisted.internet.error import (
-    ConnectionDone,
-    ProcessTerminated,
-    )
+from twisted.internet.error import ProcessTerminated
 from twisted.python import (
     components,
     failure,

References