Skip to content
Merged
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
4 changes: 2 additions & 2 deletions revup/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import logging
import sys

from revup.revup import build_parser, main
from revup.types import (
from revup.core_types import (
RevupConflictException,
RevupForgeException,
RevupRequestException,
RevupShellException,
RevupUsageException,
)
from revup.revup import build_parser, main


def _main() -> None:
Expand Down
2 changes: 1 addition & 1 deletion revup/amend.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing import Dict, List, Set

from revup import git, topic_stack
from revup.types import (
from revup.core_types import (
CommitHeader,
GitCommitHash,
GitConflictException,
Expand Down
2 changes: 1 addition & 1 deletion revup/cherry_pick.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from typing import Tuple

from revup import config, git
from revup.core_types import GitCommitHash, GitTreeHash, RevupUsageException
from revup.forge_utils import RE_PR_URL, forge_connection, parse_pull_request_url
from revup.types import GitCommitHash, GitTreeHash, RevupUsageException


async def resolve_pr_url(
Expand Down
2 changes: 1 addition & 1 deletion revup/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from argparse import _StoreAction, _StoreFalseAction, _StoreTrueAction
from typing import Any, Dict, List, Optional, Tuple

from revup.types import RevupUsageException
from revup.core_types import RevupUsageException


class RevupArgParser(argparse.ArgumentParser):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion revup/forge_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from typing import AsyncGenerator

from revup import config, git, logs
from revup.core_types import RevupUsageException
from revup.forge import Forge, ForgeRepoInfo, PullRequestParams
from revup.types import RevupUsageException

RE_PR_URL = re.compile(
r"^https://(?P<forge_url>[^/]+)/(?P<owner>[^/]+)/(?P<name>[^/]+)/pull/(?P<number>[0-9]+)/?$"
Expand Down
2 changes: 1 addition & 1 deletion revup/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from async_lru import alru_cache as lru_cache

from revup import shell
from revup.types import (
from revup.core_types import (
CommitHeader,
GitCommitHash,
GitConflict,
Expand Down
2 changes: 1 addition & 1 deletion revup/github/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

from aiohttp import ClientSession, ContentTypeError

from revup.core_types import RevupForgeException, RevupRequestException
from revup.github.graphql import GraphqlResponse
from revup.types import RevupForgeException, RevupRequestException

# HTTP statuses worth retrying: gateway/timeout (5xx) and secondary-rate-limit (403).
TRANSIENT_STATUSES = frozenset({500, 502, 503, 504})
Expand Down
2 changes: 1 addition & 1 deletion revup/github/github.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
from typing import Any, Dict, List, Optional, Set, Tuple

from revup.core_types import RevupForgeException
from revup.forge import (
MAX_COMMENTS_TO_QUERY,
Forge,
Expand All @@ -17,7 +18,6 @@
GraphqlQuery,
GraphqlResponse,
)
from revup.types import RevupForgeException

PR_FRAGMENT = f"""
fragment PrResult on PullRequestConnection {{
Expand Down
12 changes: 6 additions & 6 deletions revup/restack.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
from typing import Dict, List, Optional, Set, Tuple

from revup import git, topic_stack
from revup.core_types import (
GitCommitHash,
GitConflictException,
GitTreeHash,
RevupConflictException,
)
from revup.topic_stack import (
TAG_ASSIGNEE,
TAG_BRANCH,
Expand All @@ -18,12 +24,6 @@
TopicStack,
add_tags,
)
from revup.types import (
GitCommitHash,
GitConflictException,
GitTreeHash,
RevupConflictException,
)

TAG_ORDER = [
TAG_TOPIC,
Expand Down
2 changes: 1 addition & 1 deletion revup/revup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
topic_completer,
)
from revup.config import RevupArgParser
from revup.core_types import RevupUsageException
from revup.forge_utils import parse_forge_info
from revup.topic_stack import PrBodySource
from revup.types import RevupUsageException
from revup.version import REVUP_VERSION

REVUP_CONFIG_ENV_VAR = "REVUP_CONFIG_PATH"
Expand Down
2 changes: 1 addition & 1 deletion revup/toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import asyncio

from revup import git
from revup.core_types import RevupUsageException
from revup.topic_stack import TopicStack
from revup.types import RevupUsageException


async def get_topics(
Expand Down
4 changes: 2 additions & 2 deletions revup/topic_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
from rich.markup import escape

from revup import git
from revup.forge import MAX_COMMENTS_TO_QUERY, Forge, PrComment, PrInfo, PrUpdate
from revup.types import (
from revup.core_types import (
GitCommitHash,
GitConflictException,
GitTreeHash,
RevupConflictException,
RevupUsageException,
)
from revup.forge import MAX_COMMENTS_TO_QUERY, Forge, PrComment, PrInfo, PrUpdate

# Since topic name is incorporated into the branch name, we must ensure that it matches
# the character set that forges support. It's possible to have other characters if they're
Expand Down
2 changes: 1 addition & 1 deletion revup/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from rich import get_console

from revup import git, topic_stack
from revup.core_types import RevupShellException
from revup.forge import Forge
from revup.types import RevupShellException


class UploadPhase(enum.Enum):
Expand Down
2 changes: 1 addition & 1 deletion tests/git_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pathlib import Path

from revup import git, shell
from revup.types import GitCommitHash
from revup.core_types import GitCommitHash

TEST_AUTHOR_NAME = "Test Author"
TEST_AUTHOR_EMAIL = "test@example.com"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_amend.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
)

from revup import amend
from revup.types import RevupConflictException, RevupUsageException
from revup.core_types import RevupConflictException, RevupUsageException


def make_amend_args(**kwargs):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pytest

from revup.config import Config, RevupArgParser, collect_known_keys, config_main
from revup.types import RevupUsageException
from revup.core_types import RevupUsageException


def make_parsers():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

import pytest

from revup.core_types import RevupForgeException, RevupRequestException
from revup.forge import ForgeRepoInfo, PrComment, PrInfo, PrUpdate
from revup.github.endpoint import GitHubEndpoint, _backoff_delay
from revup.github.github import _MAX_STALLED_RETRIES, Github, _merge_data
from revup.github.graphql import GraphqlResponse
from revup.types import RevupForgeException, RevupRequestException


def gql(data, errors=None):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from fake_forge import FakeForge
from git_env import GitTestEnvironment, async_test

from revup.core_types import RevupConflictException, RevupUsageException
from revup.forge import PrInfo
from revup.topic_stack import (
PrBodySource,
Expand All @@ -14,7 +15,6 @@
TopicStack,
format_remote_branch,
)
from revup.types import RevupConflictException, RevupUsageException


def make_upload_args(**kwargs):
Expand Down
Loading