Skip to content

Commit

Permalink
cq: Fix issues with new black
Browse files Browse the repository at this point in the history
  • Loading branch information
postlund committed Feb 28, 2025
1 parent 1a23ed2 commit 9c221d1
Show file tree
Hide file tree
Showing 22 changed files with 506 additions and 325 deletions.
14 changes: 7 additions & 7 deletions docs/api/pyatv.conf.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="pyatv.conf.AirPlayService"><code class="flex name class">
<span>class <span class="ident">AirPlayService</span></span>
<span>(</span><span>identifier: Optional[str], port: int = 7000, credentials: Optional[str= None, properties: Optional[Mapping[str, str]] = None)</span>
<span>(</span><span>identifier: str | None, port: int = 7000, credentials: str | None = None, properties: Mapping[str, str] | None = None)</span>
</code></dt>
<dd>
<section class="desc"><p>Representation of an AirPlay service.</p>
Expand Down Expand Up @@ -97,7 +97,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="pyatv.conf.AppleTV"><code class="flex name class">
<span>class <span class="ident">AppleTV</span></span>
<span>(</span><span>address: ipaddress.IPv4Address, name: str, deep_sleep: bool = False, properties: Optional[Mapping[str, Mapping[str, str]]= None, device_info: Optional[<a title="pyatv.interface.DeviceInfo" href="../interface#pyatv.interface.DeviceInfo">DeviceInfo</a>] = None)</span>
<span>(</span><span>address: ipaddress.IPv4Address, name: str, deep_sleep: bool = False, properties: Mapping[str, Mapping[str, str]] | None = None, device_info: <a title="pyatv.interface.DeviceInfo" href="../interface#pyatv.interface.DeviceInfo">DeviceInfo</a> | None = None)</span>
</code></dt>
<dd>
<section class="desc"><p>Representation of a device configuration.</p>
Expand Down Expand Up @@ -135,7 +135,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="pyatv.conf.CompanionService"><code class="flex name class">
<span>class <span class="ident">CompanionService</span></span>
<span>(</span><span>port: int, credentials: Optional[str= None, properties: Optional[Mapping[str, str]] = None)</span>
<span>(</span><span>port: int, credentials: str | None = None, properties: Mapping[str, str] | None = None)</span>
</code></dt>
<dd>
<section class="desc"><p>Representation of a Companion link service.</p>
Expand Down Expand Up @@ -168,7 +168,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="pyatv.conf.DmapService"><code class="flex name class">
<span>class <span class="ident">DmapService</span></span>
<span>(</span><span>identifier: Optional[str], credentials: Optional[str], port: int = 3689, properties: Optional[Mapping[str, str]] = None)</span>
<span>(</span><span>identifier: str | None, credentials: str | None, port: int = 3689, properties: Mapping[str, str] | None = None)</span>
</code></dt>
<dd>
<section class="desc"><p>Representation of a DMAP service.</p>
Expand Down Expand Up @@ -201,7 +201,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="pyatv.conf.ManualService"><code class="flex name class">
<span>class <span class="ident">ManualService</span></span>
<span>(</span><span>identifier: Optional[str], protocol: <a title="pyatv.const.Protocol" href="../const#pyatv.const.Protocol">Protocol</a>, port: int, properties: Optional[Mapping[str, str]], credentials: Optional[str= None, password: Optional[str] = None, requires_password: bool = False, pairing_requirement: <a title="pyatv.const.PairingRequirement" href="../const#pyatv.const.PairingRequirement">PairingRequirement</a> = PairingRequirement.Unsupported, enabled: bool = True)</span>
<span>(</span><span>identifier: str | None, protocol: <a title="pyatv.const.Protocol" href="../const#pyatv.const.Protocol">Protocol</a>, port: int, properties: Mapping[str, str] | None, credentials: str | None = None, password: str | None = None, requires_password: bool = False, pairing_requirement: <a title="pyatv.const.PairingRequirement" href="../const#pyatv.const.PairingRequirement">PairingRequirement</a> = PairingRequirement.Unsupported, enabled: bool = True)</span>
</code></dt>
<dd>
<section class="desc"><p>Service used when manually creating and adding a service.</p>
Expand Down Expand Up @@ -240,7 +240,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="pyatv.conf.MrpService"><code class="flex name class">
<span>class <span class="ident">MrpService</span></span>
<span>(</span><span>identifier: Optional[str], port: int, credentials: Optional[str= None, properties: Optional[Mapping[str, str]] = None)</span>
<span>(</span><span>identifier: str | None, port: int, credentials: str | None = None, properties: Mapping[str, str] | None = None)</span>
</code></dt>
<dd>
<section class="desc"><p>Representation of a MediaRemote Protocol (MRP) service.</p>
Expand Down Expand Up @@ -273,7 +273,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="pyatv.conf.RaopService"><code class="flex name class">
<span>class <span class="ident">RaopService</span></span>
<span>(</span><span>identifier: Optional[str], port: int = 7000, credentials: Optional[str= None, password: Optional[str= None, properties: Optional[Mapping[str, str]] = None)</span>
<span>(</span><span>identifier: str | None, port: int = 7000, credentials: str | None = None, password: str | None = None, properties: Mapping[str, str] | None = None)</span>
</code></dt>
<dd>
<section class="desc"><p>Representation of an RAOP service.</p>
Expand Down
8 changes: 4 additions & 4 deletions docs/api/pyatv.const.html
Original file line number Diff line number Diff line change
Expand Up @@ -950,19 +950,19 @@ <h3>Class variables</h3>
<dl>
<dt id="pyatv.const.TouchAction.Click"><code class="name">var <span class="ident">Click</span> = 5</code></dt>
<dd>
<section class="desc"></section>
<section class="desc"><p>The type of the None singleton.</p></section>
</dd>
<dt id="pyatv.const.TouchAction.Hold"><code class="name">var <span class="ident">Hold</span> = 3</code></dt>
<dd>
<section class="desc"></section>
<section class="desc"><p>The type of the None singleton.</p></section>
</dd>
<dt id="pyatv.const.TouchAction.Press"><code class="name">var <span class="ident">Press</span> = 1</code></dt>
<dd>
<section class="desc"></section>
<section class="desc"><p>The type of the None singleton.</p></section>
</dd>
<dt id="pyatv.const.TouchAction.Release"><code class="name">var <span class="ident">Release</span> = 4</code></dt>
<dd>
<section class="desc"></section>
<section class="desc"><p>The type of the None singleton.</p></section>
</dd>
</dl>
</dd>
Expand Down
6 changes: 6 additions & 0 deletions docs/api/pyatv.convert.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</dt>
<dd>
<section class="desc"><p>Convert internal API device state to string.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/convert.py#L13-L23" class="git-link">Browse git</a></div>
</dd>
<dt id="pyatv.convert.media_type_str">
<code class="name flex">
Expand All @@ -57,6 +58,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</dt>
<dd>
<section class="desc"><p>Convert internal API media type to string.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/convert.py#L26-L33" class="git-link">Browse git</a></div>
</dd>
<dt id="pyatv.convert.model_str">
<code class="name flex">
Expand All @@ -65,6 +67,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</dt>
<dd>
<section class="desc"><p>Convert device model to string.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/convert.py#L65-L81" class="git-link">Browse git</a></div>
</dd>
<dt id="pyatv.convert.protocol_str">
<code class="name flex">
Expand All @@ -73,6 +76,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</dt>
<dd>
<section class="desc"><p>Convert internal API protocol to string.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/convert.py#L54-L62" class="git-link">Browse git</a></div>
</dd>
<dt id="pyatv.convert.repeat_str">
<code class="name flex">
Expand All @@ -81,6 +85,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</dt>
<dd>
<section class="desc"><p>Convert internal API repeat state to string.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/convert.py#L36-L42" class="git-link">Browse git</a></div>
</dd>
<dt id="pyatv.convert.shuffle_str">
<code class="name flex">
Expand All @@ -89,6 +94,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</dt>
<dd>
<section class="desc"><p>Convert internal API shuffle state to string.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/convert.py#L45-L51" class="git-link">Browse git</a></div>
</dd>
</dl>
</section>
Expand Down
1 change: 1 addition & 0 deletions docs/api/pyatv.exceptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ <h3>Instance variables</h3>
<dt id="pyatv.exceptions.HttpError.status_code"><code class="name">var <span class="ident">status_code</span> -> int</code></dt>
<dd>
<section class="desc"><p>Return status code that triggered the error.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/exceptions.py#L103-L106" class="git-link">Browse git</a></div>
</dd>
</dl>
</dd>
Expand Down
8 changes: 6 additions & 2 deletions docs/api/pyatv.helpers.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="pyatv.helpers.auto_connect">
<code class="name flex">
<span>async def <span class="ident">auto_connect</span></span>(<span>handler: Callable[[<a title="pyatv.interface.AppleTV" href="../interface#pyatv.interface.AppleTV">AppleTV</a>], None], timeout: int = 5, not_found: Optional[Callable[[], None]= None, loop: Optional[asyncio.events.AbstractEventLoop] = None) -> None</span>
<span>async def <span class="ident">auto_connect</span></span>(<span>handler: Callable[[<a title="pyatv.interface.AppleTV" href="../interface#pyatv.interface.AppleTV">AppleTV</a>], None], timeout: int = 5, not_found: Callable[[], None] | None = None, loop: asyncio.events.AbstractEventLoop | None = None) -> None</span>
</code>
</dt>
<dd>
Expand All @@ -52,10 +52,11 @@ <h2 class="section-title" id="header-functions">Functions</h2>
optional error handler can be provided that is called when no device was found.
Very inflexible in many cases, but can be handys sometimes when trying things.</p>
<p>Note: both handler and not_found must be coroutines</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/helpers.py#L19-L51" class="git-link">Browse git</a></div>
</dd>
<dt id="pyatv.helpers.get_unique_id">
<code class="name flex">
<span>def <span class="ident">get_unique_id</span></span>(<span>service_type: str, service_name: str, properties: Mapping[str, str]) -> Optional[str]</span>
<span>def <span class="ident">get_unique_id</span></span>(<span>service_type: str, service_name: str, properties: Mapping[str, str]) -> str | None</span>
</code>
</dt>
<dd>
Expand All @@ -64,6 +65,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<code>service_name</code> name of the service (e.g. <em>Office</em> or <em>Living Room</em>) and
<code>properties</code> all key-value properties belonging to the service.</p>
<p>The unique identifier is returned if available, otherwise <code>None</code> is returned.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/helpers.py#L54-L87" class="git-link">Browse git</a></div>
</dd>
<dt id="pyatv.helpers.is_device_supported">
<code class="name flex">
Expand All @@ -76,6 +78,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
PairingRequirement.Unsupported or PairingRequirement.Disabled. In all other cases
it will return True. Do note that even if this method returns True, pairing (or
that existing credentials are provided) might still be needed.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/helpers.py#L105-L122" class="git-link">Browse git</a></div>
</dd>
<dt id="pyatv.helpers.is_streamable">
<code class="name flex">
Expand All @@ -87,6 +90,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<p>This method will return if the file format of the given file is supported
and streamable by pyatv. It will never raise an exception, e.g. because the
file is missing or lack of permissions.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/helpers.py#L90-L102" class="git-link">Browse git</a></div>
</dd>
</dl>
</section>
Expand Down
9 changes: 6 additions & 3 deletions docs/api/pyatv.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,29 +83,32 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="pyatv.connect">
<code class="name flex">
<span>async def <span class="ident">connect</span></span>(<span>config: <a title="pyatv.interface.BaseConfig" href="../interface#pyatv.interface.BaseConfig">BaseConfig</a>, loop: asyncio.events.AbstractEventLoop, protocol: Optional[<a title="pyatv.const.Protocol" href="../const#pyatv.const.Protocol">Protocol</a>= None, session: Optional[aiohttp.client.ClientSession= None, storage: Optional[<a title="pyatv.interface.Storage" href="../interface#pyatv.interface.Storage">Storage</a>] = None) -> <a title="pyatv.interface.AppleTV" href="../interface#pyatv.interface.AppleTV">AppleTV</a></span>
<span>async def <span class="ident">connect</span></span>(<span>config: <a title="pyatv.interface.BaseConfig" href="../interface#pyatv.interface.BaseConfig">BaseConfig</a>, loop: asyncio.events.AbstractEventLoop, protocol: <a title="pyatv.const.Protocol" href="../const#pyatv.const.Protocol">Protocol</a> | None = None, session: aiohttp.client.ClientSession | None = None, storage: <a title="pyatv.interface.Storage" href="../interface#pyatv.interface.Storage">Storage</a> | None = None) -> <a title="pyatv.interface.AppleTV" href="../interface#pyatv.interface.AppleTV">AppleTV</a></span>
</code>
</dt>
<dd>
<section class="desc"><p>Connect to a device based on a configuration.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/__init__.py#L101-L159" class="git-link">Browse git</a></div>
</dd>
<dt id="pyatv.pair">
<code class="name flex">
<span>async def <span class="ident">pair</span></span>(<span>config: <a title="pyatv.interface.BaseConfig" href="../interface#pyatv.interface.BaseConfig">BaseConfig</a>, protocol: <a title="pyatv.const.Protocol" href="../const#pyatv.const.Protocol">Protocol</a>, loop: asyncio.events.AbstractEventLoop, session: aiohttp.client.ClientSession = None, storage: Optional[<a title="pyatv.interface.Storage" href="../interface#pyatv.interface.Storage">Storage</a>] = None, **kwargs) -> <a title="pyatv.interface.PairingHandler" href="../interface#pyatv.interface.PairingHandler">PairingHandler</a></span>
<span>async def <span class="ident">pair</span></span>(<span>config: <a title="pyatv.interface.BaseConfig" href="../interface#pyatv.interface.BaseConfig">BaseConfig</a>, protocol: <a title="pyatv.const.Protocol" href="../const#pyatv.const.Protocol">Protocol</a>, loop: asyncio.events.AbstractEventLoop, session: aiohttp.client.ClientSession = None, storage: <a title="pyatv.interface.Storage" href="../interface#pyatv.interface.Storage">Storage</a> | None = None, **kwargs) -> <a title="pyatv.interface.PairingHandler" href="../interface#pyatv.interface.PairingHandler">PairingHandler</a></span>
</code>
</dt>
<dd>
<section class="desc"><p>Pair a protocol for an Apple TV.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/__init__.py#L162-L196" class="git-link">Browse git</a></div>
</dd>
<dt id="pyatv.scan">
<code class="name flex">
<span>async def <span class="ident">scan</span></span>(<span>loop: asyncio.events.AbstractEventLoop, timeout: int = 5, identifier: Union[strSet[str], ForwardRef(None)] = None, protocol: Union[<a title="pyatv.const.Protocol" href="../const#pyatv.const.Protocol">Protocol</a>Set[<a title="pyatv.const.Protocol" href="../const#pyatv.const.Protocol">Protocol</a>], ForwardRef(None)] = None, hosts: Optional[List[str]= None, aiozc: Optional[zeroconf.asyncio.AsyncZeroconf= None, storage: Optional[<a title="pyatv.interface.Storage" href="../interface#pyatv.interface.Storage">Storage</a>] = None) -> List[<a title="pyatv.interface.BaseConfig" href="../interface#pyatv.interface.BaseConfig">BaseConfig</a>]</span>
<span>async def <span class="ident">scan</span></span>(<span>loop: asyncio.events.AbstractEventLoop, timeout: int = 5, identifier: str | Set[str] | None = None, protocol: <a title="pyatv.const.Protocol" href="../const#pyatv.const.Protocol">Protocol</a> | Set[<a title="pyatv.const.Protocol" href="../const#pyatv.const.Protocol">Protocol</a>] | None = None, hosts: List[str] | None = None, aiozc: zeroconf.asyncio.AsyncZeroconf | None = None, storage: <a title="pyatv.interface.Storage" href="../interface#pyatv.interface.Storage">Storage</a> | None = None) -> List[<a title="pyatv.interface.BaseConfig" href="../interface#pyatv.interface.BaseConfig">BaseConfig</a>]</span>
</code>
</dt>
<dd>
<section class="desc"><p>Scan for Apple TVs on network and return their configurations.</p>
<p>When passing in an aiozc instance, a ServiceBrowser must
be running for all the types in the protocols that being scanned for.</p></section>
<div class="git-link-div"><a href="https://github.com/postlund/pyatv/blob/master/pyatv/__init__.py#L33-L98" class="git-link">Browse git</a></div>
</dd>
</dl>
</section>
Expand Down
Loading

0 comments on commit 9c221d1

Please sign in to comment.