Skip to content

Commit

Permalink
Fixed typo in variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
botant committed Apr 24, 2021
1 parent a6e7a33 commit 8a64fce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/attr/_cmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def cmp_using(
}

# Add operations.
num_order_fucntions = 0
num_order_functions = 0
has_eq_function = False

if eq is not None:
Expand All @@ -61,19 +61,19 @@ def cmp_using(
body["__ne__"] = _make_ne()

if lt is not None:
num_order_fucntions += 1
num_order_functions += 1
body["__lt__"] = _make_operator("lt", lt)

if le is not None:
num_order_fucntions += 1
num_order_functions += 1
body["__le__"] = _make_operator("le", le)

if gt is not None:
num_order_fucntions += 1
num_order_functions += 1
body["__gt__"] = _make_operator("gt", gt)

if ge is not None:
num_order_fucntions += 1
num_order_functions += 1
body["__ge__"] = _make_operator("ge", ge)

type_ = new_class(class_name, (object,), {}, lambda ns: ns.update(body))
Expand All @@ -83,7 +83,7 @@ def cmp_using(
type_._requirements.append(_check_same_type)

# Add total ordering if at least one operation was defined.
if 0 < num_order_fucntions < 4:
if 0 < num_order_functions < 4:
if not has_eq_function:
# functools.total_ordering requires __eq__ to be defined,
# so raise early error here to keep a nice stack.
Expand Down

0 comments on commit 8a64fce

Please sign in to comment.