Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace wildcard imports with concrete imports#1352

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 1 commit intogitpython-developers:mainfromtrym-b:replace-wildcard-imports
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes fromall 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
22 changes: 11 additions & 11 deletionsgit/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
# flake8: noqa
#@PydevCodeAnalysisIgnore
from git.exc import* # @NoMove @IgnorePep8
from git.exc importGitError, GitCommandError, GitCommandNotFound, UnmergedEntriesError, CheckoutError, InvalidGitRepositoryError, NoSuchPathError, BadName # @NoMove @IgnorePep8
import inspect
import os
import sys
Expand DownExpand Up@@ -39,16 +39,16 @@ def _init_externals() -> None:
#{ Imports

try:
from git.config import GitConfigParser # @NoMove @IgnorePep8
from git.objects import* # @NoMove @IgnorePep8
from git.refs import* # @NoMove @IgnorePep8
from git.diff import* # @NoMove @IgnorePep8
from git.db import* # @NoMove @IgnorePep8
from git.cmd import Git # @NoMove @IgnorePep8
from git.repo import Repo # @NoMove @IgnorePep8
from git.remote import* # @NoMove @IgnorePep8
from git.index import* # @NoMove @IgnorePep8
from git.util import ( # @NoMove @IgnorePep8
from git.config import GitConfigParser# @NoMove @IgnorePep8
from git.objects importBlob, Commit, Object, Submodule, Tree # @NoMove @IgnorePep8
from git.refs importHead, Reference, RefLog, RemoteReference, SymbolicReference, TagReference # @NoMove @IgnorePep8
from git.diff importDiff, DiffIndex, NULL_TREE # @NoMove @IgnorePep8
from git.db importGitCmdObjectDB, GitDB # @NoMove @IgnorePep8
from git.cmd import Git# @NoMove @IgnorePep8
from git.repo import Repo# @NoMove @IgnorePep8
from git.remote importFetchInfo, PushInfo, Remote, RemoteProgress # @NoMove @IgnorePep8
from git.index importBlobFilter, IndexEntry, IndexFile # @NoMove @IgnorePep8
from git.util import (# @NoMove @IgnorePep8
LockFile,
BlockingLockFile,
Stats,
Expand Down
3 changes: 1 addition & 2 deletionsgit/exc.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,8 +5,7 @@
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
""" Module containing all exceptions thrown throughout the git package, """

from gitdb.exc import BadName # NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614
from gitdb.exc import * # NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614
from gitdb.exc import BadName, BadObject # NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614
from git.compat import safe_decode

# typing ----------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletionsgit/index/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
"""Initialize the index package"""
# flake8: noqa
from .base import*
from .typ import*
from .base importIndexFile
from .typ importIndexEntry, BlobFilter
14 changes: 7 additions & 7 deletionsgit/objects/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,14 +4,14 @@
# flake8: noqa
import inspect

from .base import*
from .blob import*
from .commit import*
from .base importObject, IndexObject
from .blob importBlob
from .commit importCommit
from .submodule import util as smutil
from .submodule.base import*
from .submodule.root import*
from .tag import*
from .tree import*
from .submodule.base importSubmodule, UpdateProgress
from .submodule.root importRootModule, RootUpdateProgress
from .tag importTagObject
from .tree importTree
# Fix import dependency - add IndexObject to the util module, so that it can be
# imported by the submodule.base
smutil.IndexObject = IndexObject # type: ignore[attr-defined]
Expand Down
12 changes: 6 additions & 6 deletionsgit/refs/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
# flake8: noqa
# import all modules in order, fix the names they require
from .symbolic import*
from .reference import*
from .head import*
from .tag import*
from .remote import*
from .symbolic importSymbolicReference
from .reference importReference
from .head importHEAD, Head
from .tag importTagReference
from .remote importRemoteReference

from .log import*
from .log importRefLogEntry, RefLog
7 changes: 5 additions & 2 deletionstest/lib/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,9 +4,12 @@
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php

# flake8: noqa
import inspect
from .helper import *

from .helper import (GIT_DAEMON_PORT, SkipTest, StringProcessAdapter, TestBase,
TestCase, fixture, fixture_path,
with_rw_and_rw_remote_repo, with_rw_directory,
with_rw_repo)

__all__ = [name for name, obj in locals().items()
if not (name.startswith('_') or inspect.ismodule(obj))]

[8]ページ先頭

©2009-2025 Movatter.jp