summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2022-03-15 17:17:00 +0800
committerGitHub <noreply@github.com>2022-03-15 10:17:00 +0100
commit446f4bfed1463f9016cf6bdd36f6b30700bec0ad (patch)
treee36aae1c32c2dc8065b79822c02eb6d2529bb311
parent8091fa5999d2ac5c83e4aaf99a5560dc63dbee4b (diff)
downloadpsutil-446f4bfed1463f9016cf6bdd36f6b30700bec0ad.tar.gz
fix some typos (#2085)
Signed-off-by: cuishuang <imcusg@gmail.com>
-rw-r--r--docs/DEVGUIDE.rst2
-rw-r--r--docs/index.rst6
-rw-r--r--make.bat2
-rw-r--r--psutil/_pslinux.py2
-rw-r--r--psutil/_pswindows.py2
-rw-r--r--psutil/arch/osx/cpu.c2
-rw-r--r--psutil/arch/solaris/v10/ifaddrs.c2
-rw-r--r--psutil/arch/windows/process_utils.c2
-rwxr-xr-xpsutil/tests/test_linux.py2
-rwxr-xr-xpsutil/tests/test_system.py2
10 files changed, 12 insertions, 12 deletions
diff --git a/docs/DEVGUIDE.rst b/docs/DEVGUIDE.rst
index cb9545bc..d4e6778f 100644
--- a/docs/DEVGUIDE.rst
+++ b/docs/DEVGUIDE.rst
@@ -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 595aafb2..82872a2b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1101,7 +1101,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).
@@ -1194,8 +1194,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()
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/_pslinux.py b/psutil/_pslinux.py
index 5f149a03..afcb78f5 100644
--- a/psutil/_pslinux.py
+++ b/psutil/_pslinux.py
@@ -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.
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/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/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/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/test_linux.py b/psutil/tests/test_linux.py
index e36fb874..0e6c1fd7 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -698,7 +698,7 @@ 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
+ # Let's have open() return empty data and make sure None is
# returned ('cause we mimick os.cpu_count()).
with mock.patch('psutil._common.open', create=True) as m:
self.assertIsNone(psutil._pslinux.cpu_count_logical())
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: