[pypy-commit] pypy default: pep-8 cleanup

mattip pypy.commits at gmail.com
Sun Feb 2 09:45:24 EST 2020


Author: Matti Picus <matti.picus at gmail.com>
Branch: 
Changeset: r98628:30cf519fd69a
Date: 2020-01-31 11:45 +0200
http://bitbucket.org/pypy/pypy/changeset/30cf519fd69a/

Log:	pep-8 cleanup

diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py
--- a/pypy/interpreter/error.py
+++ b/pypy/interpreter/error.py
@@ -487,7 +487,7 @@
     except ValueError:
         msg = 'error %d' % errno
     if w_exception_class is None:
-        exc = getattr(space, 'w_OSError')
+        exc = space.w_OSError
     else:
         exc = w_exception_class
     if w_filename is not None:
diff --git a/pypy/interpreter/test/test_error.py b/pypy/interpreter/test/test_error.py
--- a/pypy/interpreter/test/test_error.py
+++ b/pypy/interpreter/test/test_error.py
@@ -112,8 +112,8 @@
                                     [os.strerror(errno.EBADF)], None)
     #
     e = wrap_oserror(space, OSError(errno.EBADF, "foobar"),
-                     filename = "test.py",
-                     w_exception_class = space.w_EnvironmentError)
+                     filename="test.py",
+                     w_exception_class=space.w_EnvironmentError)
     assert isinstance(e, OperationError)
     assert e.w_type == [EnvironmentError]
     assert e.get_w_value(space) == ([EnvironmentError], [errno.EBADF],
@@ -121,8 +121,8 @@
                                     ["test.py"])
     #
     e = wrap_oserror(space, OSError(errno.EBADF, "foobar"),
-                     filename = "test.py",
-                     w_exception_class = [SystemError])
+                     filename="test.py",
+                     w_exception_class=[SystemError])
     assert isinstance(e, OperationError)
     assert e.w_type == [SystemError]
     assert e.get_w_value(space) == ([SystemError], [errno.EBADF],
diff --git a/pypy/module/fcntl/interp_fcntl.py b/pypy/module/fcntl/interp_fcntl.py
--- a/pypy/module/fcntl/interp_fcntl.py
+++ b/pypy/module/fcntl/interp_fcntl.py
@@ -80,7 +80,7 @@
 def _get_error(space, funcname):
     errno = rposix.get_saved_errno()
     return wrap_oserror(space, OSError(errno, funcname),
-                        w_exception_class = space.w_IOError)
+                        w_exception_class=space.w_IOError)
 
 @unwrap_spec(op=int, w_arg=WrappedDefault(0))
 def fcntl(space, w_fd, op, w_arg):
diff --git a/pypy/module/select/interp_select.py b/pypy/module/select/interp_select.py
--- a/pypy/module/select/interp_select.py
+++ b/pypy/module/select/interp_select.py
@@ -40,7 +40,7 @@
         fd = space.c_filedescriptor_w(w_fd)
         if fd not in self.fddict:
             raise wrap_oserror(space, OSError(errno.ENOENT, "poll.modify"),
-                               w_exception_class = space.w_IOError)
+                               w_exception_class=space.w_IOError)
         self.fddict[fd] = events
 
     def unregister(self, space, w_fd):


More information about the pypy-commit mailing list