Skip to content

Commit

Permalink
Reformat all files that woudl lead to less than 4 lines changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Oct 31, 2024
1 parent d6a5f96 commit c9f8af6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
4 changes: 3 additions & 1 deletion IPython/core/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,6 +18,6 @@ def __call__(self, **kwargs):

def __str__(self):
return str(self())

def __format__(self, format_spec):
return format(self(), format_spec)
2 changes: 1 addition & 1 deletion IPython/core/tests/nonascii2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# coding: iso-8859-5
# (Unlikely to be the default encoding for most testers.)
# БЖџрстуфхцчшщъыьэюя <- Cyrillic characters
'Ўт№Ф'
"Ўт№Ф"
4 changes: 2 additions & 2 deletions IPython/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#-----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions IPython/testing/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# encoding: utf-8
__docformat__ = "restructuredtext en"
#-------------------------------------------------------------------------------
# -------------------------------------------------------------------------------
# Copyright (C) 2005 Fernando Perez <[email protected]>
# Brian E Granger <[email protected]>
# Benjamin Ragan-Kelley <[email protected]>
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-------------------------------------------------------------------------------
# -------------------------------------------------------------------------------
4 changes: 3 additions & 1 deletion IPython/utils/_process_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -66,4 +68,4 @@ def check_pid(pid):
return True
except System.ArgumentException:
# process with given pid isn't running
return False
return False
4 changes: 2 additions & 2 deletions IPython/utils/dir2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit c9f8af6

Please sign in to comment.