From 8f3b470b072521e11f955507babd8156bfb43676 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 27 Apr 2024 18:54:07 +0200 Subject: [PATCH] Fix typos discovered by codespell (#181) --- doc/api.rst | 2 +- doc/changelog.rst | 2 +- doc/index.rst | 2 +- pyperf/_runner.py | 4 ++-- pyperf/_system.py | 2 +- pyperf/_worker.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index 54c1fad6..5647d157 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -679,7 +679,7 @@ Benchmark: * ``inner_loops`` (``int >= 1``): number of inner-loops of the benchmark (``int``) * ``timer``: Implementation of ``time.perf_counter()``, and also resolution if available -* ``tags``: (list of str, optional): A list of tags associated with the benchmark. If provided, the results output will be aggreggated by each tag. +* ``tags``: (list of str, optional): A list of tags associated with the benchmark. If provided, the results output will be aggregated by each tag. Python metadata: diff --git a/doc/changelog.rst b/doc/changelog.rst index 6b57351a..ded41f28 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -88,7 +88,7 @@ Version 2.1.0 (2021-01-14) * The :ref:`compare_to command ` no longer displays percentages: display less numbers to make the output easier to read. Also, percentage were almost the same values than the xxx faster or xxx slower - values, but rounded differenly which introduced confusion. + values, but rounded differently which introduced confusion. * Project moved to https://github.com/psf/pyperf/ * system command now only emits a warning rather than failing with a hard error if it fails to get or set the frequency of a CPU. diff --git a/doc/index.rst b/doc/index.rst index 459a16e5..47c75127 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -4,7 +4,7 @@ Python pyperf module The Python ``pyperf`` module is a toolkit to write, run and analyze benchmarks. -Documenation: +Documentation: .. toctree:: :maxdepth: 2 diff --git a/pyperf/_runner.py b/pyperf/_runner.py index 58776f60..cf4bbbe6 100644 --- a/pyperf/_runner.py +++ b/pyperf/_runner.py @@ -69,7 +69,7 @@ class CLIError(Exception): class Runner: _created = set() - # Default parameters are chosen to have approximatively a run of 0.5 second + # Default parameters are chosen to have approximately a run of 0.5 second # and so a total duration of 5 seconds by default def __init__(self, values=None, processes=None, loops=0, min_time=0.1, metadata=None, @@ -85,7 +85,7 @@ def __init__(self, values=None, processes=None, pass # Watchdog: ensure that only once instance of Runner (or a Runner - # subclass) is created per process to prevent bad suprises + # subclass) is created per process to prevent bad surprises cls = self.__class__ key = id(cls) if key in cls._created: diff --git a/pyperf/_system.py b/pyperf/_system.py index fb5d4f36..15aa6c8b 100644 --- a/pyperf/_system.py +++ b/pyperf/_system.py @@ -384,7 +384,7 @@ def write(self, tune): class LinuxScheduler(Operation): """ - Check isolcpus=cpus and rcu_nocbs=cpus paramaters of the Linux kernel + Check isolcpus=cpus and rcu_nocbs=cpus parameters of the Linux kernel command line. """ diff --git a/pyperf/_worker.py b/pyperf/_worker.py index 4fc83516..5a5e9896 100644 --- a/pyperf/_worker.py +++ b/pyperf/_worker.py @@ -288,7 +288,7 @@ def compute(self): else: self.compute_warmups_values() - # collect metatadata + # collect metadata metadata2 = self.collect_metadata() metadata2.update(self.metadata) self.metadata = metadata2