Skip to content

Commit c9c7348

Browse files
committed
minor doc cleanups
1 parent 03dbb8b commit c9c7348

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

docs/jam_vrf.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ <h1 class="modulename">
8989
</div>
9090
<a class="headerlink" href="#RingVerifier"></a>
9191

92-
<div class="docstring"><p>Used for verifying signatures against a particular ring</p>
92+
<div class="docstring"><p>Used for verifying ring signatures</p>
9393

9494
<p><strong>Constructor Args:</strong></p>
9595

@@ -108,7 +108,7 @@ <h1 class="modulename">
108108

109109
<pre><code>try:
110110
verifier = RingVerifier(commitment, ring_size)
111-
except Exception as e:
111+
except Exception:
112112
...
113113
</code></pre>
114114
</div>
@@ -147,7 +147,7 @@ <h1 class="modulename">
147147

148148
try:
149149
verifier.verify(data, ad, signature)
150-
except ValueError as e:
150+
except ValueError :
151151
print("invalid signature!")
152152
</code></pre>
153153
</div>
@@ -165,7 +165,7 @@ <h1 class="modulename">
165165
</div>
166166
<a class="headerlink" href="#VRFOutput"></a>
167167

168-
<div class="docstring"><p>VRF output type common to both ietf and ring VRFs</p>
168+
<div class="docstring"><p>VRF output type common to both IETF and ring VRFs</p>
169169

170170
<p><strong>Args:</strong></p>
171171

@@ -193,9 +193,9 @@ <h1 class="modulename">
193193
</div>
194194
<a class="headerlink" href="#VRFOutput.hash"></a>
195195

196-
<div class="docstring"><p>Hash the VRF output point</p>
196+
<div class="docstring"><p>Hash the output point</p>
197197

198-
<p><strong>Example:</strong> <code>id = VRFOutput(...).hash()</code></p>
198+
<p><strong>Example:</strong> <code>h = VRFOutput(...).hash()</code></p>
199199
</div>
200200

201201

@@ -236,7 +236,7 @@ <h1 class="modulename">
236236

237237
<pre><code>try:
238238
commitment = get_ring_commitment(public_keys)
239-
except Exception as e:
239+
except Exception:
240240
...
241241
</code></pre>
242242
</div>
@@ -258,7 +258,7 @@ <h1 class="modulename">
258258
<p><strong>Args:</strong></p>
259259

260260
<ul>
261-
<li>public_keys: <code>bytes</code> - bandersnatch public key</li>
261+
<li>public_key: <code>bytes</code> - bandersnatch public key</li>
262262
<li>data: <code>bytes</code></li>
263263
<li>ad: <code>bytes</code> - additional data</li>
264264
<li>signature: <code>bytes</code></li>
@@ -275,7 +275,7 @@ <h1 class="modulename">
275275

276276
<pre><code>try:
277277
ietf_verify(public_key, data, ad, signature)
278-
except ValueError as e:
278+
except ValueError :
279279
print("invalid signature!")
280280
</code></pre>
281281
</div>

docs/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ietf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use pyo3::prelude::*;
99
/// Verify an IETF signature against some data & additional data
1010
///
1111
/// **Args:**
12-
/// - public_keys: `bytes` - bandersnatch public key
12+
/// - public_key: `bytes` - bandersnatch public key
1313
/// - data: `bytes`
1414
/// - ad: `bytes` - additional data
1515
/// - signature: `bytes`
@@ -22,7 +22,7 @@ use pyo3::prelude::*;
2222
/**```
2323
try:
2424
ietf_verify(public_key, data, ad, signature)
25-
except ValueError as e:
25+
except ValueError :
2626
print("invalid signature!")
2727
```*/
2828
#[pyfunction]

src/ring.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn get_pcs_params() -> PcsParams {
4646
/**```
4747
try:
4848
commitment = get_ring_commitment(public_keys)
49-
except Exception as e:
49+
except Exception:
5050
...
5151
```*/
5252
#[pyfunction]
@@ -83,7 +83,7 @@ pub fn get_ring_commitment(py: Python<'_>, public_keys: Vec<Vec<u8>>) -> PyResul
8383
Ok(PyBytes::new(py, &bytes).into())
8484
}
8585

86-
/// Used for verifying signatures against a particular ring
86+
/// Used for verifying ring signatures
8787
///
8888
/// **Constructor Args:**
8989
/// - commitment: `bytes` - ring commitment (in JAM this is called a **ring root**)
@@ -96,7 +96,7 @@ pub fn get_ring_commitment(py: Python<'_>, public_keys: Vec<Vec<u8>>) -> PyResul
9696
/**```
9797
try:
9898
verifier = RingVerifier(commitment, ring_size)
99-
except Exception as e:
99+
except Exception:
100100
...
101101
```*/
102102
#[pyclass]
@@ -141,7 +141,7 @@ impl RingVerifier {
141141
142142
try:
143143
verifier.verify(data, ad, signature)
144-
except ValueError as e:
144+
except ValueError :
145145
print("invalid signature!")
146146
*/
147147
fn verify(&self, data: &[u8], ad: &[u8], signature: &[u8]) -> PyResult<()> {

src/vrf_output.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use bandersnatch::{AffinePoint, Output};
55
use pyo3::prelude::*;
66
use pyo3::types::PyBytes;
77

8-
/// VRF output type common to both ietf and ring VRFs
8+
/// VRF output type common to both IETF and ring VRFs
99
///
1010
/// **Args:**
1111
/// - output: `bytes`
@@ -26,9 +26,9 @@ impl VRFOutput {
2626
Ok(Self(Output::from(affine)))
2727
}
2828

29-
/// Hash the VRF output point
29+
/// Hash the output point
3030
///
31-
/// **Example:** `id = VRFOutput(...).hash()`
31+
/// **Example:** `h = VRFOutput(...).hash()`
3232
fn hash<'py>(&self, py: Python<'py>) -> Py<PyBytes> {
3333
PyBytes::new(py, &self.0.hash()).into()
3434
}

0 commit comments

Comments
 (0)