diff --git a/mathics/builtin/atomic/numbers.py b/mathics/builtin/atomic/numbers.py
index 38a83a1a6..c10f06f7e 100644
--- a/mathics/builtin/atomic/numbers.py
+++ b/mathics/builtin/atomic/numbers.py
@@ -446,7 +446,7 @@ def eval_with_base(self, n, b, evaluation, nr_elements=None, pos=None):
if isinstance(n, (Expression, Symbol, Rational)):
pos_len = abs(pos) + 1 if pos is not None and pos < 0 else 1
if nr_elements is not None:
- # we can't use eval_n here because we have the two-arguemnt form
+ # we can't use eval_n here because we have the two-argument form
n = Expression(
SymbolN,
n,
diff --git a/mathics/builtin/atomic/strings.py b/mathics/builtin/atomic/strings.py
index e2927d7f9..6762c06b0 100644
--- a/mathics/builtin/atomic/strings.py
+++ b/mathics/builtin/atomic/strings.py
@@ -365,7 +365,7 @@ class HexadecimalCharacter(Builtin):
# This isn't your normal Box class. We'll keep this here rather than
# in mathics.builtin.box for now.
-# mmatera commenct: This does not even exist in WMA. \! should be associated
+# mmatera comment: This does not even exist in WMA. \! should be associated
# to `ToExpression`, but it was not properly implemented by now...
class InterpretedBox(PrefixOperator):
r"""
diff --git a/mathics/builtin/box/graphics.py b/mathics/builtin/box/graphics.py
index a91b55ee3..8362f6646 100644
--- a/mathics/builtin/box/graphics.py
+++ b/mathics/builtin/box/graphics.py
@@ -603,7 +603,6 @@ def get_range(min, max):
if width > base_width:
width = base_width
height = width * aspect
- height = height
width *= size_multiplier
height *= size_multiplier
diff --git a/mathics/builtin/box/graphics3d.py b/mathics/builtin/box/graphics3d.py
index 169e6bd99..9008c0343 100644
--- a/mathics/builtin/box/graphics3d.py
+++ b/mathics/builtin/box/graphics3d.py
@@ -226,8 +226,7 @@ def _prepare_elements(self, elements, options, max_width=None):
boxratios = self.graphics_options["System`BoxRatios"].to_python()
if boxratios == "System`Automatic":
boxratios = ["System`Automatic"] * 3
- else:
- boxratios = boxratios
+
if not isinstance(boxratios, list) or len(boxratios) != 3:
raise BoxExpressionError
diff --git a/mathics/builtin/datentime.py b/mathics/builtin/datentime.py
index 35f9121b7..11a8f7fdc 100644
--- a/mathics/builtin/datentime.py
+++ b/mathics/builtin/datentime.py
@@ -590,7 +590,7 @@ class DateObject(_DateFormat, ImmutableValueMixin):
- 'DateObject[...]'
-
- Returns an object codifiyng DateList....
+
- Returns an object codifying DateList....
>> DateObject[{2020, 4, 15}]
diff --git a/mathics/builtin/drawing/plot.py b/mathics/builtin/drawing/plot.py
index 3f4bbe115..b2d7fee3f 100644
--- a/mathics/builtin/drawing/plot.py
+++ b/mathics/builtin/drawing/plot.py
@@ -674,7 +674,7 @@ class DiscretePlot(_Plot):
"DiscretePlot[expr_, {var_Symbol, nmin_Integer, nmax_Integer}, options___]": "DiscretePlot[expr, {var, nmin, nmax, 1, options}]",
}
- summary_text = "discrete plot of a one-paremeter function"
+ summary_text = "discrete plot of a one-parameter function"
def eval(
self, functions, x, start, nmax, step, evaluation: Evaluation, options: dict
@@ -1058,7 +1058,7 @@ class ListPlot(_ListPlot):
>> ListPlot[Prime[Range[30]]]
= -Graphics-
- seems very roughly to fit a table of quadradic numbers:
+ seems very roughly to fit a table of quadratic numbers:
>> ListPlot[Table[n ^ 2 / 8, {n, 30}]]
= -Graphics-
diff --git a/mathics/builtin/files_io/files.py b/mathics/builtin/files_io/files.py
index b2b1aae6c..86fdc04e8 100644
--- a/mathics/builtin/files_io/files.py
+++ b/mathics/builtin/files_io/files.py
@@ -978,7 +978,7 @@ class ReadList(Read):
See
:RecordSeparators:
https://reference.wolfram.com/language/ref/RecordSeprators.html \
- works analgously for records as 'WordSeparators' does for words.
+ works analogously for records as 'WordSeparators' does for words.
To allow both periods and newlines as record separators:
diff --git a/mathics/builtin/intfns/divlike.py b/mathics/builtin/intfns/divlike.py
index 5166d6e22..feb6ca1cf 100644
--- a/mathics/builtin/intfns/divlike.py
+++ b/mathics/builtin/intfns/divlike.py
@@ -239,7 +239,7 @@ def eval_k_n(self, k: Integer, n: Integer, evaluation: Evaluation):
class PowerMod(Builtin):
"""
- Modular exponentiaion.
+ Modular exponentiation.
See https://en.wikipedia.org/wiki/Modular_exponentiation.
diff --git a/mathics/builtin/numbers/hyperbolic.py b/mathics/builtin/numbers/hyperbolic.py
index c66742439..2933d6952 100644
--- a/mathics/builtin/numbers/hyperbolic.py
+++ b/mathics/builtin/numbers/hyperbolic.py
@@ -377,7 +377,7 @@ class Gudermannian(Builtin):
"""
# See https://mathworld.wolfram.com/Gudermannian.html for a number
- # of relatiions to trigonometric and hyperbolic functions that could be
+ # of relations to trigonometric and hyperbolic functions that could be
# used if needed.
rules = {
"Gudermannian[Undefined]": "Undefined",
diff --git a/mathics/builtin/numbers/numbertheory.py b/mathics/builtin/numbers/numbertheory.py
index bbf8c56f3..903a2e0c7 100644
--- a/mathics/builtin/numbers/numbertheory.py
+++ b/mathics/builtin/numbers/numbertheory.py
@@ -50,7 +50,7 @@ class ContinuedFraction(SympyFunction):
- generate the first $n$ terms in the continued fraction representation of $x$.
- 'ContinuedFraction'[$x$]
-
- the complete continued fraction representation for a rational or quadradic irrational number.
+
- the complete continued fraction representation for a rational or quadratic irrational number.
>> ContinuedFraction[Pi, 10]
diff --git a/mathics/builtin/optimization.py b/mathics/builtin/optimization.py
index 7216a5dd3..bda30f5c4 100644
--- a/mathics/builtin/optimization.py
+++ b/mathics/builtin/optimization.py
@@ -120,9 +120,6 @@ def eval_onevariable(self, f, x, evaluation: Evaluation):
for candidate in candidates:
value = second_derivative.subs(candidate)
if value.is_real and value > 0:
- if candidate is not list:
- candidate = candidate
-
minimum_list.append([candidate[sympy_x], sympy_f.subs(candidate)])
return ListExpression(
diff --git a/mathics/builtin/specialfns/gamma.py b/mathics/builtin/specialfns/gamma.py
index fdc031ddd..7affd99ce 100644
--- a/mathics/builtin/specialfns/gamma.py
+++ b/mathics/builtin/specialfns/gamma.py
@@ -578,7 +578,7 @@ class Subfactorial(SympyFunction):
>> Subfactorial[6.0]
= 265
- Here is how the exponential, 'Factorial', and 'Subfactoral' grow in comparison:
+ Here is how the exponential, 'Factorial', and 'Subfactorial' grow in comparison:
>> LogPlot[{10^x, Factorial[x], Subfactorial[x]}, {x, 0, 25}, PlotPoints->26]
= -Graphics-
@@ -589,7 +589,7 @@ class Subfactorial(SympyFunction):
rules = {
"Subfactorial[elements_List]": "Subfactorial @@ elements",
}
- summary_text = "compute the subfactorial (derangment) of a number"
+ summary_text = "compute the subfactorial (derangement) of a number"
sympy_name = "subfactorial"
def eval(self, element, evaluation):
diff --git a/mathics/builtin/specialfns/orthogonal.py b/mathics/builtin/specialfns/orthogonal.py
index 6a22d8191..4925a2f09 100644
--- a/mathics/builtin/specialfns/orthogonal.py
+++ b/mathics/builtin/specialfns/orthogonal.py
@@ -262,7 +262,7 @@ def prepare_sympy(self, elements):
class SphericalHarmonicY(MPMathFunction):
r"""
- :Spherical Harmonic https://mathworld.wolfram.com/SphericalHarmonic.html (:mpmath: https://mpmath.org/doc/current/functions/orthogonal.html#mpmath.sperharm, :WMA: https://reference.wolfram.com/language/ref/SphericalHarmonicY.html)
+ :Spherical Harmonic https://mathworld.wolfram.com/SphericalHarmonic.html (:mpmath: https://mpmath.org/doc/current/functions/orthogonal.html#mpmath.spherharm, :WMA: https://reference.wolfram.com/language/ref/SphericalHarmonicY.html)
- 'SphericalHarmonicY'[$l$, $m$, $\theta$, $\phi$]
- returns the spherical harmonic function $Y_l^m(\theta, \phi)$.
diff --git a/mathics/builtin/string/operations.py b/mathics/builtin/string/operations.py
index ee867f5ab..d4512e03b 100644
--- a/mathics/builtin/string/operations.py
+++ b/mathics/builtin/string/operations.py
@@ -740,7 +740,7 @@ class StringSplit(Builtin):
>> StringSplit["x", "x"]
= {}
- Split using a delmiter that has nonzero list of 12's
+ Split using a delimiter that has nonzero list of 12's
>> StringSplit["12312123", "12"..]
= {3, 3}
diff --git a/mathics/core/expression.py b/mathics/core/expression.py
index a23805a95..f3db0911b 100644
--- a/mathics/core/expression.py
+++ b/mathics/core/expression.py
@@ -1027,7 +1027,7 @@ def is_literal(self) -> bool:
`is_uncertain_final_definitions()` we don't need a
`definitions` parameter.
"""
- # Right now we are pessimisitic. We might consider changing this for
+ # Right now we are pessimistic. We might consider changing this for
# Lists. Lists definitions can't be changed right?
return False
# If we have a List we may do something like:
diff --git a/mathics/doc/structure.py b/mathics/doc/structure.py
index 94e279a70..f4ed8b5e7 100644
--- a/mathics/doc/structure.py
+++ b/mathics/doc/structure.py
@@ -723,7 +723,7 @@ def __init__(self):
def gather_doctest_data(self):
"""
- Populates the documentatation.
+ Populates the documentation.
(deprecated)
"""
logging.warning(
diff --git a/mathics/eval/arithfns/basic.py b/mathics/eval/arithfns/basic.py
index 3d8acb86b..ab78c09a2 100644
--- a/mathics/eval/arithfns/basic.py
+++ b/mathics/eval/arithfns/basic.py
@@ -157,8 +157,7 @@ def eval_Times(*items: BaseElement) -> Optional[BaseElement]:
exp,
)
continue
- else:
- item = item
+
# Otherwise, just append the element...
elements.append(item)
diff --git a/mathics/format/asy_fns.py b/mathics/format/asy_fns.py
index fbb7f74d6..38d8be189 100644
--- a/mathics/format/asy_fns.py
+++ b/mathics/format/asy_fns.py
@@ -51,7 +51,7 @@ def cubic(p0, p1, p2, p3):
list(chain(p1, p2, p3))
)
- def quadratric(qp0, qp1, qp2):
+ def quadratic(qp0, qp1, qp2):
# asymptote only supports cubic beziers, so we convert this quadratic
# bezier to a cubic bezier, see http://fontforge.github.io/bezier.html
@@ -75,7 +75,7 @@ def quadratric(qp0, qp1, qp2):
def linear(p0, p1):
return "--(%.5g,%.5g)" % p1
- forms = (linear, quadratric, cubic)
+ forms = (linear, quadratic, cubic)
def path(max_degree, p):
max_degree = min(max_degree, len(forms))