From efc26d2bec0e940a193bb3cad8cc0a7d8707c0da Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Fri, 21 Oct 2022 02:08:54 +0200 Subject: do not blackify __all__ --- psutil/__init__.py | 2 ++ psutil/_common.py | 2 ++ psutil/_compat.py | 5 ++++- psutil/_pslinux.py | 5 ++++- psutil/_pswindows.py | 3 ++- psutil/tests/__init__.py | 2 ++ 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/psutil/__init__.py b/psutil/__init__.py index 56742791..e61acc4f 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -145,6 +145,7 @@ else: # pragma: no cover raise NotImplementedError('platform %s is not supported' % sys.platform) +# fmt: off __all__ = [ # exceptions "Error", "NoSuchProcess", "ZombieProcess", "AccessDenied", @@ -191,6 +192,7 @@ __all__ = [ # "sensors_temperatures", "sensors_battery", "sensors_fans" # sensors "users", "boot_time", # others ] +# fmt: on __all__.extend(_psplatform.__extra__all__) diff --git a/psutil/_common.py b/psutil/_common.py index 3414e8ca..7b6707bd 100644 --- a/psutil/_common.py +++ b/psutil/_common.py @@ -46,6 +46,7 @@ PY3 = sys.version_info[0] == 3 PSUTIL_DEBUG = bool(os.getenv('PSUTIL_DEBUG', 0)) _DEFAULT = object() +# fmt: off __all__ = [ # OS constants 'FREEBSD', 'BSD', 'LINUX', 'NETBSD', 'OPENBSD', 'MACOS', 'OSX', 'POSIX', @@ -76,6 +77,7 @@ __all__ = [ # shell utils 'hilite', 'term_supports_colors', 'print_color', ] +# fmt: on # =================================================================== diff --git a/psutil/_compat.py b/psutil/_compat.py index 52e762b1..2f47cb36 100644 --- a/psutil/_compat.py +++ b/psutil/_compat.py @@ -16,6 +16,7 @@ import sys import types +# fmt: off __all__ = [ # constants "PY3", @@ -31,7 +32,9 @@ __all__ = [ "redirect_stderr", # python 3 exceptions "FileNotFoundError", "PermissionError", "ProcessLookupError", - "InterruptedError", "ChildProcessError", "FileExistsError"] + "InterruptedError", "ChildProcessError", "FileExistsError", +] +# fmt: on PY3 = sys.version_info[0] == 3 diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 9dc9643a..4b068f4b 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -59,6 +59,7 @@ else: enum = None +# fmt: off __extra__all__ = [ # 'PROCFS_PATH', @@ -68,7 +69,9 @@ __extra__all__ = [ # connection status constants "CONN_ESTABLISHED", "CONN_SYN_SENT", "CONN_SYN_RECV", "CONN_FIN_WAIT1", "CONN_FIN_WAIT2", "CONN_TIME_WAIT", "CONN_CLOSE", "CONN_CLOSE_WAIT", - "CONN_LAST_ACK", "CONN_LISTEN", "CONN_CLOSING", ] + "CONN_LAST_ACK", "CONN_LISTEN", "CONN_CLOSING", +] +# fmt: on # ===================================================================== diff --git a/psutil/_pswindows.py b/psutil/_pswindows.py index b546f15d..15c78f63 100644 --- a/psutil/_pswindows.py +++ b/psutil/_pswindows.py @@ -63,6 +63,7 @@ else: # process priority constants, import from __init__.py: # http://msdn.microsoft.com/en-us/library/ms686219(v=vs.85).aspx +# fmt: off __extra__all__ = [ "win_service_iter", "win_service_get", # Process priority @@ -74,7 +75,7 @@ __extra__all__ = [ # others "CONN_DELETE_TCB", "AF_LINK", ] - +# fmt: on # ===================================================================== # --- globals diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index ec9c7480..f3726562 100644 --- a/psutil/tests/__init__.py +++ b/psutil/tests/__init__.py @@ -77,6 +77,7 @@ if POSIX: from psutil._psposix import wait_pid +# fmt: off __all__ = [ # constants 'APPVEYOR', 'DEVNULL', 'GLOBAL_TIMEOUT', 'TOLERANCE_SYS_MEM', 'NO_RETRIES', @@ -115,6 +116,7 @@ __all__ = [ # others 'warn', 'copyload_shared_lib', 'is_namedtuple', ] +# fmt: on # =================================================================== -- cgit v1.2.1