Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2144)

Unified Diff: doxypypy/doxypypy/test/sample_pep.py

Issue 1574883002: add doxypypy and py_filter so this will turn google style (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: doxypypy/doxypypy/test/sample_pep.py
diff --git a/doxypypy/doxypypy/test/sample_pep.py b/doxypypy/doxypypy/test/sample_pep.py
new file mode 100644
index 0000000000000000000000000000000000000000..50b6aba5e34a59c18a99a34da21d467d8bb63e66
--- /dev/null
+++ b/doxypypy/doxypypy/test/sample_pep.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+# As close as possible to a direct copy of the sample in PEP 257 and still
+# be valid code. Simple as can be.
+
+complex_zero = 0j
+
+
+def complex(real=0.0, imag=0.0):
+ """Form a complex number.
+
+ Keyword arguments:
+ real -- the real part (default 0.0)
+ imag -- the imaginary part (default 0.0)
+
+ """
+ if imag == 0.0 and real == 0.0:
+ return complex_zero
+ else:
+ return complex(real, imag)

Powered by Google App Engine
This is Rietveld 408576698