Skip to content

Commit

Permalink
one-line outputs (2/7)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmou3 committed Jun 5, 2024
1 parent 37fe9ec commit 1ed6ea5
Show file tree
Hide file tree
Showing 85 changed files with 510 additions and 1,366 deletions.
28 changes: 7 additions & 21 deletions src/sage/crypto/block_cipher/sdes.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,7 @@ def left_shift(self, B, n=1):
valid values for ``n`` are 1 and 2, since only up to 2 positions
are defined for this circular left shift operation.
OUTPUT:
The circular left shift of each half of ``B``.
OUTPUT: the circular left shift of each half of ``B``
EXAMPLES:
Expand Down Expand Up @@ -763,9 +761,7 @@ def list_to_string(self, B):
- ``B`` -- a non-empty list of bits
OUTPUT:
The binary string representation of ``B``.
OUTPUT: the binary string representation of ``B``
EXAMPLES:
Expand Down Expand Up @@ -823,9 +819,7 @@ def permutation4(self, B):
- ``B`` -- a block of 4-bit string
OUTPUT:
A permutation of ``B``.
OUTPUT: a permutation of ``B``
EXAMPLES:
Expand Down Expand Up @@ -910,9 +904,7 @@ def permutation8(self, B):
- ``B`` -- a block of 10-bit string
OUTPUT:
Pick out 8 of the 10 bits of ``B`` and permute those 8 bits.
OUTPUT: pick out 8 of the 10 bits of ``B`` and permute those 8 bits
EXAMPLES:
Expand Down Expand Up @@ -1000,9 +992,7 @@ def permutation10(self, B):
- ``B`` -- a block of 10-bit string
OUTPUT:
A permutation of ``B``.
OUTPUT: a permutation of ``B``
EXAMPLES:
Expand Down Expand Up @@ -1174,9 +1164,7 @@ def permute_substitute(self, B, key):
- ``key`` -- an 8-bit subkey
OUTPUT:
The result of applying the function `\Pi_F` to ``B``.
OUTPUT: the result of applying the function `\Pi_F` to ``B``
EXAMPLES:
Expand Down Expand Up @@ -1316,9 +1304,7 @@ def string_to_list(self, S):
- ``S`` -- a string of bits
OUTPUT:
A list representation of the string ``S``.
OUTPUT: a list representation of the string ``S``
EXAMPLES:
Expand Down
8 changes: 2 additions & 6 deletions src/sage/crypto/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ def __init__(self, field=None):
INPUT: A string monoid over a binary alphabet.
OUTPUT:
EXAMPLES::
sage: E = LFSRCryptosystem(FiniteField(2))
Expand Down Expand Up @@ -109,8 +107,6 @@ def __init__(self, field=None):
INPUT: A string monoid over a binary alphabet.
OUTPUT:
EXAMPLES::
sage: E = ShrinkingGeneratorCryptosystem()
Expand All @@ -131,8 +127,8 @@ def __call__(self, key):
INPUT: A list or tuple consisting of two LFSR ciphers (e1,e2).
OUTPUT: The shrinking generator cipher with key stream generator e1
and decimating cipher e2.
OUTPUT: the shrinking generator cipher with key stream generator e1
and decimating cipher e2
"""
if not isinstance(key, (list, tuple)) and len(key) == 2:
raise TypeError("Argument key (= %s) must be a list of tuple of length 2" % key)
Expand Down
4 changes: 1 addition & 3 deletions src/sage/data_structures/bitset.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2353,9 +2353,7 @@ def test_bitset_unpickle(data):
- ``data`` -- A tuple of data as would be produced by the internal, Cython-only, method ``bitset_pickle``.
OUTPUT:
A list form of the bitset corresponding to the pickled data.
OUTPUT: a list form of the bitset corresponding to the pickled data
EXAMPLES:
Expand Down
Loading

2 comments on commit 1ed6ea5

@davidlowryduda
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a couple of comments, but other than that this looks good.

@davidlowryduda
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've incorporated these comments into a review on the PR itself. It's not necessary to read inline here.

Please sign in to comment.