Skip to content

Commit

Permalink
Fix spelling errors
Browse files Browse the repository at this point in the history
  • Loading branch information
postlund committed Oct 16, 2023
1 parent 98348aa commit e9896fa
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions docs/api/pyatv.interface.html
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ <h3>Methods</h3>
<dl>
<dt id="pyatv.interface.AudioListener.outputdevices_update">
<code class="name flex">
<span>def <span class="ident">outputdevices_update</span></span>(<span>self, old_devices: List[<a title="pyatv.interface.OutputDevice" href="#pyatv.interface.OutputDevice">OutputDevice</a>], new_devices: List[<a title="pyatv.interface.OutputDevice" href="#pyatv.interface.OutputDevice">OutputDevice</a>])</span>
<span>def <span class="ident">outputdevices_update</span></span>(<span>self, old_devices: List[<a title="pyatv.interface.OutputDevice" href="#pyatv.interface.OutputDevice">OutputDevice</a>], new_devices: List[<a title="pyatv.interface.OutputDevice" href="#pyatv.interface.OutputDevice">OutputDevice</a>]) -> None</span>
</code>
</dt>
<dd>
Expand All @@ -727,7 +727,7 @@ <h3>Methods</h3>
</dd>
<dt id="pyatv.interface.AudioListener.volume_update">
<code class="name flex">
<span>def <span class="ident">volume_update</span></span>(<span>self, old_level: float, new_level: float)</span>
<span>def <span class="ident">volume_update</span></span>(<span>self, old_level: float, new_level: float) -> None</span>
</code>
</dt>
<dd>
Expand Down Expand Up @@ -1105,7 +1105,7 @@ <h3>Methods</h3>
</dd>
<dt id="pyatv.interface.Features.in_state">
<code class="name flex">
<span>def <span class="ident">in_state</span></span>(<span>self, states: Union[List[<a title="pyatv.const.FeatureState" href="../const#pyatv.const.FeatureState">FeatureState</a>], <a title="pyatv.const.FeatureState" href="../const#pyatv.const.FeatureState">FeatureState</a>], *feature_names: <a title="pyatv.const.FeatureName" href="../const#pyatv.const.FeatureName">FeatureName</a>)</span>
<span>def <span class="ident">in_state</span></span>(<span>self, states: Union[List[<a title="pyatv.const.FeatureState" href="../const#pyatv.const.FeatureState">FeatureState</a>], <a title="pyatv.const.FeatureState" href="../const#pyatv.const.FeatureState">FeatureState</a>], *feature_names: <a title="pyatv.const.FeatureName" href="../const#pyatv.const.FeatureName">FeatureName</a>) -> bool</span>
</code>
</dt>
<dd>
Expand Down Expand Up @@ -1224,7 +1224,7 @@ <h3>Methods</h3>
<dl>
<dt id="pyatv.interface.KeyboardListener.focusstate_update">
<code class="name flex">
<span>def <span class="ident">focusstate_update</span></span>(<span>self, old_state: <a title="pyatv.const.KeyboardFocusState" href="../const#pyatv.const.KeyboardFocusState">KeyboardFocusState</a>, new_state: <a title="pyatv.const.KeyboardFocusState" href="../const#pyatv.const.KeyboardFocusState">KeyboardFocusState</a>)</span>
<span>def <span class="ident">focusstate_update</span></span>(<span>self, old_state: <a title="pyatv.const.KeyboardFocusState" href="../const#pyatv.const.KeyboardFocusState">KeyboardFocusState</a>, new_state: <a title="pyatv.const.KeyboardFocusState" href="../const#pyatv.const.KeyboardFocusState">KeyboardFocusState</a>) -> None</span>
</code>
</dt>
<dd>
Expand Down Expand Up @@ -1657,7 +1657,7 @@ <h3>Methods</h3>
<dl>
<dt id="pyatv.interface.PowerListener.powerstate_update">
<code class="name flex">
<span>def <span class="ident">powerstate_update</span></span>(<span>self, old_state: <a title="pyatv.const.PowerState" href="../const#pyatv.const.PowerState">PowerState</a>, new_state: <a title="pyatv.const.PowerState" href="../const#pyatv.const.PowerState">PowerState</a>)</span>
<span>def <span class="ident">powerstate_update</span></span>(<span>self, old_state: <a title="pyatv.const.PowerState" href="../const#pyatv.const.PowerState">PowerState</a>, new_state: <a title="pyatv.const.PowerState" href="../const#pyatv.const.PowerState">PowerState</a>) -> None</span>
</code>
</dt>
<dd>
Expand Down
4 changes: 2 additions & 2 deletions docs/development/scan_pair_and_connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ pairing = await pyatv.pair(config, Protocol.DMAP)

# Connect

Connecting is simply done by passing a config to {% include api i="pyatv.conncet" %}:
Connecting is simply done by passing a config to {% include api i="pyatv.connect" %}:

```python
# Get a configuration with scan
Expand Down Expand Up @@ -296,7 +296,7 @@ It can however be convenient to have if you test things when developing pyatv
as you can shorten the feedback loop, since scanning can be avoided. But be warned.

A service is by default *enabled*, meaning that pyatv will try to connect to the
service when {% include api i="pyatv.conncet" %} is called. It is possible to add
service when {% include api i="pyatv.connect" %} is called. It is possible to add
a service but not connect to it by setting `enabled` to `False`:

```python
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ can because of that differ when scanning or connecting.

An important concept for pyatv is to be able to *uniquely* identify a device. You should be able to say: "I want to find and connect to *this* specific device" and pyatv should be able to do that for you. This of course means that you cannot use common identifiers, like IP-address or device name, as they can change at any time. And how many devices named "Living Room" aren't there in the world?

Instead, pyatv extracts *unique identifiers* from the different services it finds when scanning. You can then specify that you want to scan for a device with one of these identifiers and be sure that you find the device you expect. What is a unique identifier then? It can be anything, as long as it is unique of course. In case of `MRP`, it actually exposes a property called `UniqueIdentifer`. Looking at `AirPlay`, you can get the device MAC-address via a property called `deviceid`. In practice this means that a device has *multiple* identifiers and you can use *any* of them when scanning. There is a convencience property, {% include api i="conf.AppleTV.identifier" %}, used to get an identifier. It just picks one from all of the available.
Instead, pyatv extracts *unique identifiers* from the different services it finds when scanning. You can then specify that you want to scan for a device with one of these identifiers and be sure that you find the device you expect. What is a unique identifier then? It can be anything, as long as it is unique of course. In case of `MRP`, it actually exposes a property called `UniqueIdentifer`. Looking at `AirPlay`, you can get the device MAC-address via a property called `deviceid`. In practice this means that a device has *multiple* identifiers and you can use *any* of them when scanning. There is a convenience property, {% include api i="conf.AppleTV.identifier" %}, used to get an identifier. It just picks one from all of the available.

If you perform a scan with `atvremote`, you can see all the available identifiers:

Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/supported_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Music app in macOS.

## MRP

This protocol was introduced in tvOS and superseeds DMAP. It has the same features as well
This protocol was introduced in tvOS and superseds DMAP. It has the same features as well
as new ones, like notion of apps and game pad controls.

### Supported Features
Expand Down
2 changes: 1 addition & 1 deletion pyatv/protocols/mrp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async def start(self, skip_initial_messages: bool = False) -> None:
# send_and_receive will stop that propagation).
self.dispatch(protobuf.DEVICE_INFO_MESSAGE, self.device_info)

# This is a hack to support re-use of a protocol object in
# This is a hack to support reuse of a protocol object in
# proxy (will be removed/refactored later)
if skip_initial_messages:
return
Expand Down
4 changes: 2 additions & 2 deletions pyatv/protocols/raop/stream_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This is a "generic" client designed around how AirPlay works in regards to streaming.
The client uses an underlying "protocol" for protocol specific bits, i.e. to support
AirPlay v1 and/or v2. This is mainly for code re-use purposes.
AirPlay v1 and/or v2. This is mainly for code reuse purposes.
"""
from abc import ABC, abstractmethod
import asyncio
Expand Down Expand Up @@ -461,7 +461,7 @@ async def send_audio( # pylint: disable=too-many-branches
self._packet_backlog.clear() # Don't keep old packets around (big!)
if transport:
# TODO: Teardown should not be done here. In fact, nothing should be
# closed here since the connection should be re-usable for streaming
# closed here since the connection should be reusable for streaming
# more audio files. Refactor when support for that is added.
await self.rtsp.teardown(self.context.rtsp_session)
transport.close()
Expand Down
2 changes: 1 addition & 1 deletion pyatv/protocols/raop/timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def ntp2parts(ntp: int) -> Tuple[int, int]:


def ntp2ts(ntp: int, rate: int) -> int:
"""Comvert NTP time into timestamp."""
"""Convert NTP time into timestamp."""
return int((ntp >> 16) * rate) >> 16


Expand Down
2 changes: 1 addition & 1 deletion pyatv/support/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,5 +670,5 @@ async def http_server(
async def create_session(
session: Optional[ClientSession] = None,
) -> ClientSessionManager:
"""Create aiohttp ClientSession manged by pyatv."""
"""Create aiohttp ClientSession managed by pyatv."""
return ClientSessionManager(session or ClientSession(), session is None)
2 changes: 1 addition & 1 deletion pyatv/support/opack.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _pack(data, object_list):
else:
raise TypeError(str(type(data)))

# Re-use if in object list, otherwise add it to list
# Reuse if in object list, otherwise add it to list
if packed_bytes in object_list:
object_index = object_list.index(packed_bytes)
if object_index < 0x21:
Expand Down
2 changes: 1 addition & 1 deletion pyatv/support/rtsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async def auth_setup(self) -> HttpResponse:
)

# This method is only used by AirPlay 1 and is very specific (e.g. does not support
# annnouncing arbitrary audio formats) and should probably move to the AirPlay 1
# announcing arbitrary audio formats) and should probably move to the AirPlay 1
# specific RAOP implementation. It will however live here for now until something
# motivates that.
async def announce(
Expand Down
2 changes: 1 addition & 1 deletion tests/protocols/mrp/test_mrp_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ async def test_playing_app(self):
await self.playing(title="dummy2")
self.assertEqual(self.atv.metadata.app.name, DEMO_APP_NAME)

# Do not include display name and re-use previous one
# Do not include display name and reuse previous one
self.usecase.update_client(display_name=None)
self.usecase.change_metadata(title="dummy3")
await self.playing(title="dummy3")
Expand Down

0 comments on commit e9896fa

Please sign in to comment.