Skip to content

Commit f1d2efd

Browse files
committed
Some URL shorting apply->def, isort
1 parent 056c131 commit f1d2efd

File tree

2 files changed

+26
-11
lines changed

2 files changed

+26
-11
lines changed

mathics/builtin/compress.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010

1111
class Compress(Builtin):
1212
"""
13-
<url>:WMA link:https://reference.wolfram.com/language/ref/Compress.html</url>
13+
<url>
14+
:WMA link:
15+
https://reference.wolfram.com/language/ref/Compress.html</url>
1416
1517
<dl>
16-
<dt>'Compress[$expr$]'
18+
<dt>'Compress[$expr$]'
1719
<dd>gives a compressed string representation of $expr$.
1820
</dl>
1921
@@ -27,7 +29,7 @@ class Compress(Builtin):
2729
}
2830
summary_text = "compress an expression"
2931

30-
def apply(self, expr, evaluation, options):
32+
def eval(self, expr, evaluation, options):
3133
"Compress[expr_, OptionsPattern[Compress]]"
3234
if isinstance(expr, String):
3335
string = '"' + expr.value + '"'
@@ -47,7 +49,9 @@ def apply(self, expr, evaluation, options):
4749

4850
class Uncompress(Builtin):
4951
"""
50-
<url>:WMA link:https://reference.wolfram.com/language/ref/Uncompress.html</url>
52+
<url>
53+
:WMA link:
54+
https://reference.wolfram.com/language/ref/Uncompress.html</url>
5155
5256
<dl>
5357
<dt>'Uncompress["$string$"]'
@@ -67,7 +71,7 @@ class Uncompress(Builtin):
6771

6872
summary_text = "recover a compressed expression"
6973

70-
def apply(self, string, evaluation):
74+
def eval(self, string, evaluation):
7175
"Uncompress[string_String]"
7276
string = string.get_string_value() # .encode("utf-8")
7377
string = base64.b64decode(string)

mathics/builtin/graphics.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,14 @@ class _Thickness(_Size):
400400

401401
class AbsoluteThickness(_Thickness):
402402
"""
403-
<url>:WMA link:https://reference.wolfram.com/language/ref/AbsoluteThickness.html</url>
403+
<url>
404+
:WMA link:
405+
https://reference.wolfram.com/language/ref/AbsoluteThickness.html</url>
404406
405407
<dl>
406408
<dt>'AbsoluteThickness[$p$]'
407-
<dd>sets the line thickness for subsequent graphics primitives to $p$ points.
409+
<dd>sets the line thickness for subsequent graphics primitives to $p$ \
410+
points.
408411
</dl>
409412
410413
>> Graphics[Table[{AbsoluteThickness[t], Line[{{20 t, 10}, {20 t, 80}}], Text[ToString[t]<>"pt", {20 t, 0}]}, {t, 0, 10}]]
@@ -535,7 +538,9 @@ def path(max_degree, p):
535538
class FilledCurve(Builtin):
536539
"""
537540
538-
<url>:WMA link:https://reference.wolfram.com/language/ref/FilledCurve.html</url>
541+
<url>
542+
:WMA link:
543+
https://reference.wolfram.com/language/ref/FilledCurve.html</url>
539544
540545
<dl>
541546
<dt>'FilledCurve[{$segment1$, $segment2$ ...}]'
@@ -584,7 +589,9 @@ class Polygon(Builtin):
584589
class RegularPolygon(Builtin):
585590
"""
586591
587-
<url>:WMA link:https://reference.wolfram.com/language/ref/RegularPolygon.html</url>
592+
<url>
593+
:WMA link:
594+
https://reference.wolfram.com/language/ref/RegularPolygon.html</url>
588595
589596
<dl>
590597
<dt>'RegularPolygon[$n$]'
@@ -609,7 +616,9 @@ class RegularPolygon(Builtin):
609616

610617
class Arrow(Builtin):
611618
"""
612-
<url>:WMA link:https://reference.wolfram.com/language/ref/Arrow.html</url>
619+
<url>
620+
:WMA link:
621+
https://reference.wolfram.com/language/ref/Arrow.html</url>
613622
614623
<dl>
615624
<dt>'Arrow[{$p1$, $p2$}]'
@@ -648,7 +657,9 @@ class Arrow(Builtin):
648657
class Arrowheads(_GraphicsDirective):
649658
"""
650659
651-
<url>:WMA link:https://reference.wolfram.com/language/ref/Arrowheads.html</url>
660+
<url>
661+
:WMA link:
662+
https://reference.wolfram.com/language/ref/Arrowheads.html</url>
652663
653664
<dl>
654665
<dt>'Arrowheads[$s$]'

0 commit comments

Comments
 (0)