Skip to content

Commit

Permalink
[DATALAD RUNCMD] run codespell throughout fixing typos automagically
Browse files Browse the repository at this point in the history
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
  • Loading branch information
yarikoptic committed Mar 4, 2024
1 parent f5ca1df commit 7f9ff15
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cmd/slackdump/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func parseCmdLine(args []string) (params, error) {
fs.BoolVar(&p.authReset, "auth-reset", false, "reset EZ-Login 3000 authentication.")
fs.Var(&p.browser, "browser", "set the browser to use for authentication: 'chromium' or 'firefox' (default: firefox)")
fs.DurationVar(&p.browserTimeout, "browser-timeout", browser.DefLoginTimeout, "browser login timeout")
fs.StringVar(&p.workspace, "w", "", "set the Slack `workspace` name. If not specifed, the slackdump will show an\ninteractive prompt.")
fs.StringVar(&p.workspace, "w", "", "set the Slack `workspace` name. If not specified, the slackdump will show an\ninteractive prompt.")
fs.BoolVar(&p.browserReinstall, "browser-reinstall", false, "reinstall the playwright browser")
fs.BoolVar(&p.legacyBrowser, "legacy-browser", false, "use the legacy browser authentication method")

Expand Down
2 changes: 1 addition & 1 deletion doc/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Command line flags are described as of version ``v2.1.0``.

\-dl-retries number
rate limit retries for file downloads. (default 3). If the file
download process hits the Slack Rate Limit reponse (HTTP ERROR
download process hits the Slack Rate Limit response (HTTP ERROR
429), slackdump will retry the download this number of times, for
each file.

Expand Down
2 changes: 1 addition & 1 deletion downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var Filename FilenameFunc = stdFilenameFn
// Downloader is the file downloader interface. It exists primarily for mocking
// in tests.
type Downloader interface {
// GetFile retreives a given file from its private download URL
// GetFile retrieves a given file from its private download URL
GetFile(downloadURL string, writer io.Writer) error
}

Expand Down
2 changes: 1 addition & 1 deletion export/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (se *Export) inclusiveExport(ctx context.Context, uidx structures.UserIndex

eg.Go(func() error {
if err := se.exportConversation(ctx, uidx, *ch); err != nil {
return fmt.Errorf("error exporting convesation %s: %w", ch.ID, err)
return fmt.Errorf("error exporting conversation %s: %w", ch.ID, err)
}
return nil
})
Expand Down
2 changes: 1 addition & 1 deletion export/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type index struct {
Users []slack.User `filename:"users.json"`
}

// DM respresents a direct Message entry in dms.json.
// DM represents a direct Message entry in dms.json.
// Structure is based on this post:
//
// https://github.com/RocketChat/Rocket.Chat/issues/13905#issuecomment-477500022
Expand Down
2 changes: 1 addition & 1 deletion internal/encio/encio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestNewReadWriter(t *testing.T) {
t.Errorf("error closing writer: %s", err)
}
if n != len(plaintext) {
t.Errorf("incosistent write byte count: want=%d, got=%d", len(plaintext), n)
t.Errorf("inconsistent write byte count: want=%d, got=%d", len(plaintext), n)
}
if sz := len(plaintext) + aes.BlockSize; sz != buf.Len() {
t.Errorf("invalid encrypted message size: want=%d, got=%d", sz, buf.Len())
Expand Down
2 changes: 1 addition & 1 deletion internal/network/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func Test_withRetry(t *testing.T) {
true,
calcRunDuration(testRateLimit, 2),
},
{"rate limiter test 4 lmited attempts, 100 ms each",
{"rate limiter test 4 limited attempts, 100 ms each",
args{
context.Background(),
rate.NewLimiter(10.0, 1),
Expand Down
4 changes: 2 additions & 2 deletions internal/structures/entity_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func hasFilePrefix(s string) bool {
return strings.HasPrefix(s, filePrefix)
}

// NewEntityList creates an EntityList from a slice of IDs or URLs (entites).
// NewEntityList creates an EntityList from a slice of IDs or URLs (entities).
func NewEntityList(entities []string) (*EntityList, error) {
var el EntityList

Expand All @@ -48,7 +48,7 @@ func NewEntityList(entities []string) (*EntityList, error) {
return &el, nil
}

// MakeEntityList creates an EntityList from a slice of IDs or URLs (entites).
// MakeEntityList creates an EntityList from a slice of IDs or URLs (entities).
func LoadEntityList(filename string) (*EntityList, error) {
f, err := os.Open(filename)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/structures/files/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func Test_addToken(t *testing.T) {
false,
},
{
"preseves other parameters",
"preserves other parameters",
args{"https://slack.com/files/BLAHBLAH/x.jpg?t=xoxe-yyyyy&q=bbbb", "xoxe-xxxxx"},
"https://slack.com/files/BLAHBLAH/x.jpg?q=bbbb&t=xoxe-xxxxx",
false,
Expand Down
4 changes: 2 additions & 2 deletions internal/ui/ask/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func ConversationList(msg string) (*structures.EntityList, error) {
chanStr, err := ui.String(
msg,
"Enter whitespace separated conversation IDs or URLs to export.\n"+
" - prefix with ^ (caret) to exclude the converation\n"+
" - prefix with @ to read the list of converations from the file.\n\n"+
" - prefix with ^ (caret) to exclude the conversation\n"+
" - prefix with @ to read the list of conversations from the file.\n\n"+
"For more details, see https://github.com/rusq/slackdump/blob/master/doc/usage-export.rst#providing-the-list-in-a-file",
)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (sd *Session) dumpChannel(ctx context.Context, channelID string, oldest, la
trace.Logf(ctx, "info", "channelID: %q, oldest: %s, latest: %s", channelID, oldest, latest)

var (
// slack rate limits are per method, so we're safe to use different limiters for different mehtods.
// slack rate limits are per method, so we're safe to use different limiters for different methods.
convLimiter = sd.limiter(network.Tier3)
threadLimiter = sd.limiter(network.Tier3)
)
Expand Down

0 comments on commit 7f9ff15

Please sign in to comment.