diff options
| author | Alexander Smirnov <[email protected]> | 2024-12-19 08:16:17 +0000 |
|---|---|---|
| committer | Alexander Smirnov <[email protected]> | 2024-12-19 08:16:17 +0000 |
| commit | c1c806d731fa634503bf452ee3c603ed956abe2c (patch) | |
| tree | f2a69c7615b518119f1c895672544ce8ad1a4fe4 /contrib/python/ipython/py3/IPython/utils | |
| parent | 892a954b648dfce3da44ad433b2258e303b08b06 (diff) | |
| parent | bb0840c0025a75dd3b85b746ebcec7deb7d9fe1c (diff) | |
Merge branch 'rightlib' into mergelibs-241219-0815
Diffstat (limited to 'contrib/python/ipython/py3/IPython/utils')
5 files changed, 8 insertions, 6 deletions
diff --git a/contrib/python/ipython/py3/IPython/utils/_process_cli.py b/contrib/python/ipython/py3/IPython/utils/_process_cli.py index 86e918a8d02..e303202e8ad 100644 --- a/contrib/python/ipython/py3/IPython/utils/_process_cli.py +++ b/contrib/python/ipython/py3/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/contrib/python/ipython/py3/IPython/utils/_process_win32.py b/contrib/python/ipython/py3/IPython/utils/_process_win32.py index 36fb092d7b2..7a959780854 100644 --- a/contrib/python/ipython/py3/IPython/utils/_process_win32.py +++ b/contrib/python/ipython/py3/IPython/utils/_process_win32.py @@ -170,7 +170,7 @@ try: # not really a cl-arg, fallback on _process_common return py_arg_split(commandline, posix=posix, strict=strict) argvn = c_int() - result_pointer = CommandLineToArgvW(py3compat.cast_unicode(commandline.lstrip()), ctypes.byref(argvn)) + result_pointer = CommandLineToArgvW(commandline.lstrip(), ctypes.byref(argvn)) result_array_type = LPCWSTR * argvn.value result = [arg for arg in result_array_type.from_address(ctypes.addressof(result_pointer.contents))] retval = LocalFree(result_pointer) diff --git a/contrib/python/ipython/py3/IPython/utils/_sysinfo.py b/contrib/python/ipython/py3/IPython/utils/_sysinfo.py index 261309bb28d..b11405ec5f6 100644 --- a/contrib/python/ipython/py3/IPython/utils/_sysinfo.py +++ b/contrib/python/ipython/py3/IPython/utils/_sysinfo.py @@ -1,2 +1,2 @@ # GENERATED BY setup.py -commit = "af19fb054" +commit = "a8541f5c2" diff --git a/contrib/python/ipython/py3/IPython/utils/dir2.py b/contrib/python/ipython/py3/IPython/utils/dir2.py index 9f19b2dd84f..5dc699a92d4 100644 --- a/contrib/python/ipython/py3/IPython/utils/dir2.py +++ b/contrib/python/ipython/py3/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 diff --git a/contrib/python/ipython/py3/IPython/utils/sysinfo.py b/contrib/python/ipython/py3/IPython/utils/sysinfo.py index 347123fd53c..c93eaef0967 100644 --- a/contrib/python/ipython/py3/IPython/utils/sysinfo.py +++ b/contrib/python/ipython/py3/IPython/utils/sysinfo.py @@ -99,7 +99,7 @@ def get_sys_info() -> dict: path = Path(__file__, "..").resolve().parent return pkg_info(str(path)) -def sys_info(): +def sys_info() -> str: """Return useful information about IPython and the system, as a string. Examples |
