From 471b19d2aa799cd73bded23379e864dd35bec2b6 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Thu, 27 Jan 2022 08:26:28 +0800 Subject: Fix typos --- CONTRIBUTING.md | 2 +- HISTORY.rst | 16 ++++++++-------- INSTALL.rst | 2 +- appveyor.yml | 2 +- docs/DEVGUIDE.rst | 4 ++-- docs/index.rst | 10 +++++----- make.bat | 2 +- psutil/__init__.py | 6 +++--- psutil/_pslinux.py | 8 ++++---- psutil/_psutil_common.c | 2 +- psutil/_psutil_sunos.c | 6 +++--- psutil/_pswindows.py | 2 +- psutil/arch/freebsd/sensors.c | 2 +- psutil/arch/osx/cpu.c | 2 +- psutil/arch/solaris/environ.c | 8 ++++---- psutil/arch/solaris/v10/ifaddrs.c | 2 +- psutil/arch/windows/cpu.c | 6 +++--- psutil/arch/windows/process_utils.c | 2 +- psutil/tests/__init__.py | 4 ++-- psutil/tests/test_bsd.py | 2 +- psutil/tests/test_linux.py | 4 ++-- psutil/tests/test_process.py | 4 ++-- psutil/tests/test_system.py | 2 +- psutil/tests/test_windows.py | 2 +- scripts/internal/download_wheels_appveyor.py | 2 +- scripts/internal/fix_flake8.py | 4 ++-- scripts/iotop.py | 2 +- setup.py | 2 +- 28 files changed, 56 insertions(+), 56 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 481793fc..250398f8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ Pull Requests * The PR system is for fixing bugs or make enhancements related to the **program code**. -* If you whish to implement a new feature or add support for a new platform it's +* If you wish to implement a new feature or add support for a new platform it's better to **discuss it first**, either on the issue tracker, the forum or via private email. * In order to get acquainted with the code base and tooling, take a look at the diff --git a/HISTORY.rst b/HISTORY.rst index 595de975..32f31168 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -313,7 +313,7 @@ XXXX-XX-XX - 1276_, [AIX]: can't get whole `Process.cmdline()`_. (patch by Arnon Yaari) - 1501_, [Windows]: `Process.cmdline()`_ and `Process.exe()`_ raise unhandled "WinError 1168 element not found" exceptions for "Registry" and - "Memory Compression" psuedo processes on Windows 10. + "Memory Compression" pseudo processes on Windows 10. - 1526_, [NetBSD], **[critical]**: `Process.cmdline()`_ could raise ``MemoryError``. (patch by Kamil Rytarowski) @@ -352,9 +352,9 @@ XXXX-XX-XX - 1471_, [SunOS]: `Process.name()`_ and `Process.cmdline()`_ can return ``SystemError``. (patch by Daniel Beer) - 1472_, [Linux]: `cpu_freq()`_ does not return all CPUs on Rasbperry-pi 3. -- 1474_: fix formatting of ``psutil.tests()`` which mimicks ``ps aux`` output. +- 1474_: fix formatting of ``psutil.tests()`` which mimics ``ps aux`` output. - 1475_, [Windows], **[critical]**: ``OSError.winerror`` attribute wasn't - properly checked resuling in ``WindowsError(ERROR_ACCESS_DENIED)`` being + properly checked resulting in ``WindowsError(ERROR_ACCESS_DENIED)`` being raised instead of `AccessDenied`_. - 1477_, [Windows]: wrong or absent error handling for private ``NTSTATUS`` Windows APIs. Different process methods were affected by this. @@ -1318,7 +1318,7 @@ XXXX-XX-XX **Bug fixes** - 340_, [Windows], **[critical]**: `Process.open_files()`_ no longer hangs. - Instead it uses a thred which times out and skips the file handle in case it's + Instead it uses a thread which times out and skips the file handle in case it's taking too long to be retrieved. (patch by Jeff Tang) - 627_, [Windows]: `Process.name()`_ no longer raises `AccessDenied`_ for pids owned by another user. @@ -1327,7 +1327,7 @@ XXXX-XX-XX affect ``os.getpid()`` 's process group and not PID 0. - 639_, [Linux]: `Process.cmdline()`_ can be truncated. - 640_, [Linux]: ``*connections`` functions may swallow errors and return an - incomplete list of connnections. + incomplete list of connections. - 642_: ``repr()`` of exceptions is incorrect. - 653_, [Windows]: add ``inet_ntop()`` function for Windows XP to support IPv6. - 641_, [Windows]: replace deprecated string functions with safe equivalents. @@ -1398,7 +1398,7 @@ XXXX-XX-XX **Bug fixes** -- 572_, [Linux]: fix "ValueError: ambiguos inode with multiple PIDs references" +- 572_, [Linux]: fix "ValueError: ambiguous inode with multiple PIDs references" for `Process.connections()`_. (patch by Bruno Binet) 2.2.0 @@ -1842,7 +1842,7 @@ In most cases accessing the old names will work but it will cause a the PPID to 1 in case of a zombie process. - 323_, [macOS]: `disk_io_counters()`_ ``read_time`` and ``write_time`` parameters were reporting microseconds not milliseconds. (patch by Gregory Szorc) -- 331_: `Process.cmdline()`_ is no longer cached after first acces as it may +- 331_: `Process.cmdline()`_ is no longer cached after first access as it may change. - 333_, [macOS]: leak of Mach ports (patch by rsesek@google.com) - 337_, [Linux], **[critical]**: `Process`_ methods not working because of a @@ -2199,7 +2199,7 @@ In most cases accessing the old names will work but it will cause a - 113_: exception messages now include `Process.name()`_ and `Process.pid`_. - 114_, [Windows]: `Process.username()`_ has been rewritten in pure C and no longer uses WMI resulting in a big speedup. Also, pywin32 is no longer - required as a third-party dependancy. (patch by wj32) + required as a third-party dependency. (patch by wj32) - 117_, [Windows]: added support for Windows 2000. - 123_: `cpu_percent()`_ and `Process.cpu_percent()`_ accept a new ``interval`` parameter. diff --git a/INSTALL.rst b/INSTALL.rst index c7efea5e..46aee6cd 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -9,7 +9,7 @@ install a C compiler. All you have to do is:: pip install psutil -If wheels are not available for your platform or architecture, or you whish to +If wheels are not available for your platform or architecture, or you wish to build & install psutil from sources, keep reading. Linux (build) diff --git a/appveyor.yml b/appveyor.yml index 83e570ae..c487da06 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,7 +11,7 @@ matrix: environment: global: # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the - # /E:ON and /V:ON options are not enabled in the batch script intepreter + # /E:ON and /V:ON options are not enabled in the batch script interpreter # See: http://stackoverflow.com/a/13751649/163740 WITH_COMPILER: "cmd /E:ON /V:ON /C .\\.ci\\appveyor\\run_with_compiler.cmd" PYTHONWARNINGS: always diff --git a/docs/DEVGUIDE.rst b/docs/DEVGUIDE.rst index cb9545bc..384f8b25 100644 --- a/docs/DEVGUIDE.rst +++ b/docs/DEVGUIDE.rst @@ -32,7 +32,7 @@ Once you have a compiler installed: make uninstall make help -- if you're working on a new feature and you whish to compile & test it "on the +- if you're working on a new feature and you wish to compile & test it "on the fly" from a test script, this is a quick & dirty way to do it: .. code-block:: bash @@ -115,7 +115,7 @@ Unit tests are automatically run on every ``git push`` on **Linux**, **macOS**, .. image:: https://img.shields.io/appveyor/ci/giampaolo/psutil/master.svg?maxAge=3600&label=Windows :target: https://ci.appveyor.com/project/giampaolo/psutil -OpenBSD, NetBSD, AIX and Solaris does not have continuos test integration. +OpenBSD, NetBSD, AIX and Solaris does not have continuous test integration. Documentation ------------- diff --git a/docs/index.rst b/docs/index.rst index 6df7ccef..38fb7e98 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1100,7 +1100,7 @@ Process class Here's a list of methods which can take advantage of the speedup depending on what platform you're on. - In the table below horizontal emtpy rows indicate what process methods can + In the table below horizontal empty rows indicate what process methods can be efficiently grouped together internally. The last column (speedup) shows an approximation of the speedup you can get if you call all the methods together (best case scenario). @@ -1193,8 +1193,8 @@ Process class .. versionadded:: 4.0.0 .. versionchanged:: 5.3.0 added SunOS support - .. versionchanged:: 5.6.3 added AIX suport - .. versionchanged:: 5.7.3 added BSD suport + .. versionchanged:: 5.6.3 added AIX support + .. versionchanged:: 5.7.3 added BSD support .. method:: create_time() @@ -1593,7 +1593,7 @@ Process class Return a named tuple with variable fields depending on the platform representing memory information about the process. - The "portable" fields available on all plaforms are `rss` and `vms`. + The "portable" fields available on all platforms are `rss` and `vms`. All numbers are expressed in bytes. +---------+---------+-------+---------+-----+------------------------------+ @@ -2539,7 +2539,7 @@ FAQs ==== * Q: Why do I get :class:`AccessDenied` for certain processes? -* A: This may happen when you query processess owned by another user, +* A: This may happen when you query processes owned by another user, especially on macOS (see `issue #883`_) and Windows. Unfortunately there's not much you can do about this except running the Python process with higher privileges. diff --git a/make.bat b/make.bat index 8e60811c..e292bb16 100644 --- a/make.bat +++ b/make.bat @@ -2,7 +2,7 @@ rem ========================================================================== rem Shortcuts for various tasks, emulating UNIX "make" on Windows. -rem It is primarly intended as a shortcut for compiling / installing +rem It is primarily intended as a shortcut for compiling / installing rem psutil ("make.bat build", "make.bat install") and running tests rem ("make.bat test"). rem diff --git a/psutil/__init__.py b/psutil/__init__.py index 6deebb26..db63fdbb 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -373,7 +373,7 @@ class Process(object): raise NoSuchProcess(pid, msg='process PID not found') else: self._gone = True - # This pair is supposed to indentify a Process instance + # This pair is supposed to identify a Process instance # univocally over time (the PID alone is not enough as # it might refer to a process whose PID has been reused). # This will be used later in __eq__() and is_running(). @@ -1054,7 +1054,7 @@ class Process(object): """Return a namedtuple with variable fields depending on the platform, representing memory information about the process. - The "portable" fields available on all plaforms are `rss` and `vms`. + The "portable" fields available on all platforms are `rss` and `vms`. All numbers are expressed in bytes. """ @@ -1208,7 +1208,7 @@ class Process(object): def suspend(self): """Suspend process execution with SIGSTOP pre-emptively checking whether PID has been reused. - On Windows this has the effect ot suspending all process threads. + On Windows this has the effect of suspending all process threads. """ if POSIX: self._send_signal(signal.SIGSTOP) diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 5f149a03..8549b525 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -242,7 +242,7 @@ def is_storage_device(name): "nvme0n1p1"). If name is a virtual device (e.g. "loop1", "ram") return True. """ - # Readapted from iostat source code, see: + # Re-adapted from iostat source code, see: # https://github.com/sysstat/sysstat/blob/ # 97912938cd476645b267280069e83b1c8dc0e1c7/common.c#L208 # Some devices may have a slash in their name (e.g. cciss/c0d0...). @@ -915,7 +915,7 @@ class Connections: # # out if there are multiple references to the # # same inode. We won't do this for UNIX sockets. # if len(inodes[inode]) > 1 and family != socket.AF_UNIX: - # raise ValueError("ambiguos inode with multiple " + # raise ValueError("ambiguous inode with multiple " # "PIDs references") pid, fd = inodes[inode][0] else: @@ -1675,7 +1675,7 @@ class Process(object): """Parse /proc/{pid}/stat file and return a dict with various process info. Using "man proc" as a reference: where "man proc" refers to - position N always substract 3 (e.g ppid position 4 in + position N always subtract 3 (e.g ppid position 4 in 'man proc' == position 1 in here). The return value is cached in case oneshot() ctx manager is in use. @@ -1683,7 +1683,7 @@ class Process(object): data = bcat("%s/%s/stat" % (self._procfs_path, self.pid)) # Process name is between parentheses. It can contain spaces and # other parentheses. This is taken into account by looking for - # the first occurrence of "(" and the last occurence of ")". + # the first occurrence of "(" and the last occurrence of ")". rpar = data.rfind(b')') name = data[data.find(b'(') + 1:rpar] fields = data[rpar + 2:].split() diff --git a/psutil/_psutil_common.c b/psutil/_psutil_common.c index 9679da67..096e2f37 100644 --- a/psutil/_psutil_common.c +++ b/psutil/_psutil_common.c @@ -319,7 +319,7 @@ psutil_loadlibs() { // minimum requirement: Win 7 GetActiveProcessorCount = psutil_GetProcAddress( "kernel32", "GetActiveProcessorCount"); - // minumum requirement: Win 7 + // minimum requirement: Win 7 GetLogicalProcessorInformationEx = psutil_GetProcAddressFromLib( "kernel32", "GetLogicalProcessorInformationEx"); // minimum requirements: Windows Server Core diff --git a/psutil/_psutil_sunos.c b/psutil/_psutil_sunos.c index 42a1ffe8..84bf1c40 100644 --- a/psutil/_psutil_sunos.c +++ b/psutil/_psutil_sunos.c @@ -124,7 +124,7 @@ psutil_proc_basic_info(PyObject *self, PyObject *args) { } /* - * Join array of C strings to C string with delemiter dm. + * Join array of C strings to C string with delimiter dm. * Omit empty records. */ static int @@ -1255,7 +1255,7 @@ psutil_net_connections(PyObject *self, PyObject *args) { lport = tp.tcpConnLocalPort; rport = tp.tcpConnRemPort; - // contruct python tuple/list + // construct python tuple/list py_laddr = Py_BuildValue("(si)", lip, lport); if (!py_laddr) goto error; @@ -1300,7 +1300,7 @@ psutil_net_connections(PyObject *self, PyObject *args) { lport = tp6.tcp6ConnLocalPort; rport = tp6.tcp6ConnRemPort; - // contruct python tuple/list + // construct python tuple/list py_laddr = Py_BuildValue("(si)", lip, lport); if (!py_laddr) goto error; diff --git a/psutil/_pswindows.py b/psutil/_pswindows.py index 9966b1b4..31edffc1 100644 --- a/psutil/_pswindows.py +++ b/psutil/_pswindows.py @@ -249,7 +249,7 @@ def swap_memory(): free_system = mem[3] # Despite the name PageFile refers to total system memory here - # thus physical memory values need to be substracted to get swap values + # thus physical memory values need to be subtracted to get swap values total = total_system - total_phys free = min(total, free_system - free_phys) used = total - free diff --git a/psutil/arch/freebsd/sensors.c b/psutil/arch/freebsd/sensors.c index ce7b2d92..0042adbe 100644 --- a/psutil/arch/freebsd/sensors.c +++ b/psutil/arch/freebsd/sensors.c @@ -64,7 +64,7 @@ psutil_sensors_cpu_temperature(PyObject *self, PyObject *args) { goto error; current = DECIKELVIN_2_CELCIUS(current); - // Return -273 in case of faliure. + // Return -273 in case of failure. sprintf(sensor, "dev.cpu.%d.coretemp.tjmax", core); if (sysctlbyname(sensor, &tjmax, &size, NULL, 0)) tjmax = 0; diff --git a/psutil/arch/osx/cpu.c b/psutil/arch/osx/cpu.c index 37141a2d..2d94f31d 100644 --- a/psutil/arch/osx/cpu.c +++ b/psutil/arch/osx/cpu.c @@ -119,7 +119,7 @@ psutil_cpu_freq(PyObject *self, PyObject *args) { size_t len = sizeof(curr); size_t size = sizeof(min); - // also availble as "hw.cpufrequency" but it's deprecated + // also available as "hw.cpufrequency" but it's deprecated mib[0] = CTL_HW; mib[1] = HW_CPU_FREQ; diff --git a/psutil/arch/solaris/environ.c b/psutil/arch/solaris/environ.c index 482fe1fc..58afd63a 100644 --- a/psutil/arch/solaris/environ.c +++ b/psutil/arch/solaris/environ.c @@ -227,7 +227,7 @@ is_ptr_dereference_possible(psinfo_t info) { /* * Return pointer size according to psinfo_t structure - * @param info a ponter to process info (psinfo_t) structure of the + * @param info a pointer to process info (psinfo_t) structure of the * interesting process. * @return pointer size (4 or 8). */ @@ -284,9 +284,9 @@ search_pointers_vector_size_offt(int fd, off_t offt, size_t ptr_size) { /* - * Derefence and read array of strings by psinfo_t.pr_argv pointer from + * Dereference and read array of strings by psinfo_t.pr_argv pointer from * remote process. - * @param info a ponter to process info (psinfo_t) structure of the + * @param info a pointer to process info (psinfo_t) structure of the * interesting process * @param procfs_path a cstring with path to mounted procfs filesystem. * @param count a pointer to variable where to store amount of elements in @@ -333,7 +333,7 @@ psutil_read_raw_args(psinfo_t info, const char *procfs_path, size_t *count) { /* * Dereference and read array of strings by psinfo_t.pr_envp pointer * from remote process. - * @param info a ponter to process info (psinfo_t) structure of the + * @param info a pointer to process info (psinfo_t) structure of the * interesting process. * @param procfs_path a cstring with path to mounted procfs filesystem. * @param count a pointer to variable where to store amount of elements in diff --git a/psutil/arch/solaris/v10/ifaddrs.c b/psutil/arch/solaris/v10/ifaddrs.c index b741a6b9..3719c8c1 100644 --- a/psutil/arch/solaris/v10/ifaddrs.c +++ b/psutil/arch/solaris/v10/ifaddrs.c @@ -1,4 +1,4 @@ -/* Refrences: +/* References: * https://lists.samba.org/archive/samba-technical/2009-February/063079.html * http://stackoverflow.com/questions/4139405/#4139811 * https://github.com/steve-o/openpgm/blob/master/openpgm/pgm/getifaddrs.c diff --git a/psutil/arch/windows/cpu.c b/psutil/arch/windows/cpu.c index 20c01a0d..9d89e5bb 100644 --- a/psutil/arch/windows/cpu.c +++ b/psutil/arch/windows/cpu.c @@ -100,7 +100,7 @@ psutil_per_cpu_times(PyObject *self, PyObject *args) { goto error; } - // gets cpu time informations + // gets cpu time information status = NtQuerySystemInformation( SystemProcessorPerformanceInformation, sppi, @@ -172,7 +172,7 @@ psutil_cpu_count_logical(PyObject *self, PyObject *args) { if (ncpus != 0) return Py_BuildValue("I", ncpus); else - Py_RETURN_NONE; // mimick os.cpu_count() + Py_RETURN_NONE; // mimic os.cpu_count() } @@ -248,7 +248,7 @@ psutil_cpu_count_cores(PyObject *self, PyObject *args) { } else { psutil_debug("GetLogicalProcessorInformationEx() count was 0"); - Py_RETURN_NONE; // mimick os.cpu_count() + Py_RETURN_NONE; // mimic os.cpu_count() } return_none: diff --git a/psutil/arch/windows/process_utils.c b/psutil/arch/windows/process_utils.c index acbda301..f9d4bbc8 100644 --- a/psutil/arch/windows/process_utils.c +++ b/psutil/arch/windows/process_utils.c @@ -160,7 +160,7 @@ psutil_handle_from_pid(DWORD pid, DWORD access) { } -// Check for PID existance. Return 1 if pid exists, 0 if not, -1 on error. +// Check for PID existence. Return 1 if pid exists, 0 if not, -1 on error. int psutil_pid_is_running(DWORD pid) { HANDLE hProcess; diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index 21bb3e61..b4ab6531 100644 --- a/psutil/tests/__init__.py +++ b/psutil/tests/__init__.py @@ -311,7 +311,7 @@ def spawn_testproc(cmd=None, **kwds): return it as a subprocess.Popen instance. If "cmd" is specified that is used instead of python. By default stdin and stdout are redirected to /dev/null. - It also attemps to make sure the process is in a reasonably + It also attempts to make sure the process is in a reasonably initialized state. The process is registered for cleanup on reap_children(). """ @@ -566,7 +566,7 @@ def reap_children(recursive=False): """Terminate and wait() any subprocess started by this test suite and any children currently running, ensuring that no processes stick around to hog resources. - If resursive is True it also tries to terminate and wait() + If recursive is True it also tries to terminate and wait() all grandchildren started by this process. """ # Get the children here before terminating them, as in case of diff --git a/psutil/tests/test_bsd.py b/psutil/tests/test_bsd.py index 1ae810f1..8d892310 100755 --- a/psutil/tests/test_bsd.py +++ b/psutil/tests/test_bsd.py @@ -115,7 +115,7 @@ class BSDTestCase(PsutilTestCase): dev, total, used, free = df(part.mountpoint) self.assertEqual(part.device, dev) self.assertEqual(usage.total, total) - # 10 MB tollerance + # 10 MB tolerance if abs(usage.free - free) > 10 * 1024 * 1024: raise self.fail("psutil=%s, df=%s" % (usage.free, free)) if abs(usage.used - used) > 10 * 1024 * 1024: diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index e36fb874..14553cd6 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -698,8 +698,8 @@ class TestSystemCPUCountLogical(PsutilTestCase): self.assertEqual(psutil._pslinux.cpu_count_logical(), original) assert m.called - # Let's have open() return emtpy data and make sure None is - # returned ('cause we mimick os.cpu_count()). + # Let's have open() return empty data and make sure None is + # returned ('cause we mimic os.cpu_count()). with mock.patch('psutil._common.open', create=True) as m: self.assertIsNone(psutil._pslinux.cpu_count_logical()) self.assertEqual(m.call_count, 2) diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py index 2a2af93c..1be27ef2 100755 --- a/psutil/tests/test_process.py +++ b/psutil/tests/test_process.py @@ -700,7 +700,7 @@ class TestProcess(PsutilTestCase): self.assertEqual(exe.replace(ver, ''), PYTHON_EXE.replace(ver, '')) except AssertionError: - # Tipically MACOS. Really not sure what to do here. + # Typically MACOS. Really not sure what to do here. pass out = sh([exe, "-c", "import os; print('hey')"]) @@ -1518,7 +1518,7 @@ class TestPopen(PsutilTestCase): def test_misc(self): # XXX this test causes a ResourceWarning on Python 3 because - # psutil.__subproc instance doesn't get propertly freed. + # psutil.__subproc instance doesn't get properly freed. # Not sure what to do though. cmd = [PYTHON_EXE, "-c", "import time; time.sleep(60);"] with psutil.Popen(cmd, stdout=subprocess.PIPE, diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py index ed328d01..bb5edd5c 100755 --- a/psutil/tests/test_system.py +++ b/psutil/tests/test_system.py @@ -510,7 +510,7 @@ class TestCpuAPIs(PsutilTestCase): if not AIX and name in ('ctx_switches', 'interrupts'): self.assertGreater(value, 0) - @unittest.skipIf(not HAS_CPU_FREQ, "not suported") + @unittest.skipIf(not HAS_CPU_FREQ, "not supported") def test_cpu_freq(self): def check_ls(ls): for nt in ls: diff --git a/psutil/tests/test_windows.py b/psutil/tests/test_windows.py index 55b6bc7b..4aa25184 100755 --- a/psutil/tests/test_windows.py +++ b/psutil/tests/test_windows.py @@ -166,7 +166,7 @@ class TestSystemAPIs(WindowsTestCase): self.assertEqual(usage.total, int(wmi_part.Size)) wmi_free = int(wmi_part.FreeSpace) self.assertEqual(usage.free, wmi_free) - # 10 MB tollerance + # 10 MB tolerance if abs(usage.free - wmi_free) > 10 * 1024 * 1024: raise self.fail("psutil=%s, wmi=%s" % ( usage.free, wmi_free)) diff --git a/scripts/internal/download_wheels_appveyor.py b/scripts/internal/download_wheels_appveyor.py index e4d6ffc0..786e23d8 100755 --- a/scripts/internal/download_wheels_appveyor.py +++ b/scripts/internal/download_wheels_appveyor.py @@ -7,7 +7,7 @@ """ Script which downloads wheel files hosted on AppVeyor: https://ci.appveyor.com/project/giampaolo/psutil -Readapted from the original recipe of Ibarra Corretge' +Re-adapted from the original recipe of Ibarra Corretge' : http://code.saghul.net/index.php/2015/09/09/ """ diff --git a/scripts/internal/fix_flake8.py b/scripts/internal/fix_flake8.py index 14fbb4d2..44da4a32 100755 --- a/scripts/internal/fix_flake8.py +++ b/scripts/internal/fix_flake8.py @@ -81,7 +81,7 @@ def handle_f401(fname, lineno): def remove_lines(fname, entries): """Check if we should remove lines, then do it. - Return the numner of lines removed. + Return the number of lines removed. """ to_remove = [] for entry in entries: @@ -116,7 +116,7 @@ def remove_lines(fname, entries): def add_lines(fname, entries): """Check if we should remove lines, then do it. - Return the numner of lines removed. + Return the number of lines removed. """ EXPECTED_BLANK_LINES = ( 'E302', # 'expected 2 blank limes, found 1' diff --git a/scripts/iotop.py b/scripts/iotop.py index 91bc3b18..f4d62d46 100755 --- a/scripts/iotop.py +++ b/scripts/iotop.py @@ -65,7 +65,7 @@ def printl(line, highlight=False): def poll(interval): - """Calculate IO usage by comparing IO statics before and + """Calculate IO usage by comparing IO statistics before and after the interval. Return a tuple including all currently running processes sorted by IO activity and total disks I/O activity. diff --git a/setup.py b/setup.py index 3bad6d5d..8284f959 100755 --- a/setup.py +++ b/setup.py @@ -328,7 +328,7 @@ if POSIX: # Detect Solaris 5.10, update >= 4, see: # https://github.com/giampaolo/psutil/pull/1638 if get_sunos_update() >= 4: - # MIB compliancy starts with SunOS 5.10 Update 4: + # MIB compliance starts with SunOS 5.10 Update 4: posix_extension.define_macros.append(('NEW_MIB_COMPLIANT', 1)) posix_extension.sources.append('psutil/arch/solaris/v10/ifaddrs.c') posix_extension.define_macros.append(('PSUTIL_SUNOS10', 1)) -- cgit v1.2.1