PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: useblocks/sphinx-needs (python)
Issue: Custom column titles in needtable does not work
Custom column titles in needtable does not work if the `needs_extra_options` has special characters like "-".

The following, for example, prints an empty "Description" column.

```rst
.. needtable::
   :filter: id.startswith("REQ_ID")
   :columns: id;title;status-desc as "Description";status
```

The following works:

```rst
.. needtable::
   :filter: id.startswith("REQ_ID")
   :columns: id;title;status-desc;status
```
Pull request description: 👌 Make needtable titles more permissive
For `key as "title"` columns, the regex has been changed, to allow for the key to contain anything except whitespace characters, and the title to contain anything except the `"` character

closes #1089 

Patch:
diff --git a/sphinx_needs/defaults.py b/sphinx_needs/defaults.py
index c23903fc..2e7a1191 100644
--- a/sphinx_needs/defaults.py
+++ b/sphinx_needs/defaults.py
@@ -199,7 +199,7 @@ NEEDFLOW_CONFIG_DEFAULTS = {
     """,
 }
 
-TITLE_REGEX = r'([\w]+) as "([\w ]+)"'
+TITLE_REGEX = r'([^\s]+) as "([^"]+)"'
 
 
 NEED_DEFAULT_OPTIONS: Dict[str, Any] = {


Test patch:
diff --git a/tests/doc_test/doc_needtable/conf.py b/tests/doc_test/doc_needtable/conf.py
index 585e4438..73fd6107 100644
--- a/tests/doc_test/doc_needtable/conf.py
+++ b/tests/doc_test/doc_needtable/conf.py
@@ -23,6 +23,7 @@ needs_extra_options = [
     "github",
     "value",
     "unit",
+    "special-chars!",
 ]
 
 needs_string_links = {
diff --git a/tests/doc_test/doc_needtable/test_titles.rst b/tests/doc_test/doc_needtable/test_titles.rst
index e1a59868..75db1cca 100644
--- a/tests/doc_test/doc_needtable/test_titles.rst
+++ b/tests/doc_test/doc_needtable/test_titles.rst
@@ -12,7 +12,8 @@ TEST Titles
 .. spec:: need 3
    :id: titles_003
    :links: titles_001
+   :special-chars!: special-chars value
 
 .. needtable::
-   :columns: id;title as "Headline" ;outgoing as "Links"; incoming as "To this need123";status;tags as "My Tags"
+   :columns: id;title as "Headline" ;outgoing as "Links"; incoming as "To this need123";status;tags as "My Tags";special-chars! as "Special Characters!"
    :style: table
diff --git a/tests/test_needtable.py b/tests/test_needtable.py
index 40bb9b33..211be333 100644
--- a/tests/test_needtable.py
+++ b/tests/test_needtable.py
@@ -149,3 +149,5 @@ def test_doc_needtable_titles(test_app):
     html = Path(app.outdir, "test_titles.html").read_text()
     assert '<th class="head"><p>Headline</p></th>' in html
     assert '<th class="head"><p>To this need123</p></th>' in html
+    assert '<th class="head"><p>Special Characters!</p></th>' in html
+    assert '<td class="needs_special-chars!"><p>special-chars value</p></td>' in html
Repository: benhoyt/goawk (go)
Issue: Add support for --csv (which Gawk and onetrueawk are adding)
Gawk and BWK's onetrueawk are adding a `--csv` option (for the second edition of *The AWK Programming Language*), which I believe is equivalent to GoAWK's `-i csv`. We should confirm that and then add support for this argument to GoAWK for compatibility. Arnold said:

> In particular:
>        - Quoted fields are handled
>                - Including embedded CR-LF or CR or LF
>        - The record can be terminated by CR-LF or just LF
>        - In all cases, CR-LF becomes just LF by the time gawk sees the data

Pull request description: Add --csv option, in line with upcoming AWK and Gawk feature
Fixes #181 

Patch:
diff --git a/goawk.go b/goawk.go
index f7ca14f..e536ddc 100644
--- a/goawk.go
+++ b/goawk.go
@@ -51,6 +51,7 @@ const (
 	copyright  = "GoAWK " + version + " - Copyright (c) 2022 Ben Hoyt"
 	shortUsage = "usage: goawk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]"
 	longUsage  = `Standard AWK arguments:
+  --csv             equivalent to "-i csv"
   -F separator      field separator (default " ")
   -f progfile       load AWK source from progfile (multiple allowed)
   -v var=value      variable assignment (multiple allowed)
@@ -158,6 +159,8 @@ argsLoop:
 			}
 			i++
 			cpuProfile = os.Args[i]
+		case "-csv", "--csv":
+			inputMode = "csv"
 		case "-d":
 			debug = true
 		case "-da":


Test patch:
diff --git a/goawk_test.go b/goawk_test.go
index 1eb740a..09cf193 100644
--- a/goawk_test.go
+++ b/goawk_test.go
@@ -624,6 +624,8 @@ func TestGoAWKSpecificOptions(t *testing.T) {
 		{[]string{"-icsv", `{ print $2, $1 }`}, "Bob,42\nJane,37", "42 Bob\n37 Jane\n", ""},
 		{[]string{"-i", "csv", `{ print $2, $1 }`}, "Bob,42\nJane,37", "42 Bob\n37 Jane\n", ""},
 		{[]string{"-icsv", "-H", "-ocsv", `{ print @"age", @"name" }`}, "name,age\n\"Bo,ba\",42\nJane,37", "42,\"Bo,ba\"\n37,Jane\n", ""},
+		{[]string{"-csv", `{ print $2, $1 }`}, "Bob,42\nJane,37", "42 Bob\n37 Jane\n", ""},
+		{[]string{"--csv", `{ print $2, $1 }`}, "Bob,42\nJane,37", "42 Bob\n37 Jane\n", ""},
 		{[]string{"-o", "csv", `BEGIN { print "foo,bar", 3.14, "baz" }`}, "", "\"foo,bar\",3.14,baz\n", ""},
 		{[]string{"-iabc", `{}`}, "", "", "invalid input mode \"abc\"\n"},
 		{[]string{"-oxyz", `{}`}, "", "", "invalid output mode \"xyz\"\n"},
Repository: getkin/kin-openapi (go)
Issue: Crash on load
Loading this spec causes panic:

```
openapi: 3.0.1
info:
  title: Swagger API
  version: v1
paths:
  /test:
    post:
      requestBody:
        content:
          application/json:
```




Pull request description: fix crash on load
fix #794 

Patch:
diff --git a/openapi3/loader.go b/openapi3/loader.go
index 4a14f67..3b50a64 100644
--- a/openapi3/loader.go
+++ b/openapi3/loader.go
@@ -615,6 +615,9 @@ func (loader *Loader) resolveRequestBodyRef(doc *T, component *RequestBodyRef, d
 	}
 
 	for _, contentType := range value.Content {
+		if contentType == nil {
+			continue
+		}
 		examples := make([]string, 0, len(contentType.Examples))
 		for name := range contentType.Examples {
 			examples = append(examples, name)


Test patch:
diff --git a/openapi3/issue794_test.go b/openapi3/issue794_test.go
new file mode 100644
index 0000000..4958d29
--- /dev/null
+++ b/openapi3/issue794_test.go
@@ -0,0 +1,15 @@
+package openapi3
+
+import (
+	"testing"
+
+	"github.com/stretchr/testify/require"
+)
+
+func TestCrashOnLoad(t *testing.T) {
+	loader := NewLoader()
+	doc, err := loader.LoadFromFile("testdata/issue794.yml")
+	require.NoError(t, err)
+	err = doc.Validate(loader.Context)
+	require.NoError(t, err)
+}
diff --git a/openapi3/testdata/issue794.yml b/openapi3/testdata/issue794.yml
new file mode 100644
index 0000000..3cd4dc7
--- /dev/null
+++ b/openapi3/testdata/issue794.yml
@@ -0,0 +1,13 @@
+openapi: 3.0.1
+info:
+  title: Swagger API
+  version: v1
+paths:
+  /test:
+    post:
+      requestBody:
+        content:
+          application/json:
+      responses:
+        "200":
+          description: description
Repository: d5/tengo (go)
Issue: Runtime panic on self assignment 
The following Tengo script panics at run time:

a := a.foo

This likely because the compiler wrongly considers a to be defined after the := . A should only be considered defined in the next statement.
Pull request description: fix runtime panics on self assignment
fixes #386 

I'm not sure this is the best solution to the problem, but it's fairly minimal. I can't really think of anything other than functions that might need this recursive definition.

@d5 thoughts?

Patch:
diff --git a/compiler.go b/compiler.go
index 6591603..0d46a4d 100644
--- a/compiler.go
+++ b/compiler.go
@@ -692,12 +692,15 @@ func (c *Compiler) compileAssign(
 		return c.errorf(node, "operator ':=' not allowed with selector")
 	}
 
+	_, isFunc := rhs[0].(*parser.FuncLit)
 	symbol, depth, exists := c.symbolTable.Resolve(ident, false)
 	if op == token.Define {
 		if depth == 0 && exists {
 			return c.errorf(node, "'%s' redeclared in this block", ident)
 		}
-		symbol = c.symbolTable.Define(ident)
+		if isFunc {
+			symbol = c.symbolTable.Define(ident)
+		}
 	} else {
 		if !exists {
 			return c.errorf(node, "unresolved reference '%s'", ident)
@@ -718,6 +721,10 @@ func (c *Compiler) compileAssign(
 		}
 	}
 
+	if op == token.Define && !isFunc {
+		symbol = c.symbolTable.Define(ident)
+	}
+
 	switch op {
 	case token.AddAssign:
 		c.emit(node, parser.OpBinaryOp, int(token.Add))


Test patch:
diff --git a/compiler_test.go b/compiler_test.go
index fd1d422..d525b47 100644
--- a/compiler_test.go
+++ b/compiler_test.go
@@ -1023,6 +1023,8 @@ func TestCompilerErrorReport(t *testing.T) {
 
 	expectCompileError(t, `a = 1`,
 		"Compile Error: unresolved reference 'a'\n\tat test:1:1")
+	expectCompileError(t, `a := a`,
+		"Compile Error: unresolved reference 'a'\n\tat test:1:6")
 	expectCompileError(t, `a, b := 1, 2`,
 		"Compile Error: tuple assignment not allowed\n\tat test:1:1")
 	expectCompileError(t, `a.b := 1`,
Repository: fabien0102/ts-to-zod (ts)
Issue: Schema for picked and nullabled type is not nullable
## Bug description

When picking a subtype and marking it nullable, the generated zod schema loses the nullable attribute

### Input

```ts
export type foo = {
        bar: number;
}

export type bla = foo['bar'] | null
```

### Expected output

```ts
export const blaSchema = fooSchema.shape.bar.nullable();
```

### Actual output

```ts
export const blaSchema = fooSchema.shape.bar
```

**Versions**

- Typescript: `4.9.3`
- Zod: `3.21.4`

Pull request description: fix: handling optional & nullable in IndedexedAccessType
Fixes #129 

Patch:
diff --git a/src/core/generateZodSchema.ts b/src/core/generateZodSchema.ts
index 37500e3..821b30d 100644
--- a/src/core/generateZodSchema.ts
+++ b/src/core/generateZodSchema.ts
@@ -845,12 +845,15 @@ function buildZodPrimitive({
   }
 
   if (ts.isIndexedAccessTypeNode(typeNode)) {
-    return buildSchemaReference({
-      node: typeNode,
-      getDependencyName,
-      sourceFile,
-      dependencies,
-    });
+    return withZodProperties(
+      buildSchemaReference({
+        node: typeNode,
+        getDependencyName,
+        sourceFile,
+        dependencies,
+      }),
+      zodProperties
+    );
   }
 
   switch (typeNode.kind) {


Test patch:
diff --git a/src/core/generateZodSchema.test.ts b/src/core/generateZodSchema.test.ts
index 7649987..293897c 100644
--- a/src/core/generateZodSchema.test.ts
+++ b/src/core/generateZodSchema.test.ts
@@ -556,6 +556,26 @@ describe("generateZodSchema", () => {
     );
   });
 
+  it("should deal with nullable index access type (1st level)", () => {
+    const source = `export type SupermanName = Superman["name"] | null`;
+
+    expect(generate(source)).toMatchInlineSnapshot(
+      `"export const supermanNameSchema = supermanSchema.shape.name.nullable();"`
+    );
+  });
+
+  it("should deal with optional index access type (1st level)", () => {
+    const source = `export type SupermanName = {
+      name?: Superman["name"]
+    }`;
+
+    expect(generate(source)).toMatchInlineSnapshot(`
+      "export const supermanNameSchema = z.object({
+          name: supermanSchema.shape.name.optional()
+      });"
+      `);
+  });
+
   it("should deal with record with a union as key", () => {
     const source = `
     export type AvailablePower = Record<Power, boolean>;