Skip to content

Commit

Permalink
Merge pull request #126 from PagerDuty/v5.1.3-docstring-lint
Browse files Browse the repository at this point in the history
v5.1.3: Fix linter errors for docstring splat operator escape sequences
  • Loading branch information
Deconstrained authored Nov 15, 2023
2 parents 4e94b2b + f540da3 commit 34ab51d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 24 deletions.
23 changes: 15 additions & 8 deletions docs/module_reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ <h2>API Client Classes<a class="headerlink" href="#api-client-classes" title="Pe
post or delete.</p></li>
<li><p><strong>url</strong> (<em>str</em>) – The path/URL to request. If it does not start with the base URL, the
base URL will be prepended.</p></li>
<li><p><strong>**kwargs</strong> – Additional keyword arguments to pass to <a class="reference external" href="https://docs.python-requests.org/en/master/">Requests</a></p></li>
<li><p><strong>**kwargs</strong><p>Custom keyword arguments to pass to <code class="docutils literal notranslate"><span class="pre">requests.Session.request</span></code>.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
Expand Down Expand Up @@ -547,7 +548,8 @@ <h2>API Client Classes<a class="headerlink" href="#api-client-classes" title="Pe
<li><p><strong>resource</strong> (<em>str</em><em> or </em><em>dict</em>) – The path/URL to which to send the request, or a dict object
representing an API resource that contains an item with key <code class="docutils literal notranslate"><span class="pre">self</span></code>
whose value is the URL of the resource.</p></li>
<li><p><strong>**kw</strong> – Keyword arguments to pass to <code class="docutils literal notranslate"><span class="pre">requests.Session.delete</span></code></p></li>
<li><p><strong>**kw</strong><p>Custom keyword arguments to pass to <code class="docutils literal notranslate"><span class="pre">requests.Session.delete</span></code></p>
</p></li>
</ul>
</dd>
</dl>
Expand All @@ -565,7 +567,8 @@ <h2>API Client Classes<a class="headerlink" href="#api-client-classes" title="Pe
<li><p><strong>resource</strong> (<em>str</em><em> or </em><em>dict</em>) – The path/URL to which to send the request, or a dict object
representing an API resource that contains an item with key <code class="docutils literal notranslate"><span class="pre">self</span></code>
whose value is the URL of the resource.</p></li>
<li><p><strong>**kw</strong> – Keyword arguments to pass to <code class="docutils literal notranslate"><span class="pre">requests.Session.get</span></code></p></li>
<li><p><strong>**kw</strong><p>Custom keyword arguments to pass to <code class="docutils literal notranslate"><span class="pre">requests.Session.get</span></code></p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
Expand All @@ -587,7 +590,8 @@ <h2>API Client Classes<a class="headerlink" href="#api-client-classes" title="Pe
<dd class="field-odd"><ul class="simple">
<li><p><strong>path</strong> (<em>str</em>) – The path/URL to which to send the POST request, which should be an
index endpoint.</p></li>
<li><p><strong>**kw</strong> – Keyword arguments to pass to <code class="docutils literal notranslate"><span class="pre">requests.Session.post</span></code></p></li>
<li><p><strong>**kw</strong><p>Custom keyword arguments to pass to <code class="docutils literal notranslate"><span class="pre">requests.Session.post</span></code></p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
Expand All @@ -610,7 +614,8 @@ <h2>API Client Classes<a class="headerlink" href="#api-client-classes" title="Pe
<li><p><strong>resource</strong> – The path/URL to which to send the request, or a dict object
representing an API resource that contains an item with key <code class="docutils literal notranslate"><span class="pre">self</span></code>
whose value is the URL of the resource.</p></li>
<li><p><strong>**kw</strong> – Keyword arguments to pass to <code class="docutils literal notranslate"><span class="pre">requests.Session.put</span></code></p></li>
<li><p><strong>**kw</strong><p>Custom keyword arguments to pass to <code class="docutils literal notranslate"><span class="pre">requests.Session.put</span></code></p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
Expand Down Expand Up @@ -719,8 +724,9 @@ <h2>API Client Classes<a class="headerlink" href="#api-client-classes" title="Pe
or resolve.</p></li>
<li><p><strong>dedup_key</strong> (<em>str</em>) – The deduplication key; used for determining event uniqueness and
associating actions with existing incidents.</p></li>
<li><p><strong>**properties</strong> – Additional properties to set, i.e. if <code class="docutils literal notranslate"><span class="pre">action</span></code> is <code class="docutils literal notranslate"><span class="pre">trigger</span></code>
this would include <code class="docutils literal notranslate"><span class="pre">payload</span></code></p></li>
<li><p><strong>**properties</strong><p>Additional properties to set, i.e. if <code class="docutils literal notranslate"><span class="pre">action</span></code> is <code class="docutils literal notranslate"><span class="pre">trigger</span></code>
this would include <code class="docutils literal notranslate"><span class="pre">payload</span></code>.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
Expand Down Expand Up @@ -781,7 +787,8 @@ <h2>API Client Classes<a class="headerlink" href="#api-client-classes" title="Pe
<p>See: <a class="reference external" href="https://developer.pagerduty.com/docs/events-api-v2/send-change-events/">https://developer.pagerduty.com/docs/events-api-v2/send-change-events/</a></p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>**properties</strong> – Properties to set, i.e. <code class="docutils literal notranslate"><span class="pre">payload</span></code> and <code class="docutils literal notranslate"><span class="pre">links</span></code></p>
<dd class="field-odd"><p><strong>**properties</strong><p>Properties to set, i.e. <code class="docutils literal notranslate"><span class="pre">payload</span></code> and <code class="docutils literal notranslate"><span class="pre">links</span></code></p>
</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The response ID</p>
Expand Down
Binary file modified docs/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions pdpyras.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,8 +1084,8 @@ def request(self, method, url, **kwargs):
:param url:
The path/URL to request. If it does not start with the base URL, the
base URL will be prepended.
:param \*\*kwargs:
Additional keyword arguments to pass to `Requests`_
:param **kwargs:
Custom keyword arguments to pass to ``requests.Session.request``.
:type method: str
:type url: str
:returns: the HTTP response object
Expand Down Expand Up @@ -1301,9 +1301,9 @@ def send_event(self, action, dedup_key=None, **properties):
:param dedup_key:
The deduplication key; used for determining event uniqueness and
associating actions with existing incidents.
:param \*\*properties:
:param **properties:
Additional properties to set, i.e. if ``action`` is ``trigger``
this would include ``payload``
this would include ``payload``.
:type action: str
:type dedup_key: str
:returns:
Expand Down Expand Up @@ -1450,7 +1450,7 @@ def send_change_event(self, **properties):
See: https://developer.pagerduty.com/docs/events-api-v2/send-change-events/
:param \*\*properties:
:param **properties:
Properties to set, i.e. ``payload`` and ``links``
:returns:
The response ID
Expand Down Expand Up @@ -2017,8 +2017,8 @@ def rdelete(self, resource, **kw) -> requests.Response:
The path/URL to which to send the request, or a dict object
representing an API resource that contains an item with key ``self``
whose value is the URL of the resource.
:param \*\*kw:
Keyword arguments to pass to ``requests.Session.delete``
:param **kw:
Custom keyword arguments to pass to ``requests.Session.delete``
:type resource: str or dict
"""
return self.delete(resource, **kw)
Expand All @@ -2036,8 +2036,8 @@ def rget(self, resource, **kw):
The path/URL to which to send the request, or a dict object
representing an API resource that contains an item with key ``self``
whose value is the URL of the resource.
:param \*\*kw:
Keyword arguments to pass to ``requests.Session.get``
:param **kw:
Custom keyword arguments to pass to ``requests.Session.get``
:returns:
Dictionary representation of the object.
:type resource: str or dict
Expand All @@ -2055,8 +2055,8 @@ def rpost(self, path, **kw):
:param path:
The path/URL to which to send the POST request, which should be an
index endpoint.
:param \*\*kw:
Keyword arguments to pass to ``requests.Session.post``
:param **kw:
Custom keyword arguments to pass to ``requests.Session.post``
:returns:
Dictionary representation of the created object
:type path: str
Expand All @@ -2076,8 +2076,8 @@ def rput(self, resource, **kw):
The path/URL to which to send the request, or a dict object
representing an API resource that contains an item with key ``self``
whose value is the URL of the resource.
:param \*\*kw:
Keyword arguments to pass to ``requests.Session.put``
:param **kw:
Custom keyword arguments to pass to ``requests.Session.put``
:returns:
Dictionary representation of the updated object
:rtype: dict
Expand Down
4 changes: 2 additions & 2 deletions sphinx/source/module_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ URL Handling
URL related functions.

.. automodule:: pdpyras
:members: canonical_path, endpoint_matches, is_path_param, normalize_url, tokenize_url_path
:members: canonical_path, endpoint_matches, is_path_param, normalize_url

Entity Wrapping
***************
Expand All @@ -66,7 +66,7 @@ of `requests.Session`_, i.e. that would otherwise return a `requests.Response`_
object.

.. automodule:: pdpyras
:members: auto_json, requires_success, resource_envelope, resource_url, wrapped_entities
:members: auto_json, requires_success, resource_url, wrapped_entities

Helpers
*******
Expand Down

0 comments on commit 34ab51d

Please sign in to comment.