PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: chalk/chalk (js)
Issue: Give some method to use original "blue" even under Windows
I saw this in `index.js`

```js
// Use bright blue on Windows as the normal blue color is illegible
if (isSimpleWindowsTerm) {
	ansiStyles.blue.open = '\u001B[94m';
}
```

But sometimes we may need to explicitly use the original `blue` even if it is not legible.
Pull request description: Remove the blue color workaround for Windows
The illegible blue color has been fixed in Windows 10 build 16257: https://blogs.msdn.microsoft.com/commandline/2017/08/02/updating-the-windows-console-colors/

The workaround causes all kinds of problems, so better to remove it than adding conditionals for older Windows versions.

Fixes #329

Patch:
diff --git a/index.js b/index.js
index 50e7591..80d9e3d 100644
--- a/index.js
+++ b/index.js
@@ -58,11 +58,6 @@ function Chalk(options) {
 	return chalkFactory(options);
 }
 
-// Use bright blue on Windows as the normal blue color is illegible
-if (isSimpleWindowsTerm) {
-	ansiStyles.blue.open = '\u001B[94m';
-}
-
 for (const [styleName, style] of Object.entries(ansiStyles)) {
 	style.closeRe = new RegExp(escapeStringRegexp(style.close), 'g');
 


Test patch:
diff --git a/test/windows.js b/test/windows.js
index 3ede386..ca51a0a 100644
--- a/test/windows.js
+++ b/test/windows.js
@@ -29,18 +29,6 @@ test.beforeEach(() => {
 test('detect a simple term if TERM isn\'t set', t => {
 	delete process.env.TERM;
 	const chalk = importFresh('..');
-	t.is(chalk.blue('foo'), '\u001B[94mfoo\u001B[39m');
-});
-
-test('replace blue foreground color in cmd.exe', t => {
-	process.env.TERM = 'dumb';
-	const chalk = importFresh('..');
-	t.is(chalk.blue('foo'), '\u001B[94mfoo\u001B[39m');
-});
-
-test('don\'t replace blue foreground color in xterm based terminals', t => {
-	process.env.TERM = 'xterm-256color';
-	const chalk = importFresh('..');
 	t.is(chalk.blue('foo'), '\u001B[34mfoo\u001B[39m');
 });
 
@@ -59,5 +47,5 @@ test('apply dimmed styling on xterm compatible terminals', t => {
 test('apply dimmed styling on strings of other colors', t => {
 	process.env.TERM = 'dumb';
 	const chalk = importFresh('..');
-	t.is(chalk.blue.dim('foo'), '\u001B[94m\u001B[2mfoo\u001B[22m\u001B[39m');
+	t.is(chalk.blue.dim('foo'), '\u001B[34m\u001B[2mfoo\u001B[22m\u001B[39m');
 });
Repository: oclif/core (ts)
Issue: oclif rejects empty string given for required argument
Do you want to request a *feature* or report a *bug*?
-----------------------------------------------------

Report a bug

What is the current behavior?
-----------------------------
oclif rejects an empty string argument when a string argument is requried

Example code:

```
import {Command, flags} from '@oclif/command'

class Foo extends Command {
  static description = 'describe the command here'

  static args = [{name: 'file', required: true}]

  async run() {
    const {args, flags} = this.parse(Foo)
  }
}

export = Foo
```

Example output:

```
$ ./bin/run
 ›   Error: Missing 1 required arg:
 ›   file
 ›   See more help with --help
$ ./bin/run ''
 ›   Error: Missing 1 required arg:
 ›   file
 ›   See more help with --help
$ ./bin/run 'foo'
$
```

The first error is expected (we omitted the argument). The second is not (we supplied an empty string as argument). In the 3rd case, the command succeeds as expected.

What is the expected behavior?
------------------------------
An empty string argument should be accepted.

I'm using oclif/command 1.8.0 on Ubuntu 20.04.

Pull request description: fix: allow arg to be empty string
Allow args to be an empty string, e.g. `my-cli hello ''`

Fixes #982 
@W-15161625@

Patch:
diff --git a/src/parser/parse.ts b/src/parser/parse.ts
index 2cf51b5..eefd9ea 100644
--- a/src/parser/parse.ts
+++ b/src/parser/parse.ts
@@ -305,7 +305,7 @@ export class Parser<
     }
 
     for (const token of tokens) {
-      if (args[token.arg]) continue
+      if (args[token.arg] !== undefined) continue
       argv.push(token.input)
     }
 
diff --git a/src/parser/validate.ts b/src/parser/validate.ts
index d2caee7..9e2b32c 100644
--- a/src/parser/validate.ts
+++ b/src/parser/validate.ts
@@ -44,7 +44,8 @@ export async function validate(parse: {input: ParserInput; output: ParserOutput}
         })
       }
 
-      if (arg.required && !parse.output.args[name] && parse.output.args[name] !== 0) {
+      // Only add if it's required and undefined. Allow falsy values like empty strings and 0.
+      if (arg.required && parse.output.args[name] === undefined) {
         missingRequiredArgs.push(arg)
       }
     }


Test patch:
diff --git a/test/parser/validate.test.ts b/test/parser/validate.test.ts
index ac9ee6d..b85fa1b 100644
--- a/test/parser/validate.test.ts
+++ b/test/parser/validate.test.ts
@@ -121,6 +121,31 @@ describe('validate', () => {
     await validate({input, output})
   })
 
+  it('allows empty string as arg', async () => {
+    const input = {
+      argv: [],
+      flags: {},
+      args: {
+        emptyString: {required: true},
+      },
+      strict: true,
+      context: {},
+      '--': true,
+    }
+
+    const output = {
+      args: {emptyString: ''},
+      argv: [''],
+      raw: [],
+      metadata: {
+        flags: {},
+      },
+    }
+
+    // @ts-expect-error
+    await validate({input, output})
+  })
+
   it('throws when required flag is undefined', async () => {
     const input = {
       argv: [],
Repository: rrrene/credo (elixir)
Issue: `mix credo` task fails with exception `protocol String.Chars not implemented for ...`
### Environment

* Credo version (`mix credo -v`): 0.8.10
* Erlang/Elixir version (`elixir -v`): 1.6.1
* Operating system: macOS 10.13.3

### What were you trying to do?

I'm trying to run style checks for source code containing macro like 

```
defmacro foo(quoted_module, ..., ...) do
  {module, []} = Code.eval_quoted(quoted_module)
  quote do
    defmodule unquote(module).Bar do
      unquote(...)
    end
  end
end
```

Compiler gives no warnings, generated module works as expected. But when I'm trying to run style checks with `mix credo` command, it fails with error

```
Error while running Elixir.Credo.Check.Readability.ModuleNames on 
** (EXIT from #PID<0.73.0>) an exception was raised:
    ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:unquote, [line: 22], [{:module, [line: 22], nil}]}
        (elixir) lib/string/chars.ex:3: String.Chars.impl_for!/1
        (elixir) lib/string/chars.ex:22: String.Chars.to_string/1
        (elixir) lib/enum.ex:1899: Enum."-join/2-lists^foldl/2-0-"/3
        (elixir) lib/enum.ex:1899: Enum.join/2
        lib/credo/check/readability/module_names.ex:45: Credo.Check.Readability.ModuleNames.issues_for_def/3
        lib/credo/check/readability/module_names.ex:36: Credo.Check.Readability.ModuleNames.traverse/3
        (elixir) lib/macro.ex:277: anonymous fn/4 in Macro.do_traverse_args/4
        (elixir) lib/enum.ex:1397: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
```
Pull request description: Filter module names which can be converted to strings
Fixes #506

Patch:
diff --git a/lib/credo/check/readability/module_names.ex b/lib/credo/check/readability/module_names.ex
index eff521cc..d0615ab9 100644
--- a/lib/credo/check/readability/module_names.ex
+++ b/lib/credo/check/readability/module_names.ex
@@ -43,7 +43,10 @@ defmodule Credo.Check.Readability.ModuleNames do
   defp issues_for_def(body, issues, issue_meta) do
     case Enum.at(body, 0) do
       {:__aliases__, meta, names} ->
-        names |> Enum.join(".") |> issues_for_name(meta, issues, issue_meta)
+        names
+        |> Enum.filter(&String.Chars.impl_for/1)
+        |> Enum.join(".")
+        |> issues_for_name(meta, issues, issue_meta)
 
       _ ->
         issues


Test patch:
diff --git a/test/credo/check/readability/module_names_test.exs b/test/credo/check/readability/module_names_test.exs
index f9e21a79..4369c11e 100644
--- a/test/credo/check/readability/module_names_test.exs
+++ b/test/credo/check/readability/module_names_test.exs
@@ -16,6 +16,20 @@ defmodule Credo.Check.Readability.ModuleNamesTest do
     |> refute_issues(@described_check)
   end
 
+  test "it should NOT report if module name cannot be determinated" do
+    """
+    defmacro foo(quoted_module) do
+      {module, []} = Code.eval_quoted(quoted_module)
+      quote do
+        defmodule unquote(module).Bar do
+        end
+      end
+    end
+    """
+    |> to_source_file
+    |> refute_issues(@described_check)
+  end
+
   #
   # cases raising issues
   #
Repository: jhillyerd/enmime (go)
Issue: Possible to handle these `From:` values?
I got messages with `From:` like this:
```
From: Name< user@domain.com >
From: Name <sales@a.com >
```
Both report `unclosed angle-addr` error, but MUAs work fine.

I wonder whether we can handle this in enmime. :)
Pull request description: fix: Handle spaces inside angle brackets
closes #339 

Patch:
diff --git a/internal/stringutil/addr.go b/internal/stringutil/addr.go
index c3eaa42..4a02a83 100644
--- a/internal/stringutil/addr.go
+++ b/internal/stringutil/addr.go
@@ -34,6 +34,7 @@ func EnsureCommaDelimitedAddresses(s string) string {
 	inQuotes := false
 	inDomain := false
 	escapeSequence := false
+	inAngles := false
 	sb := strings.Builder{}
 	for i, r := range s {
 		if escapeSequence {
@@ -46,6 +47,19 @@ func EnsureCommaDelimitedAddresses(s string) string {
 			sb.WriteRune(r)
 			continue
 		}
+
+		if r == '<' {
+			inAngles = true
+			sb.WriteRune(r)
+			continue
+		}
+
+		if r == '>' {
+			inAngles = false
+			sb.WriteRune(r)
+			continue
+		}
+
 		if inQuotes {
 			if r == '\\' {
 				escapeSequence = true
@@ -74,13 +88,17 @@ func EnsureCommaDelimitedAddresses(s string) string {
 					sb.WriteRune(r)
 					continue
 				}
-				if r == ' ' {
+				if r == ' ' && !inAngles {
 					inDomain = false
 					sb.WriteRune(',')
 					sb.WriteRune(r)
 					continue
 				}
 			}
+
+			if inAngles && r == ' ' {
+				continue
+			}
 		}
 		sb.WriteRune(r)
 	}


Test patch:
diff --git a/internal/stringutil/addr_test.go b/internal/stringutil/addr_test.go
index 0ce4eac..a4e3624 100644
--- a/internal/stringutil/addr_test.go
+++ b/internal/stringutil/addr_test.go
@@ -108,6 +108,22 @@ func TestCommaDelimitedAddressLists(t *testing.T) {
 			have: `"Joe @ Company" <joe@company.com>;<other@company.com>`,
 			want: `"Joe @ Company" <joe@company.com>,<other@company.com>`,
 		},
+		{
+			have: `"Joe @ Company" <joe@company.com >;<other@company.com>`,
+			want: `"Joe @ Company" <joe@company.com>,<other@company.com>`,
+		},
+		{
+			have: `"Joe @ Company" <joe@company.com>;<other@company.com     >`,
+			want: `"Joe @ Company" <joe@company.com>,<other@company.com>`,
+		},
+		{
+			have: `"Joe @ Company" <joe@company.com>;<  other@company.com>`,
+			want: `"Joe @ Company" <joe@company.com>,<other@company.com>`,
+		},
+		{
+			have: `"Joe @ Company" <  joe@company.com  >;< other@company.com     >`,
+			want: `"Joe @ Company" <joe@company.com>,<other@company.com>`,
+		},
 	}
 	for _, tt := range testData {
 		t.Run(tt.have, func(t *testing.T) {