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

chore: separate import statements by type #702

Merged
merged 2 commits into from
Jan 10, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package cli
import (
"fmt"

"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/version"
"github.com/spf13/cobra"

"github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package cli
import (
"fmt"

"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/version"
"github.com/spf13/cobra"

"github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package keeper

import (
"context"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types"
)

Expand Down
5 changes: 2 additions & 3 deletions modules/apps/27-interchain-accounts/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import (
"encoding/json"
"fmt"

"github.com/gorilla/mux"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"
abci "github.com/tendermint/tendermint/abci/types"

"github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/client/cli"
Expand Down
1 change: 1 addition & 0 deletions modules/apps/27-interchain-accounts/types/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strings"

sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"
porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types"
)
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package cli
import (
"fmt"

"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/version"
"github.com/spf13/cobra"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
)

Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"strings"
"time"

"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/version"
"github.com/spf13/cobra"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
channelutils "github.com/cosmos/ibc-go/v3/modules/core/04-channel/client/utils"
Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/ibc_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"math"

capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"
host "github.com/cosmos/ibc-go/v3/modules/core/24-host"
Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
)

Expand Down
6 changes: 3 additions & 3 deletions modules/apps/transfer/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"context"
"fmt"

"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/types/query"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
)

Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/query"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
)

Expand Down
6 changes: 3 additions & 3 deletions modules/apps/transfer/keeper/keeper.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package keeper

import (
tmbytes "github.com/tendermint/tendermint/libs/bytes"
"github.com/tendermint/tendermint/libs/log"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
tmbytes "github.com/tendermint/tendermint/libs/bytes"
"github.com/tendermint/tendermint/libs/log"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
host "github.com/cosmos/ibc-go/v3/modules/core/24-host"
)
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package keeper_test
import (
"testing"

"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/suite"
"github.com/tendermint/tendermint/crypto"

"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
ibctesting "github.com/cosmos/ibc-go/v3/testing"
)
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/keeper/mbt_relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"strconv"
"strings"

"github.com/tendermint/tendermint/crypto"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/tendermint/tendermint/crypto"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"
Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
)

Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/keeper/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keeper

import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
)

Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/keeper/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package keeper_test
import (
"fmt"

"github.com/cosmos/ibc-go/v3/testing/simapp"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"
host "github.com/cosmos/ibc-go/v3/modules/core/24-host"
ibctesting "github.com/cosmos/ibc-go/v3/testing"
"github.com/cosmos/ibc-go/v3/testing/simapp"
)

// test sending from chainA to chainB using both coin that orignate on
Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/simulation/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

"github.com/cosmos/cosmos-sdk/types/kv"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
)

Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/simulation/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"testing"

"github.com/cosmos/cosmos-sdk/types/kv"
"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/types/kv"
"github.com/cosmos/ibc-go/v3/modules/apps/transfer/simulation"
"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
"github.com/cosmos/ibc-go/v3/testing/simapp"
Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/simulation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/cosmos/cosmos-sdk/types/module"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
)

Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/simulation/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"math/rand"
"testing"

"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/types/module"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/stretchr/testify/require"

"github.com/cosmos/ibc-go/v3/modules/apps/transfer/simulation"
"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
)
Expand Down
5 changes: 2 additions & 3 deletions modules/apps/transfer/simulation/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import (
"fmt"
"math/rand"

gogotypes "github.com/gogo/protobuf/types"

simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"
gogotypes "github.com/gogo/protobuf/types"

simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
)

Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package transfer_test
import (
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/suite"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"
Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/types/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/types"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"

connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"
channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"
ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported"
Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
host "github.com/cosmos/ibc-go/v3/modules/core/24-host"
)
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"testing"

"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"

clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
)

Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/types/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"sort"
"strings"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
tmbytes "github.com/tendermint/tendermint/libs/bytes"
tmtypes "github.com/tendermint/tendermint/types"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
host "github.com/cosmos/ibc-go/v3/modules/core/24-host"
)

Expand Down
1 change: 1 addition & 0 deletions modules/core/02-client/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package client

import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper"
"github.com/cosmos/ibc-go/v3/modules/core/exported"
ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint/types"
Expand Down
2 changes: 1 addition & 1 deletion modules/core/02-client/abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package client_test
import (
"testing"

upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/stretchr/testify/suite"
abci "github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
client "github.com/cosmos/ibc-go/v3/modules/core/02-client"
"github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
"github.com/cosmos/ibc-go/v3/modules/core/exported"
Expand Down
2 changes: 1 addition & 1 deletion modules/core/02-client/client/cli/cli.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cli

import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
)

Expand Down
4 changes: 2 additions & 2 deletions modules/core/02-client/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"errors"
"fmt"

"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/version"
"github.com/spf13/cobra"

"github.com/cosmos/ibc-go/v3/modules/core/02-client/client/utils"
"github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
host "github.com/cosmos/ibc-go/v3/modules/core/24-host"
Expand Down
6 changes: 3 additions & 3 deletions modules/core/02-client/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import (
"io/ioutil"
"strconv"

"github.com/pkg/errors"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand All @@ -17,6 +14,9 @@ import (
govcli "github.com/cosmos/cosmos-sdk/x/gov/client/cli"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/pkg/errors"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random question: Any ideas why this is used over std lib errors? I think that repo is archived. cc @colin-axner

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea. Want to open an issue?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I can do! :)

"github.com/spf13/cobra"

"github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
"github.com/cosmos/ibc-go/v3/modules/core/exported"
)
Expand Down
1 change: 1 addition & 0 deletions modules/core/02-client/client/proposal_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/rest"
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest"

"github.com/cosmos/ibc-go/v3/modules/core/02-client/client/cli"
)

Expand Down
Loading