diff --git a/IPython/core/prompts.py b/IPython/core/prompts.py index 7fd218d..105ff17 100644 --- a/IPython/core/prompts.py +++ b/IPython/core/prompts.py @@ -2,9 +2,11 @@ """Being removed """ + class LazyEvaluate(object): """This is used for formatting strings with values that need to be updated at that time, such as the current time or working directory.""" + def __init__(self, func, *args, **kwargs): self.func = func self.args = args @@ -16,6 +18,6 @@ class LazyEvaluate(object): def __str__(self): return str(self()) - + def __format__(self, format_spec): return format(self(), format_spec) diff --git a/IPython/core/tests/nonascii2.py b/IPython/core/tests/nonascii2.py index a1afce4..23e21bd 100644 --- a/IPython/core/tests/nonascii2.py +++ b/IPython/core/tests/nonascii2.py @@ -1,4 +1,4 @@ # coding: iso-8859-5 # (Unlikely to be the default encoding for most testers.) # БЖџрстуфхцчшщъыьэюя <- Cyrillic characters -'Ўт№Ф' +"Ўт№Ф" diff --git a/IPython/lib/__init__.py b/IPython/lib/__init__.py index 94b8ade..cf8ccb0 100644 --- a/IPython/lib/__init__.py +++ b/IPython/lib/__init__.py @@ -3,9 +3,9 @@ Extra capabilities for IPython """ -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- diff --git a/IPython/testing/tests/__init__.py b/IPython/testing/tests/__init__.py index f751f68..042eb92 100644 --- a/IPython/testing/tests/__init__.py +++ b/IPython/testing/tests/__init__.py @@ -1,10 +1,10 @@ # encoding: utf-8 __docformat__ = "restructuredtext en" -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Copyright (C) 2005 Fernando Perez # Brian E Granger # Benjamin Ragan-Kelley # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- diff --git a/IPython/utils/_process_cli.py b/IPython/utils/_process_cli.py index 86e918a..e303202 100644 --- a/IPython/utils/_process_cli.py +++ b/IPython/utils/_process_cli.py @@ -35,6 +35,7 @@ def system(cmd): # Start up process: reg = System.Diagnostics.Process.Start(psi) + def getoutput(cmd): """ getoutput(cmd) should work in a cli environment on Mac OSX, Linux, @@ -53,6 +54,7 @@ def getoutput(cmd): error = myError.ReadToEnd() return output + def check_pid(pid): """ Check if a process with the given PID (pid) exists @@ -66,4 +68,4 @@ def check_pid(pid): return True except System.ArgumentException: # process with given pid isn't running - return False + return False diff --git a/IPython/utils/dir2.py b/IPython/utils/dir2.py index 9f19b2d..5dc699a 100644 --- a/IPython/utils/dir2.py +++ b/IPython/utils/dir2.py @@ -41,7 +41,7 @@ def dir2(obj): # TypeError: dir(obj) does not return a list words = set() - if safe_hasattr(obj, '__class__'): + if safe_hasattr(obj, "__class__"): words |= set(dir(obj.__class__)) # filter out non-string attributes which may be stuffed by dir() calls @@ -62,7 +62,7 @@ def get_real_method(obj, name): Returns the method or None. """ try: - canary = getattr(obj, '_ipython_canary_method_should_not_exist_', None) + canary = getattr(obj, "_ipython_canary_method_should_not_exist_", None) except Exception: return None