Skip to content

Commit

Permalink
Fix lint issues (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrslev committed Apr 6, 2023
1 parent b3ae8d1 commit e1f7bae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/apps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Example on how you would obtain the access token for authenticating as a GitHub
**private_key** is the content of the GitHub App's private key (``.PEM`` format) file.

It returns the response from GitHub's
`Authenticating as an installation <https://docs.github.com/en/free-pro-team@latest/developers/apps/authenticating-with-github-apps#authenticating-as-an-installation>`_ API endpoint.
`Authenticating as an installation <https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app#authentication-as-an-app-installation>`_ API endpoint.


.. function:: get_jwt(*, app_id, private_key)
Expand Down
6 changes: 3 additions & 3 deletions docs/sansio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ by helping to automate the GitHub-specific aspects of a REST call.
authenticated request.

The *jwt* allows making an authenticated request as a `GitHub App
<https://docs.github.com/en/free-pro-team@latest/developers/apps/authenticating-with-github-apps#authenticating-as-a-github-app>`_.
<https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app#authentication-as-a-github-app>`_.
You can pass only one: *oauth_token* or *jwt*, but not both.

``ValueError`` will be raised if both *jwt* and *oauth_token* are supplied.
Expand Down Expand Up @@ -229,10 +229,10 @@ that are provided to you. Continuing from the example in the Requests_ section::
based on what the response specified.

The last item of the tuple is the URL where to request the
`next set of results <https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#pagination>`_.
`next set of results <https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=latest#hypermedia>`_.
If there are no more results then ``None`` is returned. Do be aware
that the URL
`can be a URI template <https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#link-header>`_
`can be a URI template <https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=latest#hypermedia>`_
and so it may need to be expanded.

If the status code is anything other than ``200``, ``201``, or ``204``,
Expand Down
11 changes: 3 additions & 8 deletions tests/test_abc.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import asyncio
import datetime
import http
import json
import re
import types

import importlib_resources
import pytest
Expand All @@ -13,20 +10,18 @@
GitHubBroken,
GraphQLAuthorizationFailure,
GraphQLException,
GraphQLResponseTypeError,
QueryError,
RedirectionException,
GraphQLResponseTypeError,
sansio,
)
from gidgethub import abc as gh_abc
from gidgethub import sansio
from gidgethub.abc import JSON_UTF_8_CHARSET

from .samples import GraphQL as graphql_samples

from gidgethub.abc import JSON_UTF_8_CHARSET


class MockGitHubAPI(gh_abc.GitHubAPI):

DEFAULT_HEADERS = {
"x-ratelimit-limit": "2",
"x-ratelimit-remaining": "1",
Expand Down

0 comments on commit e1f7bae

Please sign in to comment.