Skip to content

Commit 8302d8c

Browse files
committed
minor style/spelling fixes
1 parent 0d95a40 commit 8302d8c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/past/builtins/misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def oct(number):
103103
return '0' + builtins.oct(number)[2:]
104104

105105
raw_input = input
106-
from imp import reload
106+
from importlib import reload
107107
unicode = str
108108
unichr = chr
109109
xrange = range
@@ -143,7 +143,7 @@ def execfile(filename, myglobals=None, mylocals=None):
143143
if not isinstance(mylocals, Mapping):
144144
raise TypeError('locals must be a mapping')
145145
with open(filename, "rb") as fin:
146-
source = fin.read()
146+
source = fin.read()
147147
code = compile(source, filename, "exec")
148148
exec_(code, myglobals, mylocals)
149149

tests/test_past/test_misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
Tests for the resurrected Py2-like cmp funtion
3+
Tests for the resurrected Py2-like cmp function
44
"""
55

66
from __future__ import absolute_import, unicode_literals, print_function
@@ -23,7 +23,7 @@ def test_cmp(self):
2323
with self.subTest(x=x, y=y):
2424
try:
2525
past_cmp_value = cmp(x, y)
26-
except Exception as ex:
26+
except Exception:
2727
past_cmp_value = traceback.format_exc().strip().split('\n')[-1]
2828

2929
self.assertEqual(cmp_python2_value, past_cmp_value,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy