Skip to content

Commit

Permalink
Fix trailing whitespace
Browse files Browse the repository at this point in the history
Fix invalid escape sequence
  • Loading branch information
gilch committed Oct 3, 2024
1 parent 64ff1da commit b92235d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/hissp/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
ENV: ContextVar[Env | None] = ContextVar("ENV", default=None)
"""
Expansion environment.
Sometimes a macro needs the current environment when expanding,
instead of its defining environment.
Rather than pass in an implicit argument to all macros,
Expand Down Expand Up @@ -728,7 +728,7 @@ def macroexpand_all(
preprocess=lambda x: x,
postprocess=lambda x: x,
):
"""Recursively macroexpand everything possible from the outside-in.
R"""Recursively macroexpand everything possible from the outside-in.
Pipes outer form through preprocess, :func:`macroexpand`, and
postprocess, then recurs into `subform`\ s of the resulting
Expand Down
14 changes: 7 additions & 7 deletions src/hissp/reader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2019, 2020, 2021, 2022, 2023, 2024 Matthew Egan Odendahl
# SPDX-License-Identifier: Apache-2.0
"""
R"""
The Lissp language reader and associated helper functions.
The reader is organized as a lexer and parser.
Expand Down Expand Up @@ -41,13 +41,13 @@
number down to around one in ten thousand.)
For unusual applications (if more than dozens of gensyms are expected in
a shared scope, or one in a billion is still too high), hash length can
a shared scope, or one in a billion is still too high), hash length can
be increased, up to a maximum of 32 bytes.
Even 8 bytes is enough space for a hundred thousand gensyms in the
same scope with similar collision probability, or dozens with a
one-in-quadrillion chance, which is probably lower than the risk of a
hardware failure. It's unlikely you'll ever need more than 16 bytes,
Even 8 bytes is enough space for a hundred thousand gensyms in the
same scope with similar collision probability, or dozens with a
one-in-quadrillion chance, which is probably lower than the risk of a
hardware failure. It's unlikely you'll ever need more than 16 bytes,
which has more space than `uuid.uuid4`.
Each hash character encodes 5 bits (`Base32 <base64.b32encode>`),
Expand Down
6 changes: 3 additions & 3 deletions tests/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ def test_post_compile_warn(self):
__import__('operator').truediv(
(0),
(0))
# Traceback (most recent call last):"""
// dedented,
python,
)
self.assertIn(
"""\
# ZeroDivisionError: division by zero
#
#\N{space}
print(
'oops')"""
// dedented,
Expand Down

0 comments on commit b92235d

Please sign in to comment.