Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lang/fr/typeshed/stdlib/microbit/uart.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For more details see `the online documentation <https://microbit-micropython.rea
...

def any() -> bool:
"""Check if any data is waiting.
"""Vérifie si une donnée est en attente.

Example: ``uart.any()``

Expand Down
6 changes: 3 additions & 3 deletions lang/zh-tw/typeshed/stdlib/gc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ def collect() -> None:
...

def mem_alloc() -> int:
"""獲取分配的堆積 RAM 的位元組。 (記憶體分配)
"""取得分配的堆積 RAM 的位元組。 (記憶體分配)

:return: The number of bytes allocated.

This function is MicroPython extension."""
...

def mem_free() -> int:
"""獲取可用堆積 RAM 的位元組,如果此數量未知,則為 -1。
"""取得可用堆積 RAM 的位元組,如果此數量未知,則為 -1。

:return: The number of bytes free.

Expand All @@ -33,7 +33,7 @@ This function is MicroPython extension."""

@overload
def threshold() -> int:
"""查詢額外的GC分配閾值
"""查詢其他 GC 分配閾值

:return: The GC allocation threshold.

Expand Down
28 changes: 14 additions & 14 deletions lang/zh-tw/typeshed/stdlib/log.pyi
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
"""將資料記錄到您的 micro:bit V2。"""
from typing import Literal, Optional, Union, overload
MILLISECONDS = 1
"""毫秒時間郵戳格式。"""
"""毫秒時間戳記格式。"""
SECONDS = 10
"""秒時間郵戳格式。"""
"""秒時間戳記格式。"""
MINUTES = 600
"""分鐘時間郵戳格式"""
"""分鐘時間戳記格式"""
HOURS = 36000
"""小時時間郵戳格式。"""
"""小時時間戳記格式。"""
DAYS = 864000
"""天時間郵戳格式。"""
"""天時間戳記格式。"""

def set_labels(*args: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None:
"""設定記錄檔案標頭
"""設定紀錄檔案標頭

Example: ``log.set_labels('x', 'y', 'z', timestamp=log.MINUTES)``

Expand All @@ -24,9 +24,9 @@ labels set up by this function call to the last headers declared in the
file. If the headers are different it will add a new header entry at the
end of the file.

:param *args: 各記錄標頭的位置引數
:param *args: 各紀錄標頭的位置引數
:param timestamp: (時間戳記) 將自動新增為每列第一行的時間郵戳單元。
將此引數設定為 ``None``,則會停用時間郵戳。傳遞此模組定義的 ``log.MILLISECONDS``、``log.SECONDS``、``log.MINUTES``、``log.HOURS`` 或 ``log.DAYS`` 值。無效值將擲回例外狀況。"""
將此引數設定為 ``None``,則會停用時間戳記。傳遞此模組定義的 ``log.MILLISECONDS``、``log.SECONDS``、``log.MINUTES``、``log.HOURS`` 或 ``log.DAYS`` 值。無效值將擲回例外狀況。"""
...

@overload
Expand All @@ -44,12 +44,12 @@ entry to be added to the log with the extra label.
Labels previously specified and not present in this function call will be
skipped with an empty value in the log row.

:param log_data: 若要記錄為字典的資料,每個標頭都有一個金鑰。"""
:param log_data: 若要記錄為字典的資料,每個標頭都有一把金鑰。"""
...

@overload
def add(**kwargs: Union[str, int, float]) -> None:
"""使用關鍵字引數將資料行新增至紀錄中
"""使用關鍵字引數,將資料列新增至紀錄中

Example: ``log.add(temp=temperature())``

Expand All @@ -71,16 +71,16 @@ Example: ``log.delete()``
To add the log headers the ``set_labels`` function has to be called again
after this.

:param full: 選擇從快取記憶體中刪除資料的「完整」抹除格式
如果設定為 ``False`` 則會使用「快速」方法,該方法會使資料無效,而不是執行較慢的完全抹除。"""
:param full: 選擇從快閃存放裝置中移除資料的「完全」清除格式
如果設定為 ``False``則會使用「快速」方法,該方法會使資料無效,而不是執行較慢的完全清除。"""
...

def set_mirroring(serial: bool):
"""將資料記錄活動鏡像到序列輸出
"""將資料紀錄活動鏡像到序列輸出

Example: ``log.set_mirroring(True)``

Mirroring is disabled by default.

:param serial: 傳遞 ``True`` 將資料記錄活動鏡像到序列輸出,``False`` 則停用鏡像。"""
:param serial: 傳遞 ``True`` 將資料紀錄活動鏡像到序列輸出,``False`` 則停用鏡像。"""
...
6 changes: 3 additions & 3 deletions lang/zh-tw/typeshed/stdlib/machine.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from typing import Any
from .microbit import MicroBitDigitalPin

def unique_id() -> bytes:
"""取得具有板的唯一識別碼之位元組字串
"""取得具有開發板的唯一識別碼之位元組字串

Example: ``machine.unique_id()``

Expand Down Expand Up @@ -40,7 +40,7 @@ def enable_irq(state: Any) -> None:

Example: ``machine.enable_irq(interrupt_state)``

:param state: 從最近一次叫用 ``disable_irq`` 函式傳回的值。"""
:param state: 從最近一次呼叫 ``disable_irq`` 函式傳回的值。"""
...

def time_pulse_us(pin: MicroBitDigitalPin, pulse_level: int, timeout_us: int=1000000) -> int:
Expand All @@ -56,7 +56,7 @@ starts straight away.

:param pin: (引腳) 要使用的引腳
:param pulse_level: 0 到計時低脈衝或 1 到計時高脈衝
:param timeout_us: 微秒超時
:param timeout_us: 微秒逾時
:return: The duration of the pulse in microseconds, or -1 for a timeout waiting for the level to match ``pulse_level``, or -2 on timeout waiting for the pulse to end"""
...

Expand Down
14 changes: 7 additions & 7 deletions lang/zh-tw/typeshed/stdlib/math.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Example: ``math.acos(1)``
...

def asin(x: float) -> float:
"""計算反正弦值
"""計算反正弦

Example: ``math.asin(0)``

Expand Down Expand Up @@ -39,7 +39,7 @@ Example: ``math.atan2(0, -1)``
...

def ceil(x: float) -> float:
"""將數字向正無限大捨入
"""將數字向正無限大四捨五入

Example: ``math.ceil(0.1)``

Expand Down Expand Up @@ -94,7 +94,7 @@ Example: ``math.fabs(-0.1)``
...

def floor(x: float) -> int:
"""將數字向負無限大捨入
"""將數字向負無限大四捨五入

Example: ``math.floor(0.9)``

Expand Down Expand Up @@ -125,7 +125,7 @@ the relation ``0.5 <= abs(m) < 1`` holds.
...

def isfinite(x: float) -> bool:
"""檢查值是否是有限的
"""檢查值是否為有限

Example: ``math.isfinite(float('inf'))``

Expand All @@ -134,7 +134,7 @@ Example: ``math.isfinite(float('inf'))``
...

def isinf(x: float) -> bool:
"""檢查值是否是無限的
"""檢查值是否為無限

Example: ``math.isinf(float('-inf'))``

Expand All @@ -143,7 +143,7 @@ Example: ``math.isinf(float('-inf'))``
...

def isnan(x: float) -> bool:
"""檢查值是否不是數字 (NaN)。
"""檢查值是否為非數字 (NaN)。

Example: ``math.isnan(float('nan'))``

Expand Down Expand Up @@ -233,7 +233,7 @@ Example: ``math.tan(0)``
...

def trunc(x: float) -> int:
"""將數字向 0 舍入
"""將數字向 0 四捨五入

Example: ``math.trunc(-0.9)``

Expand Down
Loading