fix some typos (#138977)

This commit is contained in:
AN Long 2025-09-16 22:03:39 +09:00 committed by GitHub
parent a651ec9524
commit 6393068bde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 13 deletions

View file

@ -205,7 +205,7 @@ ## Per-thread current task
found, `None` is returned.
In free-threading, it avoids contention on a global dictionary as
threads can access the current task of thier running loop without any
threads can access the current task of their running loop without any
locking.
---

View file

@ -4887,7 +4887,7 @@ class Color(Enum):
def _generate_next_value_(name, start, count, last):
return name
def test_auto_order_wierd(self):
def test_auto_order_weird(self):
weird_auto = auto()
weird_auto.value = 'pathological case'
class Color(Enum):

View file

@ -26,7 +26,7 @@ class FloatNum(float, Enum):
NEG_INF = float('-inf')
NAN = float('nan')
class WierdNum(float, Enum):
class WeirdNum(float, Enum):
inf = INF
neg_inf = NEG_INF
nan = NAN
@ -40,7 +40,7 @@ def test_floats(self):
self.assertEqual(self.loads(self.dumps(enum)), enum)
def test_weird_floats(self):
for enum, expected in zip(WierdNum, ('Infinity', '-Infinity', 'NaN')):
for enum, expected in zip(WeirdNum, ('Infinity', '-Infinity', 'NaN')):
self.assertEqual(self.dumps(enum), expected)
if not isnan(enum):
self.assertEqual(float(self.dumps(enum)), enum)
@ -64,16 +64,16 @@ def test_list(self):
str([E, PI, TAU]))
self.assertEqual(self.loads(self.dumps(list(FloatNum))),
list(FloatNum))
self.assertEqual(self.dumps(list(WierdNum)),
self.assertEqual(self.dumps(list(WeirdNum)),
'[Infinity, -Infinity, NaN]')
self.assertEqual(self.loads(self.dumps(list(WierdNum)))[:2],
list(WierdNum)[:2])
self.assertTrue(isnan(self.loads(self.dumps(list(WierdNum)))[2]))
self.assertEqual(self.loads(self.dumps(list(WeirdNum)))[:2],
list(WeirdNum)[:2])
self.assertTrue(isnan(self.loads(self.dumps(list(WeirdNum)))[2]))
def test_dict_keys(self):
s, b, h, r = BigNum
e, p, t = FloatNum
i, j, n = WierdNum
i, j, n = WeirdNum
d = {
s:'tiny', b:'large', h:'larger', r:'largest',
e:"Euler's number", p:'pi', t:'tau',
@ -100,9 +100,9 @@ def test_dict_values(self):
e=FloatNum.e,
pi=FloatNum.pi,
tau=FloatNum.tau,
i=WierdNum.inf,
j=WierdNum.neg_inf,
n=WierdNum.nan,
i=WeirdNum.inf,
j=WeirdNum.neg_inf,
n=WeirdNum.nan,
)
nd = self.loads(self.dumps(d))
self.assertEqual(nd['tiny'], SMALL)

View file

@ -716,7 +716,7 @@ _zstd_ZstdCompressor_set_pledged_input_size_impl(ZstdCompressor *self,
unsigned long long size)
/*[clinic end generated code: output=3a09e55cc0e3b4f9 input=b4c87bcbd5ce6111]*/
{
// Error occured while converting argument, should be unreachable
// Error occurred while converting argument, should be unreachable
assert(size != ZSTD_CONTENTSIZE_ERROR);
/* Thread-safe code */