Skip to content

Commit effd9e7

Browse files
committed
Small lint of expression.py
1 parent 18396f2 commit effd9e7

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

mathics/core/expression.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
# cython: language_level=3
33
# -*- coding: utf-8 -*-
44

5-
import ast
65
import sympy
76
import mpmath
87
import math
9-
import inspect
108
import re
119

1210
import typing
@@ -141,7 +139,7 @@ def from_python(arg):
141139

142140
class KeyComparable(object):
143141
def get_sort_key(self):
144-
raise NotImplemented
142+
raise NotImplementedError
145143

146144
def __lt__(self, other) -> bool:
147145
return self.get_sort_key() < other.get_sort_key()
@@ -381,7 +379,7 @@ def do_format(self, evaluation, form):
381379
leaves = self.get_leaves()
382380
include_form = False
383381
# If the expression is enclosed by a Format
384-
# takes the form from the expression and
382+
# takes the form from the expression and
385383
# removes the format from the expression.
386384
if head in formats and len(leaves) == 1:
387385
expr = leaves[0]
@@ -432,7 +430,7 @@ def format_expr(expr):
432430
if result is not None and result != expr:
433431
return result.evaluate(evaluation)
434432
return None
435-
433+
436434
formatted = format_expr(expr)
437435
if formatted is not None:
438436
result = formatted.do_format(evaluation, form)

0 commit comments

Comments
 (0)