10000 [pre-commit.ci] auto fixes from pre-commit.com hooks · sigmavirus24/github3.py@8c1791c · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c1791c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4d74aca commit 8c1791c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+89
-61
lines changed

src/github3/__about__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The module that holds much of the metadata about github3.py."""
2+
23
__package_name__ = "github3.py"
34
__title__ = "github3"
45
__author__ = "Ian Stapleton Cordasco"

src/github3/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:license: Modified BSD, see LICENSE for more details
99
1010
"""
11+
1112
from .__about__ import __author__
1213
from .__about__ import __author_email__
1314
from .__about__ import __copyright__

src/github3/api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
:license: Modified BSD, see LICENSE for more details
77
88
"""
9+
910
from .github import GitHub
1011
from .github import GitHubEnterprise
1112

src/github3/apps.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
https://developer.github.com/apps/building-github-apps/
44
"""
5+
56
import time
67

78
import jwt

src/github3/auths.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the Authorization object."""
2+
23
from .decorators import requires_basic_auth
34
from .models import GitHubCore
45

src/github3/checks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains all the classes relating to Checks."""
2+
23
from json import dumps
34

45
from . import decorators

src/github3/decorators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module provides decorators to the rest of the library."""
2+
23
import os
34
from functools import wraps
45
from io import BytesIO as StringIO

src/github3/events.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the classes related to Events."""
2+
23
import copy
34

45
from . import models

src/github3/gists/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
1313
See also: http://developer.github.com/v3/gists/
1414
"""
15+
1516
from .gist import Gist
1617
from .gist import ShortGist
1718

src/github3/gists/comment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing the logic for a GistComment."""
2+
23
from .. import decorators
34
from .. import models
45
from .. import users

src/github3/gists/file.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing the GistFile object."""
2+
23
from .. import models
34

45

src/github3/gists/gist.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the Gist, ShortGist, and GistFork objects."""
2+
23
import typing as t
34
from json import dumps
45

src/github3/gists/history.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing the GistHistory object."""
2+
23
from .. import models
34
from .. import users
45

src/github3/git.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
See also: http://developer.github.com/v3/git/
55
"""
6+
67
import base64
78
from json import dumps
89

src/github3/github.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the main interfaces to the API."""
2+
23
import json
34
import re
45
import typing as t

src/github3/issues/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
77
See also: http://developer.github.com/v3/issues/
88
"""
9+
910
from ..utils import timestamp_parameter
1011
from .issue import Issue
1112
from .issue import ShortIssue

src/github3/issues/comment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module with class(es) representing issue comments."""
2+
23
from .. import decorators
34
from .. import models
45
from .. import users

src/github3/issues/event.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Issue events logic."""
2+
23
from .. import users
34
from ..models import GitHubCore
45

src/github3/issues/issue.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing the Issue logic."""
2+
23
from json import dumps
34

45
from uritemplate import URITemplate # type: ignore

src/github3/issues/label.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing the logic for labels."""
2+
23
from json import dumps
34

45
from ..decorators import requires_auth

src/github3/licenses.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
See also: https://developer.github.com/v3/licenses/
55
"""
6+
67
import base64
78

89
from . import models

src/github3/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module provides the basic models used in github3.py."""
2+
23
import json as jsonlib
34
import logging
45
import typing as t

src/github3/notifications.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
See also: http://developer.github.com/v3/activity/notifications/
55
"""
6+
67
from json import dumps
78

89
from . import models

src/github3/orgs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains all of the classes related to organizations."""
2+
23
import typing as t
34
from json import dumps
45

src/github3/projects.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains all the classes relating to projects."""
2+
23
from json import dumps
34

45
from . import exceptions

src/github3/pulls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains all the classes relating to pull requests."""
2+
23
from json import dumps
34

45
from uritemplate import URITemplate # type: ignore

src/github3/repos/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
77
See also: http://developer.github.com/v3/repos/
88
"""
9+
910
from .repo import Repository
1011
from .repo import ShortRepository
1112
from .repo import StarredRepository

src/github3/repos/branch.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Implementation of a branch on a repository."""
2+
23
import typing as t
34

45
from . import commit
@@ -153,9 +154,9 @@ def protect(
153154
if allow_deletions is not None:
154155
edit["allow_deletions"] = allow_deletions
155156
if required_conversation_resolution is not None:
156-
edit[
157-
"required_conversation_resolution"
158-
] = required_conversation_resolution
157+
edit["required_conversation_resolution"] = (
158+
required_conversation_resolution
159+
)
159160
url = self._build_url("protection", base_url=self._api)
160161
resp = self._put(url, json=edit)
161162
json = self._json(resp, 200)

src/github3/repos/comment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the RepoComment class."""
2+
23
from .. import models
34
from .. import users
45
from ..decorators import requires_auth

src/github3/repos/commit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the RepoCommit classes."""
2+
23
from . import status
34
from .. import checks
45
from .. import git

src/github3/repos/comparison.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the Comparison object."""
2+
23
from . import commit
34
from .. import models
45

src/github3/repos/contents.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the Contents object."""
2+
23
from base64 import b64decode
34
from base64 import b64encode
45
from json import dumps

src/github3/repos/deployment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The module containing deployment logic."""
2+
23
from .. import users
34
from ..models import GitHubCore
45

src/github3/repos/hook.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains only the Hook object for GitHub's Hook API."""
2+
23
from json import dumps
34

45
from ..decorators import requires_auth

src/github3/repos/invitation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Invitation related logic."""
2+
23
from json import dumps
34

45
from .. import models

src/github3/repos/issue_import.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the logic for GitHub's import issue API."""
2+
23
from .. import models
34

45

src/github3/repos/pages.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""GitHub Pages related logic."""
2+
23
from .. import models
34

45

src/github3/repos/release.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Release logic for the GitHub API."""
2+
23
import json
34

45
from uritemplate import URITemplate # type: ignore

src/github3/repos/repo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
returned by GitHub.
55
66
"""
7+
78
import base64
89
import json as jsonlib
910

src/github3/repos/stats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Repository and contributor stats logic."""
2+
23
import datetime
34

45
import dateutil.tz

src/github3/repos/status.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the Status object for GitHub's commit status API."""
2+
23
from .. import models
34
from .. import users
45
from ..models import GitHubCore

src/github3/repos/tag.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains the RepoTag object for GitHub's tag API."""
2+
23
from . import commit
34
from .. import models
45

src/github3/repos/topics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Topics related logic."""
2+
23
from .. import models
34

45

src/github3/repos/traffic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Repository traffic stats logic."""
2+
23
from .. import models
34

45

src/github3/search/code.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Code search results implementation."""
2+
23
from .. import models
34
from .. import repos
45

src/github3/search/commit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Commit search results implementation."""
2+
23
from .. import git
34
from .. import models
45
from .. import repos

src/github3/search/issue.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Issue search results implementation."""
2+
23
from ..issues import ShortIssue
34
from ..models import GitHubCore
45

src/github3/search/repository.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Repository search results implementation."""
2+
23
from .. import models
34
from .. import repos
45

src/github3/session.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing session and auth logic."""
2+
23
import collections.abc as abc_collections
34
import datetime
45
from contextlib import contextmanager

src/github3/structs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ def next(self) -> models.GitHubCore:
157157

158158

159159
class SearchIterator(GitHubIterator):
160-
161160
"""This is a special-cased class for returning iterable search results.
162161
163162
It inherits from :class:`GitHubIterator <github3.structs.GitHubIterator>`.

src/github3/users.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module contains everything relating to Users."""
2+
23
import typing as t
34
from json import dumps
45

src/github3/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""A collection of useful utilities."""
2+
23
import collections.abc as abc_collections
34
import datetime
45
import re

tests/integration/test_auths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""Integration tests for the github3.auths module."""
2+
23
import github3
34
from .helper import IntegrationHelper
45

56

67
class TestAuthorization(IntegrationHelper):
7-
88
"""Integration tests for the Authorization class."""
99

1010
def test_add_scopes(self):

tests/integration/test_checks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Integration tests for methods implemented on Check* classes."""
2+
23
import datetime
34

45
import dateutil

tests/integration/test_gists.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""Integration tests for methods implemented on Gist."""
2+
23
import github3
34
from .helper import IntegrationHelper
45

56

67
class TestGist(IntegrationHelper):
7-
88
"""Gist integration tests."""
99

1010
def test_comments(self):

tests/integration/test_git.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""Integration tests for Git."""
2+
23
import github3
34
from .helper import IntegrationHelper
45

56

67
class TestTree(IntegrationHelper):
7-
88
"""Integration tests for methods on the Test class."""
99

1010
def test_inequality(self):
@@ -29,7 +29,6 @@ def test_recurse(self):
2929

3030

3131
class TestReference(IntegrationHelper):
32-
3332
"""Integration tests for methods on the Reference class."""
3433

3534
def test_update(self):

0 commit comments

Comments
 (0)
0