Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #1172

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ repos:
- id: reorder-python-imports
args: [--application-directories, '.:src', --py37-plus]
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
1 change: 1 addition & 0 deletions src/github3/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The module that holds much of the metadata about github3.py."""

__package_name__ = "github3.py"
__title__ = "github3"
__author__ = "Ian Stapleton Cordasco"
Expand Down
1 change: 1 addition & 0 deletions src/github3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:license: Modified BSD, see LICENSE for more details

"""

from .__about__ import __author__
from .__about__ import __author_email__
from .__about__ import __copyright__
Expand Down
1 change: 1 addition & 0 deletions src/github3/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:license: Modified BSD, see LICENSE for more details

"""

from .github import GitHub
from .github import GitHubEnterprise

Expand Down
1 change: 1 addition & 0 deletions src/github3/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

https://developer.github.com/apps/building-github-apps/
"""

import time

import jwt
Expand Down
1 change: 1 addition & 0 deletions src/github3/auths.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the Authorization object."""

from .decorators import requires_basic_auth
from .models import GitHubCore

Expand Down
1 change: 1 addition & 0 deletions src/github3/checks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains all the classes relating to Checks."""

from json import dumps

from . import decorators
Expand Down
1 change: 1 addition & 0 deletions src/github3/decorators.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module provides decorators to the rest of the library."""

import os
from functools import wraps
from io import BytesIO as StringIO
Expand Down
1 change: 1 addition & 0 deletions src/github3/events.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the classes related to Events."""

import copy

from . import models
Expand Down
1 change: 1 addition & 0 deletions src/github3/gists/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

See also: http://developer.github.com/v3/gists/
"""

from .gist import Gist
from .gist import ShortGist

Expand Down
1 change: 1 addition & 0 deletions src/github3/gists/comment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing the logic for a GistComment."""

from .. import decorators
from .. import models
from .. import users
Expand Down
1 change: 1 addition & 0 deletions src/github3/gists/file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing the GistFile object."""

from .. import models


Expand Down
1 change: 1 addition & 0 deletions src/github3/gists/gist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the Gist, ShortGist, and GistFork objects."""

import typing as t
from json import dumps

Expand Down
1 change: 1 addition & 0 deletions src/github3/gists/history.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing the GistHistory object."""

from .. import models
from .. import users

Expand Down
1 change: 1 addition & 0 deletions src/github3/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

See also: http://developer.github.com/v3/git/
"""

import base64
from json import dumps

Expand Down
1 change: 1 addition & 0 deletions src/github3/github.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the main interfaces to the API."""

import json
import re
import typing as t
Expand Down
1 change: 1 addition & 0 deletions src/github3/issues/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

See also: http://developer.github.com/v3/issues/
"""

from ..utils import timestamp_parameter
from .issue import Issue
from .issue import ShortIssue
Expand Down
1 change: 1 addition & 0 deletions src/github3/issues/comment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module with class(es) representing issue comments."""

from .. import decorators
from .. import models
from .. import users
Expand Down
1 change: 1 addition & 0 deletions src/github3/issues/event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Issue events logic."""

from .. import users
from ..models import GitHubCore

Expand Down
1 change: 1 addition & 0 deletions src/github3/issues/issue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing the Issue logic."""

from json import dumps

from uritemplate import URITemplate # type: ignore
Expand Down
1 change: 1 addition & 0 deletions src/github3/issues/label.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing the logic for labels."""

from json import dumps

from ..decorators import requires_auth
Expand Down
1 change: 1 addition & 0 deletions src/github3/licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

See also: https://developer.github.com/v3/licenses/
"""

import base64

from . import models
Expand Down
1 change: 1 addition & 0 deletions src/github3/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module provides the basic models used in github3.py."""

import json as jsonlib
import logging
import typing as t
Expand Down
1 change: 1 addition & 0 deletions src/github3/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

See also: http://developer.github.com/v3/activity/notifications/
"""

from json import dumps

from . import models
Expand Down
1 change: 1 addition & 0 deletions src/github3/orgs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains all of the classes related to organizations."""

import typing as t
from json import dumps

Expand Down
1 change: 1 addition & 0 deletions src/github3/projects.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains all the classes relating to projects."""

from json import dumps

from . import exceptions
Expand Down
1 change: 1 addition & 0 deletions src/github3/pulls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains all the classes relating to pull requests."""

from json import dumps

from uritemplate import URITemplate # type: ignore
Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

See also: http://developer.github.com/v3/repos/
"""

from .repo import Repository
from .repo import ShortRepository
from .repo import StarredRepository
Expand Down
7 changes: 4 additions & 3 deletions src/github3/repos/branch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Implementation of a branch on a repository."""

import typing as t

from . import commit
Expand Down Expand Up @@ -153,9 +154,9 @@ def protect(
if allow_deletions is not None:
edit["allow_deletions"] = allow_deletions
if required_conversation_resolution is not None:
edit[
"required_conversation_resolution"
] = required_conversation_resolution
edit["required_conversation_resolution"] = (
required_conversation_resolution
)
url = self._build_url("protection", base_url=self._api)
resp = self._put(url, json=edit)
json = self._json(resp, 200)
Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/comment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the RepoComment class."""

from .. import models
from .. import users
from ..decorators import requires_auth
Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/commit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the RepoCommit classes."""

from . import status
from .. import checks
from .. import git
Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/comparison.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the Comparison object."""

from . import commit
from .. import models

Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/contents.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the Contents object."""

from base64 import b64decode
from base64 import b64encode
from json import dumps
Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/deployment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The module containing deployment logic."""

from .. import users
from ..models import GitHubCore

Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/hook.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains only the Hook object for GitHub's Hook API."""

from json import dumps

from ..decorators import requires_auth
Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/invitation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Invitation related logic."""

from json import dumps

from .. import models
Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/issue_import.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the logic for GitHub's import issue API."""

from .. import models


Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/pages.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""GitHub Pages related logic."""

from .. import models


Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/release.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Release logic for the GitHub API."""

import json

from uritemplate import URITemplate # type: ignore
Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
returned by GitHub.

"""

import base64
import json as jsonlib

Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/stats.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Repository and contributor stats logic."""

import datetime

import dateutil.tz
Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/status.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the Status object for GitHub's commit status API."""

from .. import models
from .. import users
from ..models import GitHubCore
Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/tag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the RepoTag object for GitHub's tag API."""

from . import commit
from .. import models

Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/topics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Topics related logic."""

from .. import models


Expand Down
1 change: 1 addition & 0 deletions src/github3/repos/traffic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Repository traffic stats logic."""

from .. import models


Expand Down
1 change: 1 addition & 0 deletions src/github3/search/code.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Code search results implementation."""

from .. import models
from .. import repos

Expand Down
1 change: 1 addition & 0 deletions src/github3/search/commit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Commit search results implementation."""

from .. import git
from .. import models
from .. import repos
Expand Down
1 change: 1 addition & 0 deletions src/github3/search/issue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Issue search results implementation."""

from ..issues import ShortIssue
from ..models import GitHubCore

Expand Down
1 change: 1 addition & 0 deletions src/github3/search/repository.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Repository search results implementation."""

from .. import models
from .. import repos

Expand Down
1 change: 1 addition & 0 deletions src/github3/session.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing session and auth logic."""

import collections.abc as abc_collections
import datetime
from contextlib import contextmanager
Expand Down
1 change: 0 additions & 1 deletion src/github3/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ def next(self) -> models.GitHubCore:


class SearchIterator(GitHubIterator):

"""This is a special-cased class for returning iterable search results.

It inherits from :class:`GitHubIterator <github3.structs.GitHubIterator>`.
Expand Down
1 change: 1 addition & 0 deletions src/github3/users.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains everything relating to Users."""

import typing as t
from json import dumps

Expand Down
1 change: 1 addition & 0 deletions src/github3/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A collection of useful utilities."""

import collections.abc as abc_collections
import datetime
import re
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_auths.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""Integration tests for the github3.auths module."""

import github3
from .helper import IntegrationHelper


class TestAuthorization(IntegrationHelper):

"""Integration tests for the Authorization class."""

def test_add_scopes(self):
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_checks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration tests for methods implemented on Check* classes."""

import datetime

import dateutil
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_gists.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""Integration tests for methods implemented on Gist."""

import github3
from .helper import IntegrationHelper


class TestGist(IntegrationHelper):

"""Gist integration tests."""

def test_comments(self):
Expand Down
Loading
Loading