selection_rank int64 0 10k | uid stringlengths 17 29 | source stringclasses 7
values | split stringclasses 3
values | row_idx int64 0 58.9k | instance_id stringlengths 14 120 | repo stringclasses 246
values | repo_canon stringclasses 232
values | language stringclasses 8
values | base_commit stringlengths 40 40 ⌀ | problem_statement stringlengths 84 23.6k | extra_context stringclasses 626
values | hints stringlengths 0 59.3k | patch stringlengths 252 175k | test_patch stringlengths 0 358k | f2p stringlengths 10 155k ⌀ | p2p stringlengths 2 1.75M ⌀ | env_image stringlengths 41 154 ⌀ | env_available bool 1
class | created_at stringlengths 10 20 ⌀ | n_src_files int64 1 15 | src_lines int64 1 1.48k | n_f2p float64 1 1.87k ⌀ | ps_chars int64 84 23.6k | leak_ratio float64 0 0.6 | s_prior float64 0.6 1 | s_verif float64 0.75 1 | s_ps float64 0.04 1 | s_patch float64 0.07 1 | s_tiebreak float64 0.02 1 | score float64 47.9 98.6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7,100 | swe_smith::train::49392 | swe_smith | train | 49,392 | mozilla__bleach.73871d76.func_pm_class_rm_funcs__3onihzgj | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | #### Description
HTML parsing fails with NameError when processing elements with namespaces or certain operations. Multiple methods are missing from the Element class in the etree treebuilder.
#### Steps/Code to Reproduce
```python
import bleach
# This should work but raises NameError
bleach.clean('<em>test</em>')
... | diff --git a/bleach/_vendor/html5lib/treebuilders/etree.py b/bleach/_vendor/html5lib/treebuilders/etree.py
index 5ccfc4d..0d9939e 100644
--- a/bleach/_vendor/html5lib/treebuilders/etree.py
+++ b/bleach/_vendor/html5lib/treebuilders/etree.py
@@ -34,13 +34,6 @@ def getETreeBuilder(ElementTreeImplementation, fullTree=Fals... | ["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 29 | 185 | 819 | 0 | 0.6 | 1 | 0.75 | 1 | 0.233167 | 80.9745 | |||
7,101 | swe_smith::train::28289 | swe_smith | train | 28,289 | encode__starlette.db5063c2.combine_file__26u4bgsu | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | URLPath constructor concatenates host and path incorrectly
#### Description
When creating a URLPath instance with both host and path parameters, the constructor incorrectly concatenates the host directly with the path without proper URL formatting.
#### Steps/Code to Reproduce
```python
from starlette.datastructure... | diff --git a/starlette/datastructures.py b/starlette/datastructures.py
index 90a7296..89a0fd2 100644
--- a/starlette/datastructures.py
+++ b/starlette/datastructures.py
@@ -174,16 +174,17 @@ class URLPath(str):
"""
def __new__(cls, path: str, protocol: str = "", host: str = "") -> URLPath:
- assert p... | ["tests/test_authentication.py::test_authentication_redirect[asyncio]", "tests/test_authentication.py::test_authentication_redirect[trio]", "tests/test_config.py::test_config", "tests/test_requests.py::test_request_url_starlette_context[asyncio]", "tests/test_requests.py::test_request_url_starlette_context[trio]", "tes... | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 17 | 22 | 1,058 | 0 | 0.6 | 1 | 0.75 | 1 | 0.233 | 80.974 | |||
7,102 | swe_smith::train::12170 | swe_smith | train | 12,170 | lepture__mistune.bf54ef67.combine_module__58rogjz5 | swesmith/lepture__mistune.bf54ef67 | lepture/mistune | python | null | Footnotes plugin breaks with TypeError when processing reference footnotes
#### Description
The footnotes plugin is throwing a TypeError when processing reference footnotes. The error occurs when trying to use string methods on what appears to be a list object.
#### Steps/Code to Reproduce
```python
import mistune
... | diff --git a/src/mistune/plugins/footnotes.py b/src/mistune/plugins/footnotes.py
index 96fe8df..57aea3d 100644
--- a/src/mistune/plugins/footnotes.py
+++ b/src/mistune/plugins/footnotes.py
@@ -53,13 +53,13 @@ def parse_ref_footnote(
) -> int:
ref = state.env.get("ref_footnotes")
if not ref:
- ref = {}... | ["tests/test_plugins.py::TestPlugin1_footnotes::test_footnotes_002", "tests/test_plugins.py::TestPlugin1_footnotes::test_footnotes_003", "tests/test_plugins.py::TestPlugin2_footnotes::test_footnotes_002", "tests/test_plugins.py::TestPlugin2_footnotes::test_footnotes_003", "tests/test_plugins.py::TestPlugin1_spoiler::te... | ["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx... | jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67 | true | null | 2 | 10 | 10 | 1,198 | 0 | 0.6 | 1 | 0.75 | 1 | 0.233 | 80.974 | |||
7,103 | swe_smith::train::2948 | swe_smith | train | 2,948 | madzak__python-json-logger.5f85723f.func_pm_ctrl_shuffle__akdfdoh3 | swesmith/madzak__python-json-logger.5f85723f | madzak/python-json-logger | python | null | JsonFormatter initialization order causes AttributeError
#### Description
When creating a JsonFormatter instance, an AttributeError is raised because attributes are being accessed before they are defined in the `__init__` method.
#### Steps/Code to Reproduce
```python
import logging
from pythonjsonlogger import jso... | diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py
index 519a64d..884e05f 100644
--- a/src/pythonjsonlogger/jsonlogger.py
+++ b/src/pythonjsonlogger/jsonlogger.py
@@ -121,6 +121,17 @@ class JsonFormatter(logging.Formatter):
timestamp: Union[bool, str] = False,
**kwarg... | ["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg... | ["tests/test_jsonlogger.py::TestJsonLogger::test_merge_record_extra"] | jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f | true | null | 1 | 23 | 19 | 938 | 0 | 0.6 | 1 | 0.75 | 1 | 0.233 | 80.974 | |||
7,104 | swe_smith::train::24357 | swe_smith | train | 24,357 | sunpy__sunpy.f8edfd5c.func_pm_remove_loop__aiz3acgz | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | Time parsing fails for various date formats after regex replacement removal
#### Description
Time parsing is broken for many common date/time formats. The `parse_time` function now fails to parse strings that were previously working, throwing `ValueError: Input values did not match any of the formats` errors.
#### S... | diff --git a/sunpy/time/time.py b/sunpy/time/time.py
index 0d760c5..a97bf7f 100644
--- a/sunpy/time/time.py
+++ b/sunpy/time/time.py
@@ -102,11 +102,6 @@ def _n_or_eq(a, b):
def _regex_parse_time(inp, format):
- # Parser for finding out the minute value so we can adjust the string
- # from 24:00:00 to 00:00:... | ["sunpy/time/tests/test_time.py::test_parse_time_24", "sunpy/time/tests/test_time.py::test_parse_time_24_2", "sunpy/time/tests/test_time.py::test_parse_time_microseconds_excess_trailing_zeros", "sunpy/time/tests/test_time.py::test_parse_time_utc[2007-05-04T21:08:12.999999-2007/05/04T21:08:12.999999]", "sunpy/time/tests... | ["sunpy/time/tests/test_time.py::test_parse_time_tuple", "sunpy/time/tests/test_time.py::test_parse_time_int", "sunpy/time/tests/test_time.py::test_parse_time_pandas_timestamp", "sunpy/time/tests/test_time.py::test_parse_time_nanoseconds", "sunpy/time/tests/test_time.py::test_parse_time_pandas_series", "sunpy/time/test... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 6 | 25 | 1,278 | 0 | 0.6 | 1 | 0.75 | 1 | 0.233 | 80.974 | |||
7,105 | swe_smith::train::24315 | swe_smith | train | 24,315 | sunpy__sunpy.f8edfd5c.func_pm_remove_cond__e2aaepbj | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | SRS file parsing fails with IndexError: list index out of range
#### Description
When trying to read SRS files, the parser is throwing an `IndexError: list index out of range` error. This appears to be happening across multiple SRS files from different time periods.
#### Steps/Code to Reproduce
```python
from sunpy... | diff --git a/sunpy/io/special/srs.py b/sunpy/io/special/srs.py
index bde7f94..6e75edc 100644
--- a/sunpy/io/special/srs.py
+++ b/sunpy/io/special/srs.py
@@ -137,8 +137,6 @@ def split_lines(file_lines):
section_lines = []
final_section_lines = []
for i, line in enumerate(file_lines):
- if re.match(... | ["sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150906SRS.txt-5]", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150306SRS.txt-4]", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150101SRS.txt-9]", "sunpy/io/tests/test_s... | ["sunpy/io/tests/test_srs.py::test_parse_longitude[N10W05-5]", "sunpy/io/tests/test_srs.py::test_parse_longitude[N89E00-0]", "sunpy/io/tests/test_srs.py::test_parse_longitude[S33E02--2]", "sunpy/io/tests/test_srs.py::test_parse_longitude[S01-None]", "sunpy/io/tests/test_srs.py::test_parse_latitude[N10W05-10]", "sunpy/i... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 16 | 12 | 1,077 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232833 | 80.9735 | |||
7,106 | swe_smith::train::29650 | swe_smith | train | 29,650 | cookiecutter__cookiecutter.b4451231.func_pm_remove_assign__brekbh1h | swesmith/cookiecutter__cookiecutter.b4451231 | cookiecutter/cookiecutter | python | null | NameError: name 'size' is not defined in prompt_for_config
#### Description
When using cookiecutter templates, the prompt_for_config function fails with a NameError because the variable 'size' is not defined. This affects template generation and causes the cookiecutter process to crash.
#### Steps/Code to Reproduce
... | diff --git a/cookiecutter/prompt.py b/cookiecutter/prompt.py
index f17112f..428f614 100644
--- a/cookiecutter/prompt.py
+++ b/cookiecutter/prompt.py
@@ -288,7 +288,6 @@ def prompt_for_config(
"""
cookiecutter_dict = OrderedDict([])
env = create_env_with_context(context)
- prompts = context['cookiecutt... | ["tests/test_cli.py::test_cli_error_on_existing_output_directory", "tests/test_cli.py::test_cli", "tests/test_cli.py::test_cli_verbose", "tests/test_cli.py::test_cli_overwrite_if_exists_when_output_dir_does_not_exist[-f]", "tests/test_cli.py::test_cli_overwrite_if_exists_when_output_dir_does_not_exist[--overwrite-if-ex... | ["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl... | jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231 | true | null | 1 | 9 | 52 | 1,217 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232833 | 80.9735 | |||
7,107 | swe_smith::train::47981 | swe_smith | train | 47,981 | sqlfluff__sqlfluff.50a1c4b6.func_basic__okfvt0mf | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | Python templater returns unexpected errors and wrong error messages
#### Description
The Python templater is behaving incorrectly in several ways:
1. It's returning unexpected errors even for successful templating operations
2. Error messages reference the wrong magic key name ('fname' instead of 'sqlfluff')
3. The ... | diff --git a/src/sqlfluff/core/templaters/python.py b/src/sqlfluff/core/templaters/python.py
index a2126a8..ebe306e 100644
--- a/src/sqlfluff/core/templaters/python.py
+++ b/src/sqlfluff/core/templaters/python.py
@@ -266,11 +266,11 @@ class PythonTemplater(RawTemplater):
rendered_str = raw_str_with_dot... | ["test/core/templaters/python_test.py::test__templater_python"] | ["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 8 | 1 | 1,237 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232833 | 80.9735 | |||
7,108 | swe_smith::train::31356 | swe_smith | train | 31,356 | benoitc__gunicorn.bacbf8aa.combine_file__47v46c3j | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | WSGIApplication fails to start without application module when no args provided
#### Description
When starting gunicorn without specifying an application module, the application silently fails to raise the expected error message. The WSGIApplication should raise a ConfigError with "No application module specified." b... | diff --git a/gunicorn/app/wsgiapp.py b/gunicorn/app/wsgiapp.py
index 1b0ba96..3a38469 100644
--- a/gunicorn/app/wsgiapp.py
+++ b/gunicorn/app/wsgiapp.py
@@ -13,7 +13,7 @@ class WSGIApplication(Application):
def init(self, parser, opts, args):
self.app_uri = None
- if opts.paste:
+ if not o... | ["tests/test_config.py::test_wsgi_app_config[options0-app:app]", "tests/test_config.py::test_wsgi_app_config[options1-app:app]", "tests/test_config.py::test_wsgi_app_config[options2-app:app]", "tests/test_config.py::test_wsgi_app_config[options3-app1:app1]", "tests/test_config.py::test_non_wsgi_app[options0]", "tests/t... | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 1 | 16 | 6 | 1,077 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232833 | 80.9735 | |||
7,109 | swe_smith::train::7625 | swe_smith | train | 7,625 | cantools__cantools.0c6a7871.func_basic__kvslzkd9 | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | SYM format export generates invalid syntax for signal comments
#### Description
When exporting a database to SYM format, signal comments are being written with incorrect comment syntax, causing parsing errors when trying to reload the file.
#### Steps/Code to Reproduce
```python
import cantools
# Load any database... | diff --git a/src/cantools/database/can/formats/sym.py b/src/cantools/database/can/formats/sym.py
index 4bdc121..fe1af92 100644
--- a/src/cantools/database/can/formats/sym.py
+++ b/src/cantools/database/can/formats/sym.py
@@ -828,27 +828,25 @@ def _get_signal_type(signal: Signal) -> str:
return 'unsigned'
... | ["tests/test_database.py::CanToolsDatabaseTest::test_jopp_6_0_sym_re_read", "tests/test_database.py::CanToolsDatabaseTest::test_multiline_enum_sym_parsing", "tests/test_database.py::CanToolsDatabaseTest::test_vehicle"] | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 16 | 3 | 1,077 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232833 | 80.9735 | |||
7,110 | swe_smith::train::3496 | swe_smith | train | 3,496 | pygments__pygments.27649ebb.combine_file__s09t7faf | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | LassoLexer initialization breaks with AttributeError on list objects
#### Description
The LassoLexer is throwing AttributeError when trying to use the `update` method on list objects. This appears to be happening during lexer initialization when processing builtins and members.
#### Steps/Code to Reproduce
```pytho... | diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py
index 891e48e..26f8fad 100644
--- a/pygments/lexers/javascript.py
+++ b/pygments/lexers/javascript.py
@@ -751,17 +751,17 @@ class LassoLexer(RegexLexer):
def __init__(self, **options):
self.builtinshighlighting = get_bool_opt(
- ... | ["tests/test_cmdline.py::test_C_opt", "tests/test_cmdline.py::test_stdin", "tests/test_basic_api.py::test_lexer_options[LassoHtmlLexer]", "tests/test_basic_api.py::test_lexer_options[LassoJavascriptLexer]", "tests/test_basic_api.py::test_random_input[LassoHtmlLexer]", "tests/test_basic_api.py::test_random_input[LassoCs... | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 26 | 28 | 877 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232833 | 80.9735 | |||
7,111 | swe_smith::train::8320 | swe_smith | train | 8,320 | cantools__cantools.0c6a7871.lm_rewrite__v4vf51cv | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | Cannot retrieve data by name in DID objects
Description
When trying to access data items in a DID object by name, I'm getting an error. The `get_data_by_name` method is not working correctly.
For example:
```python
db = cantools.db.load_file('example.cdd')
did = db.get_did_by_name('ECU_Identification')
data = did.ge... | diff --git a/src/cantools/database/diagnostics/did.py b/src/cantools/database/diagnostics/did.py
index 5a0712c..a8b1135 100644
--- a/src/cantools/database/diagnostics/did.py
+++ b/src/cantools/database/diagnostics/did.py
@@ -71,12 +71,18 @@ class Did:
self._datas = value
def get_data_by_name(self, name)... | ["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_le_example_cdd"] | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 14 | 2 | 1,117 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232833 | 80.9735 | |||
7,112 | r2e_gym::train::6359 | r2e_gym | train | 6,359 | pillow__e41cfade29727bd8faff7742905f36f26819e5e8 | pillow | python-pillow/pillow | python | e41cfade29727bd8faff7742905f36f26819e5e8 | **Analysis:**
- **Key Parts from Commit Details:**
- **Commit Message:** "Add JPEG comment to info dictionary."
- **Patch:** Added `self.info["comment"] = s` in `JpegImagePlugin.py`.
- **Test Results:**
- **Old Commit:** The test `test_app` failed with `KeyError: 'comment'`.
- **New Commit:** All tests p... | diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst
--- a/docs/handbook/image-file-formats.rst
+++ b/docs/handbook/image-file-formats.rst
@@ -298,6 +298,11 @@
**exif**
Raw EXIF data from the image.
+**comment**
+ A comment about the image.
+
+ .. versionadded:: 7.1.0
+... | diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py
--- a/Tests/test_file_jpeg.py
+++ b/Tests/test_file_jpeg.py
@@ -59,6 +59,8 @@
b"File written by Adobe Photoshop\xa8 4.0\x00",
)
assert len(im.applist) == 2
+
+ assert im.info["comment"] == b"File written... | null | null | namanjain12/pillow_final:e41cfade29727bd8faff7742905f36f26819e5e8 | true | null | 3 | 15 | null | 1,809 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3515 | 80.97325 | ||
7,113 | swe_smith::train::35477 | swe_smith | train | 35,477 | stanfordnlp__dspy.651a4c71.func_pm_ctrl_invert_if__h5xg31ql | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # Validation set check logic is inverted in MIPROv2
## Description
I found a bug in the MIPROv2 class where the validation set check logic is inverted. When a validation set is provided, the code doesn't check if it has at least 1 example. Instead, it checks this condition only when the validation set is None, which ... | diff --git a/dspy/teleprompt/mipro_optimizer_v2.py b/dspy/teleprompt/mipro_optimizer_v2.py
index 711b227..3f741a8 100644
--- a/dspy/teleprompt/mipro_optimizer_v2.py
+++ b/dspy/teleprompt/mipro_optimizer_v2.py
@@ -258,18 +258,17 @@ class MIPROv2(Teleprompter):
raise ValueError("Trainset cannot be empty.")
... | ["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"] | ["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 7 | 4 | 1,256 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232667 | 80.973 | |||
7,114 | swe_smith::train::56861 | swe_smith | train | 56,861 | hypermodeinc__ristretto.da570116.func_pm_flip_operators__xqm4ql4l | swesmith/hypermodeinc__ristretto.da570116 | hypermodeinc/ristretto | go | null | Tree reinit logic broken causing index out of range panic
When loading a persistent btree, the reinit function has incorrect logic that causes an index out of range panic during tree iteration.
#### Steps to Reproduce
```go
package main
import (
"os"
"github.com/dgraph-io/ristretto/v2/z"
)
func main() {
... | diff --git a/z/btree.go b/z/btree.go
index 412657b..0da553f 100644
--- a/z/btree.go
+++ b/z/btree.go
@@ -89,9 +89,9 @@ func NewTreePersistent(path string) (*Tree, error) {
func (t *Tree) reinit() {
// Calculate t.nextPage by finding the first node whose pageID is not set.
t.nextPage = 1
- for int(t.nextPage)*pageS... | ["TestTreePersistent"] | ["TestCacheKeyToHash", "TestCacheMaxCost", "TestUpdateMaxCost", "TestRemainingCost", "TestNewCache", "TestNilCache", "TestMultipleClose", "TestSetAfterClose", "TestClearAfterClose", "TestGetAfterClose", "TestDelAfterClose", "TestCacheProcessItems", "TestCacheGet", "TestCacheSet", "TestCacheInternalCost", "TestRecacheWi... | jyangballin/swesmith.x86_64.hypermodeinc_1776_ristretto.da570116 | true | null | 1 | 12 | 1 | 1,156 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232667 | 80.973 | |||
7,115 | swe_smith::train::12814 | swe_smith | train | 12,814 | python-openxml__python-docx.0cf6d71f.combine_file__cala5pj3 | swesmith/python-openxml__python-docx.0cf6d71f | python-openxml/python-docx | python | null | PhysPkgReader factory returns wrong class type
When creating a PhysPkgReader instance, the factory method returns the wrong class type due to incorrect variable scoping. The `reader_cls` variable is referenced before it's defined, causing the factory to fail to return the appropriate reader class.
#### Steps/Code to ... | diff --git a/src/docx/opc/phys_pkg.py b/src/docx/opc/phys_pkg.py
index 5ec3223..55ea195 100644
--- a/src/docx/opc/phys_pkg.py
+++ b/src/docx/opc/phys_pkg.py
@@ -11,6 +11,8 @@ class PhysPkgReader:
"""Factory for physical package reader objects."""
def __new__(cls, pkg_file):
+
+ return super(PhysPkgRe... | ["tests/opc/test_phys_pkg.py::DescribeDirPkgReader::it_is_used_by_PhysPkgReader_when_pkg_is_a_dir", "tests/opc/test_phys_pkg.py::DescribePhysPkgReader::it_raises_when_pkg_path_is_not_a_package", "tests/opc/test_phys_pkg.py::DescribeZipPkgReader::it_is_used_by_PhysPkgReader_when_pkg_is_a_zip", "tests/opc/test_phys_pkg.p... | ["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows... | jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f | true | null | 1 | 9 | 11 | 1,216 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232667 | 80.973 | |||
7,116 | swe_smith::train::27765 | swe_smith | train | 27,765 | arrow-py__arrow.1d70d009.func_pm_remove_assign__xgmepmav | swesmith/arrow-py__arrow.1d70d009 | arrow-py/arrow | python | null | NameError when using unsupported frame names in Arrow range and span methods
#### Description
When calling `Arrow.range()` or `Arrow.span()` with an unsupported frame name, a `NameError` is raised instead of the expected `ValueError` with a helpful error message.
#### Steps/Code to Reproduce
```python
import arrow
... | diff --git a/arrow/arrow.py b/arrow/arrow.py
index 9d1f5e3..930e191 100644
--- a/arrow/arrow.py
+++ b/arrow/arrow.py
@@ -1832,23 +1832,9 @@ class Arrow:
elif name in ["quarter", "quarters"]:
return "quarter", "months", 3
else:
- supported = ", ".join(
- [
- ... | ["tests/test_arrow.py::TestArrowRange::test_unsupported", "tests/test_arrow.py::TestArrowSpan::test_span_attribute"] | ["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te... | jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009 | true | null | 1 | 14 | 2 | 1,116 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232667 | 80.973 | |||
7,117 | swe_smith::train::8922 | swe_smith | train | 8,922 | pyupio__safety.7654596b.func_pm_remove_assign__etnw4lzf | swesmith/pyupio__safety.7654596b | pyupio/safety | python | null | AttributeError when running scan command in offline mode
#### Description
When running the `safety scan` command without platform authentication enabled (offline mode), the command fails with an AttributeError because the project object is not properly initialized.
#### Steps/Code to Reproduce
```python
from safety... | diff --git a/safety/scan/decorators.py b/safety/scan/decorators.py
index 72d7e4e..e76ed71 100644
--- a/safety/scan/decorators.py
+++ b/safety/scan/decorators.py
@@ -80,7 +80,6 @@ def scan_project_command_init(func):
print_header(console=console, targets=[target])
stage = ctx.obj.auth.stage
- ... | ["tests/test_cli.py::TestSafetyCLI::test_debug_flag"] | ["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t... | jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b | true | null | 1 | 23 | 1 | 936 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232667 | 80.973 | |||
7,118 | swe_smith::train::24894 | swe_smith | train | 24,894 | marshmallow-code__marshmallow.9716fc62.func_pm_remove_cond__1htpflqa | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | Error merging not working correctly when both errors are dicts
When trying to merge two error dictionaries, the merge operation doesn't work as expected. Instead of properly combining the errors from both dictionaries, it seems to be wrapping one of them in a `_schema` key.
#### Steps/Code to Reproduce
```python
fro... | diff --git a/src/marshmallow/error_store.py b/src/marshmallow/error_store.py
index 72b7037..92242f5 100644
--- a/src/marshmallow/error_store.py
+++ b/src/marshmallow/error_store.py
@@ -44,17 +44,9 @@ def merge_errors(errors1, errors2):
if isinstance(errors1, dict):
if isinstance(errors2, list):
... | ["tests/test_decorators.py::TestValidatesDecorator::test_validates_with_data_key", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_multiple_validators", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_multiple_validators_merge_dict_errors", "tests/test_deserialization.py::TestSchemaDeseriali... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 10 | 27 | 1,196 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232667 | 80.973 | |||
7,119 | swe_bench::test::965 | swe_bench | test | 965 | matplotlib__matplotlib-20584 | matplotlib/matplotlib | matplotlib/matplotlib | python | 06141dab06373d0cb2806b3aa87ca621fbf5c426 | set_segments(get_segments()) makes lines coarse
After plotting with `contourf`, I would like to retrieve the lines and manipulate them. Unfortunately, I noticed that the result is much coarser than without manipulation. In fact, a simple `lc.set_segments(lc.get_segments())` has this effect. I would have expected this d... | Aha: There is
```
c.allsegs
```
which can be manipulated instead.
Hi @nschloe, has your problem been resolved?
Interesting between 3.4.2 and the default branch this has changed from a `LineCollection` to a `PathCollection` which notable does not even _have_ a `get_segments`.
`get_segments()` was wrong apparently, s... | diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py
--- a/lib/matplotlib/collections.py
+++ b/lib/matplotlib/collections.py
@@ -1461,7 +1461,14 @@ def get_segments(self):
segments = []
for path in self._paths:
- vertices = [vertex for vertex, _ in path.iter_segments... | diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py
--- a/lib/matplotlib/tests/test_collections.py
+++ b/lib/matplotlib/tests/test_collections.py
@@ -1039,3 +1039,12 @@ def test_quadmesh_cursor_data():
x, y = ax.transData.transform([-1, 101])
event = MouseE... | ["lib/matplotlib/tests/test_collections.py::test_get_segments"] | ["lib/matplotlib/tests/test_collections.py::test__EventCollection__get_props[png]", "lib/matplotlib/tests/test_collections.py::test__EventCollection__get_props[pdf]", "lib/matplotlib/tests/test_collections.py::test__EventCollection__set_positions[png]", "lib/matplotlib/tests/test_collections.py::test__EventCollection__... | null | true | 2021-07-06T19:51:52Z | 1 | 9 | 1 | 1,015 | 0 | 0.8 | 1 | 0.55 | 1 | 0.199167 | 80.9725 | |
7,120 | swe_smith::train::18516 | swe_smith | train | 18,516 | HIPS__autograd.ac044f0d.lm_rewrite__62xrpn0x | swesmith/HIPS__autograd.ac044f0d | hips/autograd | python | null | Sorting Functionality Not Handling Multi-Dimensional Arrays
**Describe the bug & Reproduce**
I encountered an issue with the sorting functionality when working with multi-dimensional arrays. It seems that the gradient computation for sorting is not implemented for arrays with more than one dimension. This is causing ... | diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py
index 08d4e1b..1026f22 100644
--- a/autograd/numpy/numpy_vjps.py
+++ b/autograd/numpy/numpy_vjps.py
@@ -767,13 +767,10 @@ def wrapped_reshape(x, *args, **kwargs):
setattr(ArrayBox, "reshape", wrapped_reshape)
-def grad_sort(ans, x, axis=-1, k... | ["tests/test_systematic.py::test_sort"] | ["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_... | jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d | true | null | 1 | 11 | 1 | 1,175 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2325 | 80.9725 | |||
7,121 | swe_smith::train::29002 | swe_smith | train | 29,002 | tox-dev__pipdeptree.c31b6418.combine_file__41p15jiv | swesmith/tox-dev__pipdeptree.c31b6418 | tox-dev/pipdeptree | python | null | CLI argument parsing broken after recent changes
#### Description
The command line argument parsing is completely broken. When trying to use any CLI options, the parser throws `ValueError: default value should be among the enum choices` errors.
#### Steps/Code to Reproduce
```python
from pipdeptree._cli import buil... | diff --git a/src/pipdeptree/_cli.py b/src/pipdeptree/_cli.py
index 46a984a..c06b437 100644
--- a/src/pipdeptree/_cli.py
+++ b/src/pipdeptree/_cli.py
@@ -159,12 +159,12 @@ def get_options(args: Sequence[str] | None) -> Options:
parser = build_parser()
parsed_args = parser.parse_args(args)
- if parsed_args... | ["tests/render/test_render.py::test_json_routing", "tests/render/test_render.py::test_json_tree_routing", "tests/render/test_render.py::test_mermaid_routing", "tests/render/test_render.py::test_grahpviz_routing", "tests/render/test_render.py::test_text_routing", "tests/test_cli.py::test_parser_default", "tests/test_cli... | ["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack... | jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418 | true | null | 1 | 22 | 39 | 955 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2325 | 80.9725 | |||
7,122 | swe_smith::train::29863 | swe_smith | train | 29,863 | getnikola__nikola.0f4c230e.func_pm_ctrl_shuffle__1ye5fa2a | swesmith/getnikola__nikola.0f4c230e | getnikola/nikola | python | null | NikolaMetadata write_metadata method broken due to variable ordering
Description
The `write_metadata` method in `NikolaMetadata` class is broken and raises `UnboundLocalError` when trying to write metadata. Variables are being used before they are defined due to incorrect code ordering.
Steps/Code to Reproduce
```p... | diff --git a/nikola/metadata_extractors.py b/nikola/metadata_extractors.py
index 87013ee..027fbee 100644
--- a/nikola/metadata_extractors.py
+++ b/nikola/metadata_extractors.py
@@ -158,27 +158,26 @@ class NikolaMetadata(MetadataExtractor):
return outdict
def write_metadata(self, metadata: dict, comment_... | ["tests/integration/test_wordpress_import.py::test_filled_directories[pages]", "tests/test_utils.py::test_write_metadata_pelican_detection_default", "tests/test_utils.py::test_write_metadata_default", "tests/test_utils.py::test_write_metadata_fallbacks[foo]", "tests/test_utils.py::test_write_metadata_fallbacks[filename... | ["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o... | jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e | true | null | 1 | 27 | 5 | 855 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2325 | 80.9725 | |||
7,123 | swe_smith::train::26460 | swe_smith | train | 26,460 | pylint-dev__astroid.b114f6b5.func_pm_remove_cond__wtqnbts7 | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | object_type helper function fails with AssertionError for certain node types
#### Description
The `object_type` helper function in `astroid/helpers.py` is raising an `AssertionError` when encountering certain node types that are not explicitly handled in the function. This affects various inference operations through... | diff --git a/astroid/helpers.py b/astroid/helpers.py
index ea7523b..ac2f4a2 100644
--- a/astroid/helpers.py
+++ b/astroid/helpers.py
@@ -78,15 +78,6 @@ def _object_type(
yield _function_type(inferred, builtins)
elif isinstance(inferred, scoped_nodes.Module):
yield _build_proxy_class("... | ["tests/brain/test_brain.py::TestIsinstanceInference::test_isinstance_int_true", "tests/brain/test_brain.py::TestIsinstanceInference::test_isinstance_int_false", "tests/brain/test_brain.py::TestIsinstanceInference::test_isinstance_object_true", "tests/brain/test_brain.py::TestIsinstanceInference::test_isinstance_object... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 9 | 35 | 1,215 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2325 | 80.9725 | |||
7,124 | swe_smith::train::39963 | swe_smith | train | 39,963 | scanny__python-pptx.278b47b1.combine_file__2n2m78bv | swesmith/scanny__python-pptx.278b47b1 | scanny/python-pptx | python | null | spTree property returns None instead of actual spTree element
#### Description
When accessing the `spTree` property on slide elements, it returns `None` instead of the expected `CT_GroupShape` element. This breaks functionality that depends on accessing shapes within slides.
#### Steps/Code to Reproduce
```python
f... | diff --git a/src/pptx/oxml/slide.py b/src/pptx/oxml/slide.py
index 37a9780..1a12b59 100644
--- a/src/pptx/oxml/slide.py
+++ b/src/pptx/oxml/slide.py
@@ -31,7 +31,9 @@ class _BaseSlideElement(BaseOxmlElement):
@property
def spTree(self) -> CT_GroupShape:
"""Return required `p:cSld/p:spTree` grandchild... | ["tests/oxml/test_slide.py::DescribeCT_NotesMaster::it_can_create_a_default_notesMaster_element", "tests/shapes/test_shapetree.py::DescribeSlideShapes::it_adds_a_video_timing_to_help[add_timing_fixture0]", "tests/shapes/test_shapetree.py::DescribeSlideShapes::it_adds_a_video_timing_to_help[add_timing_fixture1]", "tests... | ["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr... | jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1 | true | null | 1 | 18 | 13 | 1,035 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2325 | 80.9725 | |||
7,125 | swe_bench::dev::194 | swe_bench | dev | 194 | sqlfluff__sqlfluff-3109 | sqlfluff/sqlfluff | sqlfluff/sqlfluff | python | 38c31c99f6be6c2ffcc9e4132387edb7af8c5d06 | Write-output human format does not produce result
### Search before asking
- [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues.
### What Happened
When running SQLFluff using the following statement:
`python -m sqlfluff lint --write-output test.txt --config=config/sq... | This line in cli.py seems largely to blame -- it somewhat conflates output _format_ with writing to a file or not.
```
non_human_output = (format != FormatType.human.value) or (write_output is not None)
```
It will require some care to fix this. Simply removing `or (write_output is not None)` didn't seem to fix i... | diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py
--- a/src/sqlfluff/cli/commands.py
+++ b/src/sqlfluff/cli/commands.py
@@ -1,6 +1,7 @@
"""Contains the CLI."""
from itertools import chain
+import os
import sys
import json
import logging
@@ -29,9 +30,10 @@
colorize,
format_dialect... | diff --git a/test/cli/commands_test.py b/test/cli/commands_test.py
--- a/test/cli/commands_test.py
+++ b/test/cli/commands_test.py
@@ -968,11 +968,12 @@ def test__cli__command_fail_nice_not_found(command):
@pytest.mark.parametrize(
- "serialize", ["yaml", "json", "github-annotation", "github-annotation-native"]... | ["test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_dialect_legacy", "test/cli/commands_test.py::test__cli__command_extra_config_fail", "test/cli/commands_test.py::test__cli__command_lint_stdin[command0]", "te... | [] | null | true | 2022-04-17T20:42:13Z | 3 | 184 | 177 | 1,519 | 0 | 0.8 | 1 | 0.7 | 0.75 | 0.753167 | 80.972 | |
7,126 | swe_smith::train::44438 | swe_smith | train | 44,438 | pydata__patsy.a5d16484.func_pm_remove_cond__0fbj58wt | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | Boolean array optimization removed breaks categorical conversion
When using boolean arrays with patsy's categorical conversion, the function now fails with a "Error interpreting categorical data: all items must be hashable" error. This appears to be related to the removal of a boolean array optimization path.
#### St... | diff --git a/patsy/categorical.py b/patsy/categorical.py
index c88ecd5..84fc4e4 100644
--- a/patsy/categorical.py
+++ b/patsy/categorical.py
@@ -339,15 +339,6 @@ def categorical_to_int(data, levels, NA_action, origin=None):
# second-guess its NA detection, so we can just pass it back.
return pandas_Ca... | ["patsy/categorical.py::test_categorical_to_int", "patsy/test_build.py::test_categorical", "patsy/test_build.py::test_contrast", "patsy/test_highlevel.py::test_data_types", "patsy/test_highlevel.py::test_categorical", "patsy/test_highlevel.py::test_0d_data", "patsy/test_regressions.py::test_issue_11"] | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 16 | 7 | 1,074 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232333 | 80.972 | |||
7,127 | swe_smith::train::23975 | swe_smith | train | 23,975 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__aossjhqx | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | MapSequence HTML representation fails with UnboundLocalError
#### Description
When trying to display a MapSequence in a Jupyter notebook or calling the HTML representation methods, an `UnboundLocalError` is raised because a local variable is accessed before being defined.
#### Steps/Code to Reproduce
```python
impo... | diff --git a/sunpy/map/mapsequence.py b/sunpy/map/mapsequence.py
index c875ad6..12051e5 100644
--- a/sunpy/map/mapsequence.py
+++ b/sunpy/map/mapsequence.py
@@ -109,20 +109,11 @@ class MapSequence:
f'MapSequence of {len(self.maps)} elements, with maps from {", ".join(names)}')
def _repr_html_(se... | ["sunpy/map/tests/test_mapsequence.py::test_repr_html", "sunpy/map/tests/test_mapsequence.py::test_quicklook"] | ["sunpy/map/tests/test_mapsequence.py::test_deprecations", "sunpy/map/tests/test_mapsequence.py::test_as_array_different_shapes", "sunpy/map/tests/test_mapsequence.py::test_as_array_no_masks", "sunpy/map/tests/test_mapsequence.py::test_as_array_all_masks", "sunpy/map/tests/test_mapsequence.py::test_as_array_some_masks"... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 17 | 2 | 1,054 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232333 | 80.972 | |||
7,128 | swe_smith::train::38148 | swe_smith | train | 38,148 | termcolor__termcolor.3a42086f.combine_file__kcolavuc | swesmith/termcolor__termcolor.3a42086f | termcolor/termcolor | python | null | colored() function produces incorrect output and raises KeyError
#### Description
The `colored()` function is not working correctly - it's producing text without proper ANSI escape sequences and raising KeyError exceptions when trying to use colors.
#### Steps/Code to Reproduce
```python
from termcolor import color... | diff --git a/src/termcolor/termcolor.py b/src/termcolor/termcolor.py
index 91f155a..9ba6a05 100644
--- a/src/termcolor/termcolor.py
+++ b/src/termcolor/termcolor.py
@@ -36,15 +36,10 @@ from ._types import Attribute, Color, Highlight
def __getattr__(name: str) -> list[str]:
if name == "__ALL__":
- warning... | ["tests/test_termcolor.py::test_basic", "tests/test_termcolor.py::test_sanity", "tests/test_termcolor.py::test_color[black-\\x1b[30mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[grey-\\x1b[30mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[red-\\x1b[31mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[gr... | ["tests/test_termcolor.py::test_environment_variables_disable_color[true-ANSI_COLORS_DISABLED]", "tests/test_termcolor.py::test_environment_variables_disable_color[true-NO_COLOR]", "tests/test_termcolor.py::test_environment_variables_disable_color[false-ANSI_COLORS_DISABLED]", "tests/test_termcolor.py::test_environment... | jyangballin/swesmith.x86_64.termcolor_1776_termcolor.3a42086f | true | null | 1 | 23 | 40 | 934 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232333 | 80.972 | |||
7,129 | swe_smith::train::22876 | swe_smith | train | 22,876 | graphql-python__graphene.82903263.func_basic__o9ox931w | swesmith/graphql-python__graphene.82903263 | graphql-python/graphene | python | null | Depth limit validation ignores all fields when no ignore rules specified
#### Description
When using the depth limit validator without specifying any ignore rules, all fields are being ignored instead of none. This causes the depth calculation to return 0 for all queries, effectively disabling depth limiting.
#### S... | diff --git a/graphene/validation/depth_limit.py b/graphene/validation/depth_limit.py
index e0f2866..5a33bab 100644
--- a/graphene/validation/depth_limit.py
+++ b/graphene/validation/depth_limit.py
@@ -178,18 +178,18 @@ def determine_depth(
def is_ignored(node: FieldNode, ignore: Optional[List[IgnoreType]] = None) ->... | ["graphene/validation/tests/test_depth_limit_validator.py::test_should_count_depth_without_fragment", "graphene/validation/tests/test_depth_limit_validator.py::test_should_count_with_fragments", "graphene/validation/tests/test_depth_limit_validator.py::test_should_catch_very_deep_query", "graphene/validation/tests/test... | ["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i... | jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263 | true | null | 1 | 10 | 5 | 1,194 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232333 | 80.972 | |||
7,130 | swe_smith::train::29673 | swe_smith | train | 29,673 | cookiecutter__cookiecutter.b4451231.lm_rewrite__9kxs7ws4 | swesmith/cookiecutter__cookiecutter.b4451231 | cookiecutter/cookiecutter | python | null | # Missing validation for 'cookiecutter' key in context dictionary
When dumping a replay file, the function doesn't check if the 'cookiecutter' key exists in the context dictionary. This can lead to unexpected behavior when trying to replay a template generation.
## Steps to reproduce
1. Create a context dictionary w... | diff --git a/cookiecutter/replay.py b/cookiecutter/replay.py
index de1eedd..0c79874 100644
--- a/cookiecutter/replay.py
+++ b/cookiecutter/replay.py
@@ -23,20 +23,15 @@ def get_file_name(replay_dir: Path | str, template_name: str) -> str:
return os.path.join(replay_dir, file_name)
-def dump(replay_dir: Path | ... | ["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context"] | ["tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_replay_file", "tests/replay/test_load.py::test_run_json_load", "tests/replay/... | jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231 | true | null | 1 | 13 | 1 | 1,133 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232167 | 80.9715 | |||
7,131 | swe_smith::train::5519 | swe_smith | train | 5,519 | PyCQA__flake8.cf1542ce.func_pm_class_rm_funcs__hno0ccb3 | swesmith/PyCQA__flake8.cf1542ce | pycqa/flake8 | python | null | FileProcessor missing file_tokens and delete_first_token methods
#### Description
After recent changes, the FileProcessor class is missing the `file_tokens` property and `delete_first_token` method that some plugins may depend on. This causes AttributeError when plugins try to access these methods.
#### Steps/Code t... | diff --git a/src/flake8/processor.py b/src/flake8/processor.py
index e44547b..1e3b4c3 100644
--- a/src/flake8/processor.py
+++ b/src/flake8/processor.py
@@ -117,12 +117,6 @@ class FileProcessor:
self.statistics = {"logical lines": 0}
self._fstring_start = -1
- @functools.cached_property
- def ... | ["tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_line_check_results[plugin_func_physical_ret-1]", "tests/integration/test_checker.py::test_line_check_results[plugin_func_physical_list_single-1]", "tests/integration/test_checker.py::test_line_check_results[plugin_func_ph... | ["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_gen]", "tests/in... | jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce | true | null | 1 | 11 | 31 | 1,173 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232167 | 80.9715 | |||
7,132 | swe_smith::train::43930 | swe_smith | train | 43,930 | pydata__patsy.a5d16484.func_basic__745y38wi | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | safe_is_pandas_categorical returns wrong results
Description
The `safe_is_pandas_categorical` function is returning incorrect boolean values. It's identifying regular numpy arrays as pandas categorical data and failing to properly detect actual pandas categorical objects.
Steps/Code to Reproduce
```python
import nu... | diff --git a/patsy/util.py b/patsy/util.py
index 2c1c19d..5406c1c 100644
--- a/patsy/util.py
+++ b/patsy/util.py
@@ -775,15 +775,15 @@ def safe_is_pandas_categorical(data):
def test_safe_is_pandas_categorical():
- assert not safe_is_pandas_categorical(np.arange(10))
+ assert safe_is_pandas_categorical(np.ara... | ["patsy/util.py::test_safe_is_pandas_categorical"] | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 10 | 1 | 1,193 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232167 | 80.9715 | |||
7,133 | swe_smith::train::29127 | swe_smith | train | 29,127 | tox-dev__pipdeptree.c31b6418.func_basic__saob4nq3 | swesmith/tox-dev__pipdeptree.c31b6418 | tox-dev/pipdeptree | python | null | PackageDAG.reverse() returns dict instead of ReversedPackageDAG
#### Description
When calling `reverse()` on a PackageDAG instance, the method returns a plain dict instead of the expected ReversedPackageDAG object. This breaks functionality that depends on the reversed DAG being a proper ReversedPackageDAG instance.
... | diff --git a/src/pipdeptree/_models/dag.py b/src/pipdeptree/_models/dag.py
index 2f5df60..9f7cb21 100644
--- a/src/pipdeptree/_models/dag.py
+++ b/src/pipdeptree/_models/dag.py
@@ -214,17 +214,14 @@ class PackageDAG(Mapping[DistPackage, List[ReqPackage]]):
"""
m: defaultdict[ReqPackage, list[DistPac... | ["tests/_models/test_dag.py::test_package_dag_reverse", "tests/render/test_mermaid.py::test_render_mermaid", "tests/render/test_text.py::test_render_text[True-True-True-expected_output1]", "tests/render/test_text.py::test_render_text[False-True-True-expected_output3]", "tests/render/test_text.py::test_render_text[True-... | ["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack... | jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418 | true | null | 1 | 13 | 8 | 1,133 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232167 | 80.9715 | |||
7,134 | swe_smith::train::49403 | swe_smith | train | 49,403 | mozilla__bleach.73871d76.func_pm_class_rm_funcs__lryuxfhd | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | HTML parser fails with NameError when processing table cell content
#### Description
When parsing HTML content that contains table cells with certain nested elements, the parser throws a `NameError` because it's trying to call methods that have been removed.
#### Steps/Code to Reproduce
```python
import bleach
# T... | diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py
index 5427b7d..85eabac 100644
--- a/bleach/_vendor/html5lib/html5parser.py
+++ b/bleach/_vendor/html5lib/html5parser.py
@@ -2226,16 +2226,6 @@ def getPhases(debug):
def processCharacters(self, token):
retu... | ["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 19 | 185 | 1,013 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232167 | 80.9715 | |||
7,135 | swe_smith::train::24657 | swe_smith | train | 24,657 | marshmallow-code__marshmallow.9716fc62.func_basic__8t25cyb2 | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | Number field returns None instead of raising ValidationError for invalid inputs
#### Description
When deserializing invalid values with Number fields (Float, Integer, etc.), the field now returns `None` instead of raising a `ValidationError` as expected. This breaks validation behavior and allows invalid data to pass... | diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py
index e83ba19..84c3cd4 100644
--- a/src/marshmallow/fields.py
+++ b/src/marshmallow/fields.py
@@ -958,14 +958,13 @@ class Number(Field):
def _validated(self, value) -> _T | None:
"""Format the value or raise a :exc:`ValidationError` if an ... | ["tests/test_decorators.py::TestValidatesSchemaDecorator::test_skip_on_field_errors", "tests/test_decorators.py::test_decorator_post_load_with_nested_original_and_pass_many[data0-expected_data0-expected_original_data0]", "tests/test_deserialization.py::TestFieldDeserialization::test_invalid_float_field_deserialization[... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 9 | 11 | 1,213 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232167 | 80.9715 | |||
7,136 | swe_smith::train::48129 | swe_smith | train | 48,129 | sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_invert_if__7shmpfzo | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | PlaceholderTemplater raises error when param_style is provided
#### Description
When using the PlaceholderTemplater with a `param_style` configuration, it incorrectly raises a ValueError claiming that no param_regex nor param_style was provided, even when param_style is actually present in the context.
#### Steps/Co... | diff --git a/src/sqlfluff/core/templaters/placeholder.py b/src/sqlfluff/core/templaters/placeholder.py
index de708a8..2708878 100644
--- a/src/sqlfluff/core/templaters/placeholder.py
+++ b/src/sqlfluff/core/templaters/placeholder.py
@@ -95,6 +95,11 @@ class PlaceholderTemplater(RawTemplater):
live_cont... | ["test/core/templaters/placeholder_test.py::test__templater_raw", "test/core/templaters/placeholder_test.py::test__templater_param_style[no_changes]", "test/core/templaters/placeholder_test.py::test__templater_param_style[colon_simple_substitution]", "test/core/templaters/placeholder_test.py::test__templater_param_styl... | ["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 11 | 22 | 1,173 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232167 | 80.9715 | |||
7,137 | swe_smith::train::30025 | swe_smith | train | 30,025 | getnikola__nikola.0f4c230e.func_pm_remove_assign__wwy8i99m | swesmith/getnikola__nikola.0f4c230e | getnikola/nikola | python | null | # Breadcrumb navigation broken in Nikola
## Description
The breadcrumb navigation in Nikola is broken. When trying to navigate through the site using breadcrumbs, the links are not working correctly.
## Steps to Reproduce
Create a simple Nikola site with some nested content, like galleries or listings:
```python
fro... | diff --git a/nikola/utils.py b/nikola/utils.py
index 660806f..0b95435 100644
--- a/nikola/utils.py
+++ b/nikola/utils.py
@@ -1050,7 +1050,6 @@ def get_crumbs(path, is_file=False, index_folder=None, lang=None):
_crumbs = []
if is_file:
for i, crumb in enumerate(crumbs[-3::-1]): # Up to parent folder ... | ["tests/test_utils.py::test_get_crumbs[listings/foo/bar-True-expected_crumbs2]"] | ["tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org]", "tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org:1234/blog]", "tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org:3456/blog/]", "tests/integration/test_dev_server... | jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e | true | null | 1 | 7 | 1 | 1,252 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232 | 80.971 | |||
7,138 | swe_smith::train::29596 | swe_smith | train | 29,596 | django__channels.a144b4b8.func_basic__qjyuvwwu | swesmith/django__channels.a144b4b8 | django/channels | python | null | Channel capacity lookup broken for pattern matching
#### Description
The channel capacity lookup is returning incorrect values when using pattern-based capacity configuration. Instead of returning the matched pattern's capacity, it's returning the default capacity or causing UnboundLocalError.
#### Steps/Code to Rep... | diff --git a/channels/layers.py b/channels/layers.py
index 5fc53f7..00b0235 100644
--- a/channels/layers.py
+++ b/channels/layers.py
@@ -128,9 +128,9 @@ class BaseChannelLayer:
as input.
"""
for pattern, capacity in self.channel_capacity:
- if pattern.match(channel):
- ... | ["tests/test_generic_websocket.py::test_websocket_consumer_groups", "tests/test_generic_websocket.py::test_async_websocket_consumer_groups", "tests/test_generic_websocket.py::test_async_websocket_consumer_specific_channel_layer", "tests/test_generic_websocket.py::test_block_underscored_type_function_call", "tests/test_... | ["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_generic_websocket.py::test_websocket... | jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8 | true | null | 1 | 6 | 16 | 1,272 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232 | 80.971 | |||
7,139 | swe_smith::train::43948 | swe_smith | train | 43,948 | pydata__patsy.a5d16484.func_basic__9glny1yi | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | Power operator with float exponents breaks formula evaluation
#### Description
When using the power operator `**` with float exponents in formulas, the evaluation fails with an error about requiring positive integers, even when the float value is a positive number.
#### Steps/Code to Reproduce
```python
import pats... | diff --git a/patsy/desc.py b/patsy/desc.py
index 210350d..188dcde 100644
--- a/patsy/desc.py
+++ b/patsy/desc.py
@@ -349,25 +349,24 @@ def _eval_binary_interact(evaluator, tree):
def _eval_binary_power(evaluator, tree):
- left_expr = evaluator.eval(tree.args[0])
+ left_expr = evaluator.eval(tree.args[1])
... | ["patsy/desc.py::test_eval_formula", "patsy/desc.py::test_eval_formula_error_reporting"] | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 21 | 2 | 972 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232 | 80.971 | |||
7,140 | swe_smith::train::49260 | swe_smith | train | 49,260 | mozilla__bleach.73871d76.func_basic__7cy42ite | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | TypeError when mixing str and non-str arguments in URL parsing
#### Description
When using bleach with certain URL parsing operations, a `TypeError` is raised with the message "Cannot mix str and non-str arguments". This appears to be related to how empty strings are handled in the argument coercion logic.
#### Step... | diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py
index ac6e7a9..a5ac30e 100644
--- a/bleach/_vendor/parse.py
+++ b/bleach/_vendor/parse.py
@@ -110,18 +110,11 @@ def _decode_args(args, encoding=_implicit_encoding,
return tuple(x.decode(encoding, errors) if x else '' for x in args)
def _coerce_args(... | ["tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_disallowed_attr", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_invalid_filter_attr", "tests/test_clean.py::test_poster_attribute", "tests/test_clean.py::test_attributes_wildcard", "tests/test_clean.p... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 11 | 25 | 1,172 | 0 | 0.6 | 1 | 0.75 | 1 | 0.232 | 80.971 | |||
7,141 | swe_smith::train::51559 | swe_smith | train | 51,559 | pydicom__pydicom.7d361b3d.combine_file__vpqfl9ur | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | CoderBase.available_plugins returns values instead of keys
#### Description
The `available_plugins` property in `CoderBase` is returning plugin values instead of plugin names (keys). This causes issues when trying to access available plugins by name.
#### Steps/Code to Reproduce
```python
from pydicom.pixels.common... | diff --git a/src/pydicom/pixels/common.py b/src/pydicom/pixels/common.py
index 10a4a93..cd92ade 100644
--- a/src/pydicom/pixels/common.py
+++ b/src/pydicom/pixels/common.py
@@ -132,7 +132,7 @@ class CoderBase:
@property
def available_plugins(self) -> tuple[str, ...]:
"""Return a tuple containing avai... | ["tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_set_photometric_interpretation", "tests/pixels/test_common.py::TestRunnerBase::test_validate_options", "tests/pixels/test_common.py::TestRunnerBase::test_set_options_ds", "tests/pixels/test_common.... | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_set_number_of_frames", "tests/pixels/test_common.py::TestRunnerBase::tes... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 6 | 46 | 1,271 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231833 | 80.9705 | |||
7,142 | swe_smith::train::52390 | swe_smith | train | 52,390 | pydicom__pydicom.7d361b3d.func_pm_ctrl_invert_if__siff0q5o | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | JSON conversion fails with IndexError when data elements have no value
#### Description
When converting DICOM JSON data that contains data elements with no value, the conversion process fails with an `IndexError: tuple index out of range`. This occurs when the JSON data element has no value keys (like "Value", "Inlin... | diff --git a/src/pydicom/jsonrep.py b/src/pydicom/jsonrep.py
index 48fd36f..bec14cc 100644
--- a/src/pydicom/jsonrep.py
+++ b/src/pydicom/jsonrep.py
@@ -288,11 +288,6 @@ class JsonDataElementConverter:
unique_value_keys = tuple(set(val.keys()) & set(JSON_VALUE_KEYS))
if not unique_value_keys... | ["tests/test_json.py::TestPersonName::test_json_pn_from_file", "tests/test_json.py::TestDataSetToJson::test_json_from_dicom_file", "tests/test_json.py::TestSequence::test_nested_sequences", "tests/test_json.py::TestBinary::test_bulk_data_reader_is_called_within_SQ"] | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 11 | 4 | 1,171 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231833 | 80.9705 | |||
7,143 | swe_smith::train::31461 | swe_smith | train | 31,461 | benoitc__gunicorn.bacbf8aa.func_basic__0c0jhtjg | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | HTTP response headers sent with wrong encoding and incorrect key-value order
Description
When sending HTTP response headers, the headers are being encoded with UTF-8 instead of the expected ASCII/latin-1 encoding, and the header key-value pairs are swapped in the output format.
Steps/Code to Reproduce
```python
imp... | diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py
index 419ac50..5701aa6 100644
--- a/gunicorn/http/wsgi.py
+++ b/gunicorn/http/wsgi.py
@@ -324,11 +324,11 @@ class Response:
if self.headers_sent:
return
tosend = self.default_headers()
- tosend.extend(["%s: %s\r\n" % (k, v)... | ["tests/test_http.py::test_http_header_encoding"] | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 1 | 6 | 1 | 1,271 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231833 | 80.9705 | |||
7,144 | swe_smith::train::32537 | swe_smith | train | 32,537 | pydantic__pydantic.acb0f10f.func_pm_ctrl_shuffle__3m4r7qg9 | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | Pipeline validation functions fail with UnboundLocalError
#### Description
When using pipeline validation functions like `validate_as(...).ge(0)`, `validate_as(...).lt(5)`, etc., the validation fails with an `UnboundLocalError` because the `handler` function is referenced before it's defined.
#### Steps/Code to Repr... | diff --git a/pydantic/experimental/pipeline.py b/pydantic/experimental/pipeline.py
index 9a3dbc4..01ae71e 100644
--- a/pydantic/experimental/pipeline.py
+++ b/pydantic/experimental/pipeline.py
@@ -361,18 +361,17 @@ transform = _Pipeline[Any, Any]((_ValidateAs(_FieldTypeMarker),)).transform
def _check_func(
func: ... | ["tests/test_docs.py::test_docs_examples[docs/concepts/experimental.md:46-79]", "tests/test_pipeline.py::test_ge_le_gt_lt[int-pipeline0-valid_cases0-invalid_cases0]", "tests/test_pipeline.py::test_ge_le_gt_lt[float-pipeline1-valid_cases1-invalid_cases1]", "tests/test_pipeline.py::test_ge_le_gt_lt[Decimal-pipeline2-vali... | ["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_... | jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f | true | null | 1 | 11 | 38 | 1,171 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231833 | 80.9705 | |||
7,145 | swe_smith::train::19249 | swe_smith | train | 19,249 | seperman__deepdiff.ed252022.func_pm_remove_assign__lethpmmt | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | Delta operations fail with NameError when applying ignore_order changes
#### Description
When applying delta operations with `ignore_order=True`, the code throws a `NameError` because several variables are referenced but not defined after recent changes.
#### Steps/Code to Reproduce
```python
from deepdiff import D... | diff --git a/deepdiff/delta.py b/deepdiff/delta.py
index 8bafc9a..827795b 100644
--- a/deepdiff/delta.py
+++ b/deepdiff/delta.py
@@ -744,7 +744,6 @@ class Delta:
"""
fixed_indexes = self.diff.get('iterable_items_added_at_indexes', dict_())
remove_indexes = self.diff.get('iterable_items_remove... | ["tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-args2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t2_json.csv-t1.json-args3-0]", "tests/test_command.py::TestCommands::test_deep... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 8 | 102 | 1,231 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231833 | 80.9705 | |||
7,146 | swe_smith::train::55652 | swe_smith | train | 55,652 | RoaringBitmap__roaring.09c46a0a.func_pm_op_change_const__gswxjwvt | swesmith/RoaringBitmap__roaring.09c46a0a | roaringbitmap/roaring | go | null | ParOr function crashes with index out of range error on empty bitmaps
#### Description
The `ParOr` function panics with "runtime error: index out of range [-1]" when called with certain bitmap configurations. This appears to happen when the function tries to access bitmap keys using an invalid index.
#### Steps/Code... | diff --git a/parallel.go b/parallel.go
index 9208e3e..5cbe59e 100644
--- a/parallel.go
+++ b/parallel.go
@@ -348,12 +348,12 @@ func ParOr(parallelism int, bitmaps ...*Bitmap) *Bitmap {
for _, b := range bitmaps {
lKey = minOfUint16(lKey, b.highlowcontainer.keys[0])
- hKey = maxOfUint16(hKey, b.highlowcontainer.... | ["TestParAggregations", "TestParAggregations/par1", "TestParAggregations/par1/simple_case", "TestEQ", "TestParAggregations/par0", "TestParAggregations/par0/simple_case"] | ["TestSetAndGet"] | jyangballin/swesmith.x86_64.roaringbitmap_1776_roaring.09c46a0a | true | null | 1 | 12 | 6 | 1,151 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231833 | 80.9705 | |||
7,147 | swe_smith::train::27184 | swe_smith | train | 27,184 | tkrajina__gpxpy.09fc46b3.func_pm_ctrl_shuffle__jvy6wz1r | swesmith/tkrajina__gpxpy.09fc46b3 | tkrajina/gpxpy | python | null | get_time_bounds() raises UnboundLocalError for start_time
#### Description
When calling `get_time_bounds()` on a GPX object, an `UnboundLocalError` is raised for the variable `start_time`.
#### Steps/Code to Reproduce
```python
import gpxpy
import datetime
# Create a simple GPX with time data
gpx = gpxpy.GPX()
tra... | diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py
index 73e2024..7bbb37b 100644
--- a/gpxpy/gpx.py
+++ b/gpxpy/gpx.py
@@ -2116,6 +2116,16 @@ class GPX:
waypoint.remove_elevation()
def get_time_bounds(self) -> TimeBounds:
+
+ return TimeBounds(start_time, end_time)
+ end_time = None
+
+ ... | ["test.py::GPXTests::test_gpx_fill_time_data_with_end_time_and_time_delta", "test.py::GPXTests::test_gpx_fill_time_data_with_start_time_and_end_time", "test.py::GPXTests::test_gpx_fill_time_data_with_start_time_and_end_time_and_time_delta", "test.py::GPXTests::test_gpx_fill_time_data_with_start_time_and_time_delta", "t... | ["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a... | jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3 | true | null | 1 | 21 | 6 | 970 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231667 | 80.97 | |||
7,148 | swe_smith::train::55834 | swe_smith | train | 55,834 | go-critic__go-critic.db2ec6f4.func_pm_ctrl_invert_if__rfclsz81 | swesmith/go-critic__go-critic.db2ec6f4 | go-critic/go-critic | go | null | Index out of range panic in captLocal checker with multi-value assignments
#### Description
The captLocal checker crashes with an "index out of range" panic when processing certain Go code with multi-value assignments.
#### Steps/Code to Reproduce
The panic occurs when running go-critic on Go code that contains mul... | diff --git a/checkers/internal/astwalk/local_def_walker.go b/checkers/internal/astwalk/local_def_walker.go
index f6808cb..e134b55 100644
--- a/checkers/internal/astwalk/local_def_walker.go
+++ b/checkers/internal/astwalk/local_def_walker.go
@@ -34,25 +34,25 @@ func (w *localDefWalker) walkFuncBody(decl *ast.FuncDecl) {... | ["TestIntegration", "TestIntegration/check_main_only"] | ["TestCheckers", "TestCheckers/appendAssign/debug", "TestCheckers/appendCombine/debug", "TestCheckers/argOrder/debug", "TestCheckers/assignOp/debug", "TestCheckers/badCall/debug", "TestCheckers/badCond/debug", "TestCheckers/badLock/debug", "TestCheckers/badRegexp/debug", "TestCheckers/badSorting/debug", "TestCheckers/b... | jyangballin/swesmith.x86_64.go-critic_1776_go-critic.db2ec6f4 | true | null | 1 | 14 | 2 | 1,110 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231667 | 80.97 | |||
7,149 | swe_smith::train::28781 | swe_smith | train | 28,781 | encode__starlette.db5063c2.func_pm_ctrl_invert_if__8nyvugjb | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | Exception handlers for sync functions not working correctly
#### Description
When using synchronous exception handlers in Starlette applications, the handlers are being executed in a thread pool instead of being awaited directly. This causes issues with exception handling behavior, particularly when the handlers are ... | diff --git a/starlette/_exception_handler.py b/starlette/_exception_handler.py
index baf6e2f..7213fa4 100644
--- a/starlette/_exception_handler.py
+++ b/starlette/_exception_handler.py
@@ -56,10 +56,10 @@ def wrap_app_handling_exceptions(app: ASGIApp, conn: Request | WebSocket) -> ASG
raise RuntimeErro... | ["tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[trio]", "tests/test_applications.py::test_400[asyncio]", "tests/test_applications.py::test_405[asyncio]", "tests/test_applications.py::test_500[asyncio]", "tests/test_applications.py::... | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTTPMiddle... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 6 | 63 | 1,269 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2315 | 80.9695 | |||
7,150 | swe_smith::train::24202 | swe_smith | train | 24,202 | sunpy__sunpy.f8edfd5c.func_pm_remove_assign__6v8m5mfd | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | NameError when calling _repr_html_() or quicklook() on TimeSeries
#### Description
When trying to use the HTML representation methods on a TimeSeries object, a `NameError` is raised because the variable `axs` is not defined.
#### Steps/Code to Reproduce
```python
import sunpy.timeseries as ts
from sunpy.data.test i... | diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py
index 80e5d20..13d00f8 100644
--- a/sunpy/timeseries/timeseriesbase.py
+++ b/sunpy/timeseries/timeseriesbase.py
@@ -277,22 +277,6 @@ class GenericTimeSeries:
<tr><th>{partial_html}</td></tr>
</table>"""
... | ["sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html", "sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html_", "sunpy/timeseries/tests/test_timeseriesbase.py::test_quicklook"] | ["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 23 | 3 | 929 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2315 | 80.9695 | |||
7,151 | swe_bench::test::1770 | swe_bench | test | 1,770 | sphinx-doc__sphinx-7395 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 7887615374656da0556966b8cd37d2af8dac2654 | The index directive with "builtin" type generates different index entry than the function directive
```
.. index::
builtin: max
```
and
```
.. function:: max(iterable, *[, key, default])
```
generate similar but different index entries.
The former generates:
```
max
built-in function
```
The latter generates:
`... | Unfortunately, python specific index types (like `builtin`) were deprecated in 10 years ago: https://github.com/sphinx-doc/sphinx/commit/3e9182550a#diff-238bd7cedf25808f7e89537fbcd798dcR188-R189
And we are considering to remove it in future: #6970 . But we need to consider about it more deeply...
What should be used i... | diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py
--- a/sphinx/domains/python.py
+++ b/sphinx/domains/python.py
@@ -551,12 +551,23 @@ def get_signature_prefix(self, sig: str) -> str:
def needs_arglist(self) -> bool:
return True
- def get_index_text(self, modname: str, name_cls: Tuple[s... | diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py
--- a/tests/test_domain_py.py
+++ b/tests/test_domain_py.py
@@ -461,6 +461,7 @@ def test_pydata(app):
def test_pyfunction(app):
text = (".. py:function:: func1\n"
+ ".. py:module:: example\n"
".. py:function:: func2\n"
... | ["tests/test_domain_py.py::test_pyfunction"] | ["tests/test_domain_py.py::test_function_signatures", "tests/test_domain_py.py::test_domain_py_xrefs", "tests/test_domain_py.py::test_domain_py_objects", "tests/test_domain_py.py::test_resolve_xref_for_properties", "tests/test_domain_py.py::test_domain_py_find_obj", "tests/test_domain_py.py::test_get_full_qualified_nam... | null | true | 2020-03-28T16:33:05Z | 1 | 21 | 1 | 769 | 0 | 0.8 | 1 | 0.55 | 1 | 0.198167 | 80.9695 | |
7,152 | swe_smith::train::7905 | swe_smith | train | 7,905 | cantools__cantools.0c6a7871.func_pm_ctrl_invert_if__h8lm4fsj | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | Signal comment handling broken when comment is not a string
#### Description
When creating a Signal with a non-string comment parameter, the comment handling logic is inverted, causing AttributeError when trying to access comment methods.
#### Steps/Code to Reproduce
```python
import cantools
# This should work bu... | diff --git a/src/cantools/database/can/signal.py b/src/cantools/database/can/signal.py
index c518727..92ee4d9 100644
--- a/src/cantools/database/can/signal.py
+++ b/src/cantools/database/can/signal.py
@@ -147,13 +147,12 @@ class Signal:
# function's behavior depends on the type of the passed
# argumen... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_dump_with_comments", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_with_comments_mux", "tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source", "tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source... | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 7 | 50 | 1,249 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2315 | 80.9695 | |||
7,153 | swe_smith::train::51046 | swe_smith | train | 51,046 | marshmallow-code__apispec.8b421526.combine_file__cz4k3t31 | swesmith/marshmallow-code__apispec.8b421526 | marshmallow-code/apispec | python | null | MarshmallowPlugin initialization breaks schema resolution
#### Description
After recent changes, the MarshmallowPlugin fails to properly initialize and resolve schemas. The plugin sets `self.spec` to `None` during initialization instead of the actual spec instance, causing schema resolution to fail.
#### Steps/Code ... | diff --git a/src/apispec/ext/marshmallow/__init__.py b/src/apispec/ext/marshmallow/__init__.py
index d4f1a54..f09c684 100644
--- a/src/apispec/ext/marshmallow/__init__.py
+++ b/src/apispec/ext/marshmallow/__init__.py
@@ -130,15 +130,15 @@ class MarshmallowPlugin(BasePlugin):
def init_spec(self, spec: APISpec) ->... | ["tests/test_ext_marshmallow.py::TestDefinitionHelper::test_resolve_schema_dict_auto_reference[AnalysisSchema]", "tests/test_ext_marshmallow.py::TestDefinitionHelper::test_resolve_schema_dict_auto_reference[schema1]", "tests/test_ext_marshmallow.py::TestDefinitionHelper::test_resolve_schema_dict_auto_reference_in_list[... | ["tests/test_core.py::TestAPISpecInit::test_raises_wrong_apispec_version", "tests/test_core.py::TestMetadata::test_openapi_metadata[2.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata[3.0.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestTags::test_tag[... | jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526 | true | null | 1 | 12 | 118 | 1,149 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2315 | 80.9695 | |||
7,154 | swe_smith::train::20454 | swe_smith | train | 20,454 | tobymao__sqlglot.036601ba.combine_module__x3rzaudu | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | PRQL aggregate function parsing broken after recent changes
#### Description
The PRQL dialect's `_parse_aggregate` method is failing to parse aggregate functions correctly. When trying to parse PRQL queries with aggregate functions, the parser throws an `UnboundLocalError` for the variable `name`.
#### Steps/Code to... | diff --git a/sqlglot/dialects/prql.py b/sqlglot/dialects/prql.py
index 2fc2594..114bc18 100644
--- a/sqlglot/dialects/prql.py
+++ b/sqlglot/dialects/prql.py
@@ -157,23 +157,22 @@ class PRQL(Dialect):
return query.order_by(self.expression(exp.Order, expressions=expressions), copy=False)
def _pars... | ["tests/dialects/test_dialect.py::TestDialect::test_limit", "tests/dialects/test_mysql.py::TestMySQL::test_canonical_functions", "tests/dialects/test_mysql.py::TestMySQL::test_ddl", "tests/dialects/test_prql.py::TestPRQL::test_prql", "tests/dialects/test_sqlite.py::TestSQLite::test_ddl", "tests/dialects/test_sqlite.py:... | ["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 2 | 18 | 6 | 1,029 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2315 | 80.9695 | |||
7,155 | swe_smith::train::4358 | swe_smith | train | 4,358 | pygments__pygments.27649ebb.func_pm_ctrl_shuffle__n2vqjaxb | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | # Scanner.check() method docstring is misplaced
## Description
I found an issue with the `check()` method in the `Scanner` class. The docstring is misplaced - it appears after the method implementation code instead of before it. This causes problems when trying to use the method with certain Delphi files.
## Steps t... | diff --git a/pygments/scanner.py b/pygments/scanner.py
index 112da34..58bbad8 100644
--- a/pygments/scanner.py
+++ b/pygments/scanner.py
@@ -52,17 +52,16 @@ class Scanner:
eos = property(eos, eos.__doc__)
def check(self, pattern):
+ if self.eos:
+ raise EndOfText()
+ return self._re... | ["tests/examplefiles/delphi/example.pas::", "tests/examplefiles/delphi/test.pas::"] | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 7 | 2 | 1,248 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231333 | 80.969 | |||
7,156 | swe_smith::train::25566 | swe_smith | train | 25,566 | pylint-dev__astroid.b114f6b5.func_basic__bx32rbsi | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Assert statement reconstruction broken when message is None
#### Description
When reconstructing assert statements that don't have a failure message, the AST rebuilder incorrectly swaps the test condition and message parameters, causing assertion errors and incorrect string representations.
#### Steps/Code to Reprod... | diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py
index 4c77906..c280c17 100644
--- a/astroid/rebuilder.py
+++ b/astroid/rebuilder.py
@@ -561,9 +561,9 @@ class TreeRebuilder:
parent=parent,
)
msg: NodeNG | None = None
- if node.msg:
- msg = self.visit(node.msg, ne... | ["tests/test_inference.py::test_assert_last_function_returns_none_on_inference", "tests/test_nodes.py::AsStringTest::test_module2_as_string", "tests/test_nodes.py::AsStringTest::test_module_as_string", "tests/test_nodes.py::AsStringTest::test_operator_precedence", "tests/test_nodes_lineno.py::TestLinenoColOffset::test_... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 6 | 5 | 1,268 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231333 | 80.969 | |||
7,157 | swe_smith::train::48884 | swe_smith | train | 48,884 | facebookresearch__hydra.0f03eb60.func_pm_remove_assign__m3n3a0rz | swesmith/facebookresearch__hydra.0f03eb60 | facebookresearch/hydra | python | null | BasicSweeper fails with NameError when processing sweep overrides
#### Description
When using the BasicSweeper with sweep overrides, a NameError is raised for undefined variables `key`, `sweep`, and `value`. This appears to happen during the processing of override arguments in multirun mode.
#### Steps/Code to Repro... | diff --git a/hydra/_internal/core_plugins/basic_sweeper.py b/hydra/_internal/core_plugins/basic_sweeper.py
index 3e41fcb..d479b85 100644
--- a/hydra/_internal/core_plugins/basic_sweeper.py
+++ b/hydra/_internal/core_plugins/basic_sweeper.py
@@ -108,12 +108,9 @@ class BasicSweeper(Sweeper):
overrides: List[Over... | ["tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_1_job[basic-overrides0]", "tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_2_jobs[basic-overrides0]", "tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_1_job_strict[basic-overrides0]", "tests/test_basic_launcher.py::TestBasicLauncher::... | ["build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.py::test_find[... | jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60 | true | null | 1 | 6 | 57 | 1,268 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231333 | 80.969 | |||
7,158 | swe_smith::train::18209 | swe_smith | train | 18,209 | msiemens__tinydb.10644a0e.func_basic__0rq6zp9u | swesmith/msiemens__tinydb.10644a0e | msiemens/tinydb | python | null | Empty Query object matches all documents instead of raising error
#### Description
When creating an empty Query object without any conditions, it now matches all documents in the database instead of raising a RuntimeError as expected. This breaks the intended behavior where empty queries should be prevented from bein... | diff --git a/tinydb/queries.py b/tinydb/queries.py
index 0ef6a69..3262537 100644
--- a/tinydb/queries.py
+++ b/tinydb/queries.py
@@ -161,16 +161,14 @@ class Query(QueryInstance):
"""
def __init__(self) -> None:
- # The current path of fields to access when evaluating the object
- self._path: T... | ["tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_delete[json]", "tests/test_operations.py::test_add_int[memory]", "tests/test_operations.py::test_add_int[json]", "tests/test_operations.py::test_add_str[memory]", "tests/test_operations.py::test_add_str[json]", "tests/test_operations.py::... | ["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle... | jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e | true | null | 1 | 10 | 104 | 1,188 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231333 | 80.969 | |||
7,159 | swe_smith::train::18350 | swe_smith | train | 18,350 | msiemens__tinydb.10644a0e.func_pm_ctrl_shuffle__dk4wdqra | swesmith/msiemens__tinydb.10644a0e | msiemens/tinydb | python | null | UnboundLocalError when accessing table data
#### Description
When trying to perform basic database operations, TinyDB raises an `UnboundLocalError: local variable 'table' referenced before assignment` error. This affects all table operations including insert, search, count, and other basic functionality.
#### Steps/... | diff --git a/tinydb/table.py b/tinydb/table.py
index c562d02..feac20d 100644
--- a/tinydb/table.py
+++ b/tinydb/table.py
@@ -696,20 +696,11 @@ class Table:
return next_id
def _read_table(self) -> Dict[str, Mapping]:
- """
- Read the table data from the underlying storage.
-
- Docume... | ["tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_json_write", "tests/test_storages.py::test_json_kwargs", "tests/test_storages.py::test_json_readwrite", "tests/test_storages.py::test_json_read", "tests/test_storages.py::test_in_memory_close", "tests/test_storages.py::test_read_o... | ["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middlewares.py::test_nested", "tests/test_queries.py::... | jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e | true | null | 1 | 21 | 23 | 968 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231333 | 80.969 | |||
7,160 | swe_smith::train::44918 | swe_smith | train | 44,918 | mahmoud__glom.fb3c4e76.func_pm_ctrl_shuffle__6q9nigpo | swesmith/mahmoud__glom.fb3c4e76 | mahmoud/glom | python | null | Inspect constructor fails with UnboundLocalError when using post_mortem parameter
#### Description
When creating an `Inspect` object with the `post_mortem` parameter, an `UnboundLocalError` is raised due to a variable being referenced before assignment.
#### Steps/Code to Reproduce
```python
from glom import Inspec... | diff --git a/glom/core.py b/glom/core.py
index cee71a3..5a8d861 100644
--- a/glom/core.py
+++ b/glom/core.py
@@ -989,22 +989,21 @@ class Inspect:
"""
def __init__(self, *a, **kw):
- self.wrapped = a[0] if a else Path()
- self.recursive = kw.pop('recursive', False)
- self.echo = kw.pop('... | ["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_inspect"] | ["glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "glom/test/test_basic.py::test_abstract_iterable", "gl... | jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76 | true | null | 1 | 21 | 2 | 968 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231333 | 80.969 | |||
7,161 | swe_smith::train::5544 | swe_smith | train | 5,544 | PyCQA__flake8.cf1542ce.func_pm_ctrl_shuffle__ar9mwpdm | swesmith/PyCQA__flake8.cf1542ce | pycqa/flake8 | python | null | UnboundLocalError when running flake8 on files with logical line processing
#### Description
When running flake8 on Python files, I'm encountering an `UnboundLocalError` where the variable `logical_line` is referenced before assignment in the logical line checking process.
#### Steps/Code to Reproduce
Create a simp... | diff --git a/src/flake8/checker.py b/src/flake8/checker.py
index 329a2cc..33d4ee3 100644
--- a/src/flake8/checker.py
+++ b/src/flake8/checker.py
@@ -434,15 +434,16 @@ class FileChecker:
)
def run_logical_checks(self) -> None:
- """Run all checks expecting a logical line."""
- asser... | ["tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_logical_line_offset_out_of_bounds", "tests/integration/test_main.py::test_form_feed_line_split", "tests/integration/test_main.py::test_e101_indent_char_does_not_reset", "tests/integration/test_main.py::test_statistics_opt... | ["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_gen]", "tests/in... | jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce | true | null | 1 | 15 | 20 | 1,088 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231333 | 80.969 | |||
7,162 | swe_smith::train::35125 | swe_smith | train | 35,125 | django__daphne.32ac73e1.func_pm_remove_cond__l15tmnui | swesmith/django__daphne.32ac73e1 | django/daphne | python | null | # Daphne CLI not handling partial endpoint configurations correctly
Hi,
I've noticed that when providing only a host or only a port to Daphne via command line, it's failing to start properly. It seems like the default values for host/port aren't being applied correctly when only one of them is specified.
## Steps to... | diff --git a/daphne/cli.py b/daphne/cli.py
index a036821..4bef697 100755
--- a/daphne/cli.py
+++ b/daphne/cli.py
@@ -220,13 +220,6 @@ class CommandLineInterface:
)
# If verbosity is 1 or greater, or they told us explicitly, set up access log
access_log_stream = None
- if args.access_lo... | ["tests/test_cli.py::TestCLIInterface::testCLIBasics", "tests/test_cli.py::TestCLIInterface::testMixedCLIEndpointCreation", "tests/test_cli.py::TestCLIInterface::testUnixSockets"] | ["tests/test_checks.py::test_check_daphne_installed", "tests/test_cli.py::TestEndpointDescriptions::testBasics", "tests/test_cli.py::TestEndpointDescriptions::testFileDescriptorBinding", "tests/test_cli.py::TestEndpointDescriptions::testMultipleEnpoints", "tests/test_cli.py::TestEndpointDescriptions::testTcpPortBinding... | jyangballin/swesmith.x86_64.django_1776_daphne.32ac73e1 | true | null | 1 | 13 | 3 | 1,127 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231167 | 80.9685 | |||
7,163 | swe_smith::train::4348 | swe_smith | train | 4,348 | pygments__pygments.27649ebb.func_pm_ctrl_shuffle__cnv9q0r2 | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | # Incorrect color definition order in GroffFormatter
## Description
Currently, the GroffFormatter has an issue with the order of operations when defining colors. The formatter attempts to write color definitions to the output file before the colors are actually collected from the style.
When using the GroffFormatter... | diff --git a/pygments/formatters/groff.py b/pygments/formatters/groff.py
index a9e0711..356c5d1 100644
--- a/pygments/formatters/groff.py
+++ b/pygments/formatters/groff.py
@@ -79,14 +79,13 @@ class GroffFormatter(Formatter):
def _define_colors(self, outfile):
- colors = set()
- for _, ndef in se... | ["tests/test_groff_formatter.py::test_inheritance_custom_tokens", "tests/test_groff_formatter.py::test_basic", "tests/test_basic_api.py::test_formatter_unicode_handling[GroffFormatter]", "tests/test_basic_api.py::test_formatter_public_api[GroffFormatter]"] | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 9 | 4 | 1,207 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231167 | 80.9685 | |||
7,164 | swe_smith::train::4277 | swe_smith | train | 4,277 | pygments__pygments.27649ebb.func_pm_class_rm_funcs__rys42fpt | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | SvgFormatter missing _get_style method after recent changes
#### Description
The SvgFormatter is throwing an AttributeError when trying to format code. It appears the `_get_style` method was accidentally removed, causing the formatter to fail when processing tokens that require styling.
#### Steps/Code to Reproduce
... | diff --git a/pygments/formatters/svg.py b/pygments/formatters/svg.py
index 74019b6..45f9ee9 100644
--- a/pygments/formatters/svg.py
+++ b/pygments/formatters/svg.py
@@ -165,21 +165,4 @@ class SvgFormatter(Formatter):
outfile.write('</text>')
if not self.nowrap:
- outfile.write('</g></svg>... | ["tests/test_basic_api.py::test_formatter_unicode_handling[SvgFormatter]", "tests/test_basic_api.py::test_formatter_public_api[SvgFormatter]"] | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 19 | 2 | 1,007 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231167 | 80.9685 | |||
7,165 | swe_smith::train::2769 | swe_smith | train | 2,769 | cknd__stackprinter.219fcc52.func_pm_remove_wrapper__i4xn2uon | swesmith/cknd__stackprinter.219fcc52 | cknd/stackprinter | python | null | NameError when calling stackprinter.format() - 'source' is not defined
#### Description
When calling `stackprinter.format()`, a `NameError` is raised saying that `source` is not defined. This appears to be happening in the `get_info` function in `extraction.py`.
#### Steps/Code to Reproduce
```python
import stackpr... | diff --git a/stackprinter/extraction.py b/stackprinter/extraction.py
index 42ee4ec..f75cd0b 100644
--- a/stackprinter/extraction.py
+++ b/stackprinter/extraction.py
@@ -86,16 +86,6 @@ def get_info(tb_or_frame, lineno=None, suppressed_vars=[]):
filename = inspect.getsourcefile(frame) or inspect.getfile(frame)
... | ["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting"] | ["tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"] | jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52 | true | null | 1 | 11 | 2 | 1,167 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231167 | 80.9685 | |||
7,166 | swe_smith::train::30589 | swe_smith | train | 30,589 | gweis__isodate.17cb25eb.func_pm_remove_assign__dlotiwhk | swesmith/gweis__isodate.17cb25eb | gweis/isodate | python | null | Time parsing fails with UnboundLocalError for hour-only and minute-only formats
#### Description
When parsing ISO time strings that contain only hours or only hours and minutes (without seconds), the parser raises `UnboundLocalError` or `NameError` exceptions instead of correctly parsing the time values.
#### Steps/... | diff --git a/src/isodate/isotime.py b/src/isodate/isotime.py
index 78b4de2..f03da2a 100644
--- a/src/isodate/isotime.py
+++ b/src/isodate/isotime.py
@@ -114,9 +114,6 @@ def parse_time(timestring: str) -> time:
)
if "minute" in groups:
minute = Decimal(groups["minute"])
- ... | ["tests/test_datetime.py::test_parse[19850412T1015-expected0-%Y%m%dT%H%M-19850412T1015]", "tests/test_datetime.py::test_parse[1985-04-12T10:15-expected1-%Y-%m-%dT%H:%M-1985-04-12T10:15]", "tests/test_datetime.py::test_parse[1985102T1015Z-expected2-%Y%jT%H%M%z-1985102T1015Z]", "tests/test_datetime.py::test_parse[1985-10... | ["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::tes... | jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb | true | null | 1 | 7 | 18 | 1,247 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231167 | 80.9685 | |||
7,167 | r2e_gym::train::4288 | r2e_gym | train | 4,288 | numpy__504b287bdf4745256044f336f17c88ddcb0175dd | numpy | numpy/numpy | python | 504b287bdf4745256044f336f17c88ddcb0175dd | **Title:** `np.indices` Function Lacks `sparse` Parameter, Causing TypeError
**Description:**
When using the `sparse` keyword with the `np.indices` function, a `TypeError` is raised because the parameter is not recognized. This limitation prevents users from generating sparse grid indices, which can be more memory-eff... | diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -1139,7 +1139,7 @@
array([8, 9, 0, 1, 2, 3, 4, 5, 6, 7])
>>> np.roll(x, -2)
array([2, 3, 4, 5, 6, 7, 8, 9, 0, 1])
-
+
>>> x2 = np.reshape(x, (2,5))
>>> x2
array([[0, 1,... | diff --git a/numpy/core/tests/test_numeric.py b/numpy/core/tests/test_numeric.py
--- a/numpy/core/tests/test_numeric.py
+++ b/numpy/core/tests/test_numeric.py
@@ -2776,6 +2776,47 @@
assert_equal(np.outer(arr2, arr3, out2), out2)
+class TestIndices(object):
+
+ def test_simple(self):
+ [x, y] = np.ind... | null | null | namanjain12/numpy_final:504b287bdf4745256044f336f17c88ddcb0175dd | true | null | 1 | 65 | null | 799 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.349833 | 80.96825 | ||
7,168 | swe_smith::train::31968 | swe_smith | train | 31,968 | davidhalter__parso.338a5760.func_basic__h7gg6fmw | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | ErrorFinder initialization causes incorrect indentation level tracking
#### Description
The ErrorFinder class is not properly handling indentation level tracking during initialization, causing issues with detecting too many levels of indentation.
#### Steps/Code to Reproduce
```python
import parso
# This should de... | diff --git a/parso/python/errors.py b/parso/python/errors.py
index 09c5047..19dcea0 100644
--- a/parso/python/errors.py
+++ b/parso/python/errors.py
@@ -388,15 +388,15 @@ class ErrorFinder(Normalizer):
def initialize(self, node):
def create_context(node):
if node is None:
- ret... | ["test/test_python_errors.py::test_too_many_levels_of_indentation"] | ["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_... | jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760 | true | null | 1 | 6 | 1 | 1,266 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231 | 80.968 | |||
7,169 | swe_smith::train::11598 | swe_smith | train | 11,598 | andialbrecht__sqlparse.e57923b3.combine_file__yv7akt1y | swesmith/andialbrecht__sqlparse.e57923b3 | andialbrecht/sqlparse | python | null | Case filter and truncate string filter broken in latest commit
Description
The case filter and truncate string filter are not working correctly anymore.
When using the keyword_case formatter, it's reversing non-keyword tokens and uppercasing keywords, which is not the expected behavior. For example:
```sql
select *... | diff --git a/sqlparse/filters/tokens.py b/sqlparse/filters/tokens.py
index cc00a84..9b5fbb6 100644
--- a/sqlparse/filters/tokens.py
+++ b/sqlparse/filters/tokens.py
@@ -17,8 +17,10 @@ class _CaseFilter:
def process(self, stream):
for ttype, value in stream:
- if ttype in self.ttype:
- ... | ["tests/test_format.py::TestFormat::test_keywordcase", "tests/test_format.py::test_truncate_strings", "tests/test_regressions.py::test_issue469_copy_as_psql_command"] | ["tests/test_cli.py::test_cli_main_empty", "tests/test_cli.py::test_parser_empty", "tests/test_cli.py::test_main_help", "tests/test_cli.py::test_valid_args", "tests/test_cli.py::test_invalid_choice", "tests/test_cli.py::test_invalid_args", "tests/test_cli.py::test_invalid_infile", "tests/test_cli.py::test_invalid_outfi... | jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3 | true | null | 1 | 10 | 3 | 1,186 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231 | 80.968 | |||
7,170 | swe_smith::train::49247 | swe_smith | train | 49,247 | mozilla__bleach.73871d76.func_basic__4bmrsw1v | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | HTML comment parsing broken in certain contexts
#### Description
HTML comments are not being properly handled when they appear inside certain elements like `<script>`, `<style>`, `<noembed>`, `<textarea>`, `<noframes>`, `<iframe>`, and `<xmp>` tags within `<math>` or `<svg>` contexts. The comments are being terminate... | diff --git a/bleach/_vendor/html5lib/_tokenizer.py b/bleach/_vendor/html5lib/_tokenizer.py
index d884801..b4e73dd 100644
--- a/bleach/_vendor/html5lib/_tokenizer.py
+++ b/bleach/_vendor/html5lib/_tokenizer.py
@@ -1213,9 +1213,9 @@ class HTMLTokenizer(object):
def commentState(self):
data = self.stream.c... | ["tests/test_clean.py::test_comments[<!--comment-->text-True-text]", "tests/test_clean.py::test_comments[<!--comment-->text-False-<!--comment-->text]", "tests/test_clean.py::test_comments[text<!--comment-->-True-text]", "tests/test_clean.py::test_comments[text<!--comment-->-False-text<!--comment-->]"] | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 10 | 4 | 1,186 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231 | 80.968 | |||
7,171 | swe_smith::train::35241 | swe_smith | train | 35,241 | alecthomas__voluptuous.a7a55f83.func_basic__5vp0i5ti | swesmith/alecthomas__voluptuous.a7a55f83 | alecthomas/voluptuous | python | null | Union validator with discriminant function fails with TypeError
#### Description
When using a Union validator with a discriminant function, validation fails with a TypeError about missing positional arguments. The discriminant function is not being called correctly.
#### Steps/Code to Reproduce
```python
from volup... | diff --git a/voluptuous/validators.py b/voluptuous/validators.py
index 3f026b1..cd29618 100644
--- a/voluptuous/validators.py
+++ b/voluptuous/validators.py
@@ -345,16 +345,14 @@ class Union(_WithSubValidators):
error = None
for func in funcs:
try:
- if path is None:
- ... | ["voluptuous/tests/tests.py::test_any_with_discriminant"] | ["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests.... | jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83 | true | null | 1 | 10 | 1 | 1,186 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231 | 80.968 | |||
7,172 | swe_smith::train::43625 | swe_smith | train | 43,625 | cloudpipe__cloudpickle.6220b0ce.func_pm_class_rm_funcs__quj9t3gi | swesmith/cloudpipe__cloudpickle.6220b0ce | cloudpipe/cloudpickle | python | null | Function pickling broken after removing _function_reduce method
#### Description
After a recent change, cloudpickle is unable to properly pickle and unpickle functions. The pickling process fails with an AttributeError when trying to access the `_function_reduce` method that was removed.
#### Steps/Code to Reproduce... | diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py
index 8c50ba1..a609d48 100644
--- a/cloudpickle/cloudpickle.py
+++ b/cloudpickle/cloudpickle.py
@@ -1243,20 +1243,6 @@ class Pickler(pickle.Pickler):
state = _function_getstate(func)
return (_make_function, newargs, state, None, None... | ["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_r_mode", "tests/cloudp... | ["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_w_mode", "tests/cloudpickle_test.py::test_extract_class_dict", "tests/cloudpickle_test.py::CloudPickleTest::test_Ellipsis", "tests/cloudpickle_test.py::CloudPickleTest::test_EllipsisTyp... | jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce | true | null | 1 | 15 | 178 | 1,086 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231 | 80.968 | |||
7,173 | swe_smith::train::3174 | swe_smith | train | 3,174 | Suor__funcy.207a7810.func_basic__ttxlpptq | swesmith/Suor__funcy.207a7810 | suor/funcy | python | null | Lookuper functions return None instead of raising LookupError
#### Description
When using `make_lookuper` decorator, functions that should raise `LookupError` for missing keys are silently returning `None` instead. Additionally, `silent_lookuper` decorated functions are throwing `NameError` when trying to look up val... | diff --git a/funcy/calc.py b/funcy/calc.py
index 2966bdd..0908f56 100644
--- a/funcy/calc.py
+++ b/funcy/calc.py
@@ -127,15 +127,15 @@ def _make_lookuper(silent):
def wrapper(arg):
if not memory:
- memory[object()] = None # prevent continuos memory refilling
+ ... | ["tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_calc.py::test_silent_lookuper", "tests/test_calc.py::test_silnent_lookuper_nested"] | ["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_cache[int]", "tests/test_calc.py::test_cache[timedelta]", "tests/test_calc.py::t... | jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810 | true | null | 1 | 6 | 4 | 1,266 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231 | 80.968 | |||
7,174 | swe_smith::train::52497 | swe_smith | train | 52,497 | pydicom__pydicom.7d361b3d.func_pm_remove_assign__g6mp9e69 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | NameError in charset decoding functions after recent changes
#### Description
After some recent changes to the charset handling code, there's a NameError being thrown when trying to decode escaped character sequences. The error occurs because the `encoding` variable is being referenced before it's defined in the `_de... | diff --git a/src/pydicom/charset.py b/src/pydicom/charset.py
index 28a777e..b8ad141 100644
--- a/src/pydicom/charset.py
+++ b/src/pydicom/charset.py
@@ -448,17 +448,12 @@ def _decode_escaped_fragment(
"""
# all 4-character escape codes start with one of two character sets
seq_length = 4 if byte_str.start... | ["tests/test_charset.py::TestCharset::test_nested_character_sets", "tests/test_charset.py::TestCharset::test_inherited_character_set_in_sequence", "tests/test_charset.py::TestCharset::test_bad_decoded_multi_byte_encoding", "tests/test_charset.py::TestCharset::test_bad_decoded_multi_byte_encoding_enforce_standard", "tes... | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 6 | 39 | 1,266 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231 | 80.968 | |||
7,175 | swe_smith::train::1137 | swe_smith | train | 1,137 | jd__tenacity.0d40e76f.func_basic__u9cb36bf | swesmith/jd__tenacity.0d40e76f | jd/tenacity | python | null | Retry logic inverted causing unexpected behavior
#### Description
The retry mechanism is behaving unexpectedly - functions that should retry are not retrying, and functions that should stop are continuing to retry. Additionally, sleep timing appears to be off and attempt counting is incorrect.
#### Steps/Code to Rep... | diff --git a/tenacity/__init__.py b/tenacity/__init__.py
index 72eba04..5bf0c46 100644
--- a/tenacity/__init__.py
+++ b/tenacity/__init__.py
@@ -406,7 +406,7 @@ class BaseRetrying(ABC):
self._add_action_func(self._post_stop_check_actions)
def _post_stop_check_actions(self, retry_state: "RetryCallState")... | ["tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_retry", "tests/test_asyncio.py::TestAsyncio::test_retry_using_async_retying", "tests/test_asyncio.py::TestAsyncio::test_stop_after_attempt", "tests/test_asyncio.py::TestContextMana... | ["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::TestAsyncio::test_repr", "tests/test_asyncio.py::TestAsyncio::test_retry_attributes", "tests/test_asy... | jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f | true | null | 1 | 10 | 59 | 1,186 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231 | 80.968 | |||
7,176 | swe_smith::train::47638 | swe_smith | train | 47,638 | sqlfluff__sqlfluff.50a1c4b6.combine_module__p0x7ya5a | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | LintResult.to_linting_error() returns error when anchor is None
#### Description
When a `LintResult` has no anchor (anchor is `None`), the `to_linting_error()` method incorrectly returns a `SQLLintError` with description "No issues" instead of returning `None`. This causes issues with rule processing and error handli... | diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py
index 1f00fb3..8abf7fa 100644
--- a/src/sqlfluff/core/rules/base.py
+++ b/src/sqlfluff/core/rules/base.py
@@ -138,9 +138,9 @@ class LintResult:
def to_linting_error(self, rule: "BaseRule") -> Optional[SQLLintError]:
"""Conver... | ["test/core/rules/docstring_test.py::test_backtick_replace", "test/core/rules/noqa_test.py::test__linter__raises_malformed_noqa", "test/core/rules/noqa_test.py::test_linter_noqa", "test/core/rules/noqa_test.py::test_linter_noqa_tmp", "test/core/rules/noqa_test.py::test_linter_noqa_disable", "test/core/rules/noqa_test.p... | ["test/core/rules/docstring_test.py::test_content_count[\\\\*\\\\*Anti-pattern\\\\*\\\\*-1]", "test/core/rules/docstring_test.py::test_keyword_anti_before_best", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input0-True]", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 2 | 15 | 9 | 1,086 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231 | 80.968 | |||
7,177 | swe_smith::train::3489 | swe_smith | train | 3,489 | pygments__pygments.27649ebb.combine_file__rnwe9br6 | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | C# and Nemerle lexers broken after recent changes
#### Description
The C# and Nemerle lexers are throwing KeyError exceptions when trying to tokenize code. This affects both standalone usage and when used through ASPX lexers.
#### Steps/Code to Reproduce
```python
from pygments.lexers import CSharpLexer
from pygmen... | diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py
index cf8a5fe..8af4157 100644
--- a/pygments/lexers/dotnet.py
+++ b/pygments/lexers/dotnet.py
@@ -164,11 +164,11 @@ class CSharpLexer(RegexLexer):
def __init__(self, **options):
level = get_choice_opt(options, 'unicodelevel', list(self.t... | ["tests/test_basic_api.py::test_lexer_options[CSharpLexer]", "tests/test_basic_api.py::test_lexer_options[CSharpAspxLexer]", "tests/test_basic_api.py::test_random_input[CSharpLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_lexer_options[NemerleLexer]", "tests/test_basic_api.py::test_... | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 18 | 17 | 1,026 | 0 | 0.6 | 1 | 0.75 | 1 | 0.231 | 80.968 | |||
7,178 | swe_smith::train::38856 | swe_smith | train | 38,856 | pallets__jinja.ada0a9a6.func_basic__4wtfeccr | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | Template compilation generates incorrect local context format
#### Description
When compiling templates that use scoped blocks or context imports, the generated code produces malformed local context dictionaries that cause NameError exceptions during template rendering.
#### Steps/Code to Reproduce
```python
from j... | diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py
index 91720c5..9fd4f84 100644
--- a/src/jinja2/compiler.py
+++ b/src/jinja2/compiler.py
@@ -715,10 +715,10 @@ class CodeGenerator(NodeVisitor):
def dump_local_context(self, frame: Frame) -> str:
items_kv = ", ".join(
- f"{name!r}: {... | ["tests/test_async.py::TestAsyncImports::test_context_imports", "tests/test_async.py::TestAsyncImports::test_trailing_comma", "tests/test_async.py::TestAsyncIncludes::test_context_include_with_overrides", "tests/test_async.py::TestAsyncIncludes::test_unoptimized_scopes", "tests/test_async.py::TestAsyncIncludes::test_un... | ["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",... | jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6 | true | null | 1 | 6 | 24 | 1,265 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230833 | 80.9675 | |||
7,179 | swe_smith::train::48970 | swe_smith | train | 48,970 | facebookresearch__hydra.0f03eb60.lm_rewrite__9mbfwm8f | swesmith/facebookresearch__hydra.0f03eb60 | facebookresearch/hydra | python | null | # get_original_cwd() returns incorrect path when HydraConfig is not initialized
I encountered an issue with `get_original_cwd()` function in Hydra. When HydraConfig is not initialized, the function now returns the current working directory instead of raising an error.
## Reproduction
```python
from hydra.utils impor... | diff --git a/hydra/utils.py b/hydra/utils.py
index 079f976..27e2e84 100644
--- a/hydra/utils.py
+++ b/hydra/utils.py
@@ -90,13 +90,9 @@ def get_original_cwd() -> str:
:return: the original working directory the Hydra application was launched from
"""
if not HydraConfig.initialized():
- raise Value... | ["tests/test_utils.py::test_get_original_cwd_without_hydra"] | ["tests/test_utils.py::test_get_original_cwd", "tests/test_utils.py::test_to_absolute_path[/home/omry/hydra-foo/bar-/home/omry/hydra/foo/bar]", "tests/test_utils.py::test_to_absolute_path[/home/omry/hydra/-foo/bar-/home/omry/hydra/foo/bar]", "tests/test_utils.py::test_to_absolute_path[/home/omry/hydra/-/foo/bar-/foo/ba... | jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60 | true | null | 1 | 10 | 1 | 1,185 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230833 | 80.9675 | |||
7,180 | swe_smith::train::2536 | swe_smith | train | 2,536 | pdfminer__pdfminer.six.1a8bd2f7.func_pm_remove_cond__2tcjmkfd | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | PDFPage.create_pages returns None instead of page iterator
#### Description
When calling `PDFPage.create_pages()`, the method returns `None` instead of the expected page iterator. This breaks PDF processing functionality across the library.
#### Steps/Code to Reproduce
```python
from pdfminer.pdfpage import PDFPage... | diff --git a/pdfminer/pdfpage.py b/pdfminer/pdfpage.py
index a6e6cfc..3fe5ca2 100644
--- a/pdfminer/pdfpage.py
+++ b/pdfminer/pdfpage.py
@@ -113,8 +113,6 @@ class PDFPage:
# Avoid recursion errors by keeping track of visited nodes
if visited is None:
visited = set()
- ... | ["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t... | ["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa... | jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7 | true | null | 1 | 12 | 58 | 1,145 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230833 | 80.9675 | |||
7,181 | swe_smith::train::2083 | swe_smith | train | 2,083 | pdfminer__pdfminer.six.1a8bd2f7.func_basic__7s68yfqt | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | dumppdf.py fails with TypeError when using text stream output
#### Description
When running dumppdf.py with the `-t` (text stream) option, the tool fails with a TypeError related to writing output. The issue appears to affect multiple PDF files and occurs when trying to write text stream data.
#### Steps/Code to Rep... | diff --git a/tools/dumppdf.py b/tools/dumppdf.py
index f88389a..5d389c2 100755
--- a/tools/dumppdf.py
+++ b/tools/dumppdf.py
@@ -416,7 +416,7 @@ def main(argv: Optional[List[str]] = None) -> None:
args = parser.parse_args(args=argv)
if args.debug:
- logging.getLogger().setLevel(logging.DEBUG)
+ ... | ["tests/test_tools_dumppdf.py::TestDumpPDF::test_2", "tests/test_tools_dumppdf.py::TestDumpPDF::test_5", "tests/test_tools_dumppdf.py::TestDumpPDF::test_6", "tests/test_tools_dumppdf.py::TestDumpPDF::test_jo", "tests/test_tools_dumppdf.py::TestDumpPDF::test_simple1", "tests/test_tools_dumppdf.py::TestDumpPDF::test_simp... | ["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p... | jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7 | true | null | 1 | 19 | 8 | 1,005 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230833 | 80.9675 | |||
7,182 | swe_smith::train::39472 | swe_smith | train | 39,472 | pallets__jinja.ada0a9a6.func_pm_remove_assign__0yzwcgk6 | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | Macro calls fail with NameError after recent changes
#### Description
Macro calls are failing with `NameError: name 'off' is not defined` and similar errors for other variables like `caller` and `found_caller`. This appears to affect both sync and async macro execution.
#### Steps/Code to Reproduce
```python
from j... | diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py
index 9dcc9d4..6e7f92e 100644
--- a/src/jinja2/runtime.py
+++ b/src/jinja2/runtime.py
@@ -710,17 +710,11 @@ class Macro:
# time autoescape flag.
if args and isinstance(args[0], EvalContext):
autoescape = args[0].autoescape
- ... | ["tests/test_async.py::test_await_and_macros[asyncio]", "tests/test_async.py::test_await_and_macros[trio]", "tests/test_async.py::TestAsyncImports::test_context_imports", "tests/test_async.py::TestAsyncImports::test_exports[asyncio]", "tests/test_async.py::TestAsyncImports::test_exports[trio]", "tests/test_async.py::Te... | ["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",... | jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6 | true | null | 1 | 10 | 54 | 1,185 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230833 | 80.9675 | |||
7,183 | swe_smith::train::24207 | swe_smith | train | 24,207 | sunpy__sunpy.f8edfd5c.func_pm_remove_assign__830mjegs | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | NameError in get_horizons_coord when checking array time size
#### Description
When calling `get_horizons_coord` with a large array of time values (>10,000), the function raises a `NameError: name 'obstime' is not defined` instead of the expected `ValueError` about the time array size limit.
#### Steps/Code to Repro... | diff --git a/sunpy/coordinates/ephemeris.py b/sunpy/coordinates/ephemeris.py
index b5a70da..abb8cc2 100644
--- a/sunpy/coordinates/ephemeris.py
+++ b/sunpy/coordinates/ephemeris.py
@@ -309,24 +309,19 @@ def get_horizons_coord(body, time='now', id_type=None, *, include_velocity=False
}
if id_type == 's... | ["sunpy/coordinates/tests/test_ephemeris.py::test_get_horizons_coord_array_time_too_large"] | ["sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst", "sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst_light_travel_time", "sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst_light_travel_time_array", "sunpy/coordinates/tests/... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 19 | 1 | 1,005 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230833 | 80.9675 | |||
7,184 | swe_smith::train::21322 | swe_smith | train | 21,322 | rubik__radon.54b88e58.combine_file__8bw0yabk | swesmith/rubik__radon.54b88e58 | rubik/radon | python | null | Config attribute lookup broken with case sensitivity
#### Description
The Config class attribute lookup is not working correctly. When accessing config attributes, the system is performing case-sensitive lookups that don't match the stored values, causing KeyError exceptions.
#### Steps/Code to Reproduce
```python
... | diff --git a/radon/cli/__init__.py b/radon/cli/__init__.py
index 3af5138..d132d82 100644
--- a/radon/cli/__init__.py
+++ b/radon/cli/__init__.py
@@ -181,7 +181,7 @@ def raw(
paths,
exclude=_cfg.get_value('exclude', str, None),
ignore=_cfg.get_value('ignore', str, None),
- summary=False,
+ summary=T... | ["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_raw", "radon/tests/test_cli.py::test_encoding", "radon/tests/test_cli_harvest.py::test_base_iter_filenames", "radon/tests/test_cli_harvest.py::test_base_run", "radon/tests/test_cli_ha... | ["radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::test_cc", "radon/tests/test_cli.py::test_mi", "radon/tests/test_cli.py::test_log", "radon/tests/test_cli.py... | jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58 | true | null | 1 | 18 | 18 | 1,025 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230833 | 80.9675 | |||
7,185 | swe_smith::train::12386 | swe_smith | train | 12,386 | lepture__mistune.bf54ef67.func_basic__hep56mig | swesmith/lepture__mistune.bf54ef67 | lepture/mistune | python | null | Footnotes plugin breaks when using reference footnotes
Description
When using the footnotes plugin with reference-style footnotes, the parser fails with a TypeError.
Consider the following markdown:
```markdown
Here is some text with a footnote[^1].
[^1]: This is the footnote text.
```
This used to work correctly... | diff --git a/src/mistune/plugins/footnotes.py b/src/mistune/plugins/footnotes.py
index 96fe8df..83cd64c 100644
--- a/src/mistune/plugins/footnotes.py
+++ b/src/mistune/plugins/footnotes.py
@@ -53,13 +53,13 @@ def parse_ref_footnote(
) -> int:
ref = state.env.get("ref_footnotes")
if not ref:
- ref = {}... | ["tests/test_plugins.py::TestPlugin1_footnotes::test_footnotes_002", "tests/test_plugins.py::TestPlugin1_footnotes::test_footnotes_003", "tests/test_plugins.py::TestPlugin2_footnotes::test_footnotes_002", "tests/test_plugins.py::TestPlugin2_footnotes::test_footnotes_003"] | ["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx... | jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67 | true | null | 1 | 6 | 4 | 1,264 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230667 | 80.967 | |||
7,186 | swe_smith::train::6324 | swe_smith | train | 6,324 | mahmoud__boltons.3bfcfdd0.func_pm_ctrl_invert_if__2te3u0dq | swesmith/mahmoud__boltons.3bfcfdd0 | mahmoud/boltons | python | null | **Issue Text**
CachedFunction TypeError when using dict-like object as cache
**Describe the bug**
When using a dict-like object as a cache with the `cached` decorator, it raises a TypeError even though the object has the required `__getitem__` and `__setitem__` methods.
**To Reproduce**
Here's a simple example that r... | diff --git a/boltons/cacheutils.py b/boltons/cacheutils.py
index 856bf19..672f7b8 100644
--- a/boltons/cacheutils.py
+++ b/boltons/cacheutils.py
@@ -448,17 +448,16 @@ class CachedFunction:
self.get_cache = cache
elif not (callable(getattr(cache, '__getitem__', None))
and callabl... | ["tests/test_cacheutils.py::test_cached_dec", "tests/test_cacheutils.py::test_unscoped_cached_dec"] | ["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac... | jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0 | true | null | 1 | 9 | 2 | 1,204 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230667 | 80.967 | |||
7,187 | swe_smith::train::43946 | swe_smith | train | 43,946 | pydata__patsy.a5d16484.func_basic__962s8efi | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | Infix parser breaks with "operators must be unary or binary" error
#### Description
The infix parser is throwing a `ValueError: operators must be unary or binary` error when trying to parse formulas. This appears to be affecting basic formula parsing functionality across the library.
#### Steps/Code to Reproduce
``... | diff --git a/patsy/infix_parser.py b/patsy/infix_parser.py
index 6c127b5..348a6d6 100644
--- a/patsy/infix_parser.py
+++ b/patsy/infix_parser.py
@@ -207,39 +207,36 @@ def _read_op_context(token, c):
def infix_parse(tokens, operators, atomic_types, trace=False):
- token_source = iter(tokens)
+ token_source = ... | ["patsy/constraint.py::test_linear_constraint", "patsy/constraint.py::test_eval_errors", "patsy/desc.py::test_ModelDesc_from_formula", "patsy/desc.py::test_eval_formula", "patsy/desc.py::test_eval_formula_error_reporting", "patsy/desc.py::test_formula_factor_origin", "patsy/design_info.py::test_DesignInfo_linear_constr... | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 25 | 32 | 884 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230667 | 80.967 | |||
7,188 | swe_smith::train::24771 | swe_smith | train | 24,771 | marshmallow-code__marshmallow.9716fc62.func_basic__t79y3k6b | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | Field validation error messages broken when using format() with kwargs
#### Description
When field validation fails, the error message formatting is broken. The `msg.format()` call is passing kwargs as a single argument instead of unpacking them, causing a KeyError when the message template tries to access named plac... | diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py
index e83ba19..8d2251b 100644
--- a/src/marshmallow/fields.py
+++ b/src/marshmallow/fields.py
@@ -289,9 +289,9 @@ class Field(FieldABC):
f"ValidationError raised by `{class_name}`, but error key `{key}` does "
"not exis... | ["tests/test_deserialization.py::TestFieldDeserialization::test_field_toggle_show_invalid_value_in_error_message", "tests/test_deserialization.py::TestFieldDeserialization::test_invalid_datetime_deserialization[not-a-datetime]", "tests/test_deserialization.py::TestFieldDeserialization::test_invalid_datetime_deserializa... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 6 | 52 | 1,264 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230667 | 80.967 | |||
7,189 | swe_smith::train::49309 | swe_smith | train | 49,309 | mozilla__bleach.73871d76.func_basic__hyv12ogg | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | URL parsing raises ValueError for valid URLs with port numbers
#### Description
When parsing URLs that contain port numbers, the URL parser incorrectly raises a ValueError claiming the netloc contains "valid characters under NFKC normalization" when it should be accepting these URLs.
#### Steps/Code to Reproduce
``... | diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py
index ac6e7a9..ae2f66a 100644
--- a/bleach/_vendor/parse.py
+++ b/bleach/_vendor/parse.py
@@ -395,21 +395,19 @@ def _splitnetloc(url, start=0):
return url[start:delim], url[delim:] # return (domain, rest)
def _checknetloc(netloc):
- if not netl... | ["tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_invalid_filter_attr", "tests/test_clean.py::test_attributes_tag_callable", "tests/test_clean.py::test_preserves_attributes_order", "tests/test_clean.py::TestCleaner::test_filters", ... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 20 | 18 | 984 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230667 | 80.967 | |||
7,190 | swe_smith::train::2699 | swe_smith | train | 2,699 | cknd__stackprinter.219fcc52.func_basic__ht7z0ll7 | swesmith/cknd__stackprinter.219fcc52 | cknd/stackprinter | python | null | Exception chain formatting shows incorrect order and reversed hint text
#### Description
When formatting chained exceptions, the exception chain is displayed in the wrong order and the chain hint text appears reversed.
#### Steps/Code to Reproduce
```python
import stackprinter
class CustomError(Exception):
pas... | diff --git a/stackprinter/formatting.py b/stackprinter/formatting.py
index 25f5fd8..1e4f44e 100644
--- a/stackprinter/formatting.py
+++ b/stackprinter/formatting.py
@@ -130,21 +130,15 @@ def format_exc_info(etype, evalue, tb, style='plaintext', add_summary='auto',
msg = ''
try:
- # First, recursively... | ["tests/test_formatting.py::test_exception_formatting"] | ["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"] | jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52 | true | null | 1 | 18 | 1 | 1,024 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230667 | 80.967 | |||
7,191 | swe_smith::train::39762 | swe_smith | train | 39,762 | tornadoweb__tornado.d5ac65c1.func_pm_ctrl_invert_if__lm3p0ixk | swesmith/tornadoweb__tornado.d5ac65c1 | tornadoweb/tornado | python | null | Debug mode traceback display inverted in error handling
#### Description
When `serve_traceback` is enabled in debug mode, the error handling logic is inverted - it shows HTML error pages when it should show tracebacks, and shows tracebacks when it should show HTML error pages.
#### Steps/Code to Reproduce
```python... | diff --git a/tornado/web.py b/tornado/web.py
index 357c5f1..b1acf04 100644
--- a/tornado/web.py
+++ b/tornado/web.py
@@ -1358,18 +1358,17 @@ class RequestHandler:
``sys.exc_info()`` or ``traceback.format_exc``.
"""
if self.settings.get("serve_traceback") and "exc_info" in kwargs:
- ... | ["test_404 (tornado.test.web_test.Default404Test)", "test_default (tornado.test.web_test.ErrorResponseTest)"] | ["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header... | jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1 | true | null | 1 | 13 | 2 | 1,123 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2305 | 80.9665 | |||
7,192 | swe_smith::train::49176 | swe_smith | train | 49,176 | mozilla__bleach.73871d76.combine_module__97whzul9 | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | HTML parsing returns None instead of fragment
#### Description
When parsing HTML fragments, the parser is returning `None` instead of the expected parsed fragment. This affects all HTML processing functionality including cleaning and linkifying.
#### Steps/Code to Reproduce
```python
import bleach
# Basic cleaning... | diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py
index 2869da0..fa46e87 100644
--- a/bleach/_vendor/html5lib/treebuilders/base.py
+++ b/bleach/_vendor/html5lib/treebuilders/base.py
@@ -195,8 +195,6 @@ class TreeBuilder(object):
def elementInScope(self, targ... | ["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 2 | 19 | 183 | 1,003 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2305 | 80.9665 | |||
7,193 | swe_smith::train::31188 | swe_smith | train | 31,188 | scrapy__scrapy.35212ec5.combine_module__mclmabig | swesmith/scrapy__scrapy.35212ec5 | scrapy/scrapy | python | null | ScrapyHTTPClientFactory missing ClientFactory inheritance breaks Twisted integration
#### Description
When using Scrapy's HTTP client functionality, the `ScrapyHTTPClientFactory` class fails to work properly because it no longer inherits from Twisted's `ClientFactory`. This causes various HTTP operations to fail with... | diff --git a/scrapy/core/downloader/webclient.py b/scrapy/core/downloader/webclient.py
index e5c2255..60cca02 100644
--- a/scrapy/core/downloader/webclient.py
+++ b/scrapy/core/downloader/webclient.py
@@ -91,7 +91,7 @@ class ScrapyHTTPPageGetter(HTTPClient):
# twisted.web.client.HTTPClientFactory. When that class was ... | ["tests/test_engine.py::EngineTest::test_crawler", "tests/test_engine.py::EngineTest::test_crawler_dupefilter", "tests/test_engine.py::EngineTest::test_crawler_itemerror", "tests/test_webclient.py::WebClientTestCase::testFactoryInfo", "tests/test_webclient.py::WebClientTestCase::testHostHeader", "tests/test_webclient.p... | ["tests/test_engine.py::EngineTest::test_close_downloader", "tests/test_engine.py::EngineTest::test_crawler_change_close_reason_on_idle", "tests/test_engine.py::EngineTest::test_short_timeout", "tests/test_engine.py::EngineTest::test_start_already_running_exception", "tests/test_engine.py::test_request_scheduled_signal... | jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5 | true | null | 2 | 7 | 16 | 1,243 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2305 | 80.9665 | |||
7,194 | r2e_gym::train::4275 | r2e_gym | train | 4,275 | numpy__52ff75bcf1085a34e9d86db3040944615c04e3d2 | numpy | numpy/numpy | python | 52ff75bcf1085a34e9d86db3040944615c04e3d2 | **Title**: Incorrect Median Calculation for Masked Arrays with Special Values
**Description**
When calculating the median of a masked array containing special values like `inf`, `-inf`, or when all elements are masked, the result is incorrect. This issue arises because the median function does not properly handle mask... | diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py
--- a/numpy/ma/extras.py
+++ b/numpy/ma/extras.py
@@ -758,6 +758,19 @@
ind[axis] = np.minimum(h, asorted.shape[axis] - 1)
high = asorted[tuple(ind)]
+ def replace_masked(s):
+ # Replace masked entries with minimum_full_value unless it all values... | diff --git a/numpy/lib/tests/test_nanfunctions.py b/numpy/lib/tests/test_nanfunctions.py
--- a/numpy/lib/tests/test_nanfunctions.py
+++ b/numpy/lib/tests/test_nanfunctions.py
@@ -710,6 +710,18 @@
a = np.array([[inf, inf], [inf, inf]])
assert_equal(np.nanmedian(a, axis=1), inf)
+ ... | null | null | namanjain12/numpy_final:52ff75bcf1085a34e9d86db3040944615c04e3d2 | true | null | 1 | 19 | null | 1,715 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.349167 | 80.96625 | ||
7,195 | swe_smith::train::26351 | swe_smith | train | 26,351 | pylint-dev__astroid.b114f6b5.func_pm_remove_assign__abuj8rz8 | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Module relative import resolution broken for certain package structures
#### Description
When resolving relative imports in modules, the `relative_to_absolute_name` method fails with an `UnboundLocalError` for `package_name` in certain package configurations. This affects import resolution and causes failures when an... | diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py
index 99ed796..603557e 100644
--- a/astroid/nodes/scoped_nodes/scoped_nodes.py
+++ b/astroid/nodes/scoped_nodes/scoped_nodes.py
@@ -499,7 +499,6 @@ class Module(LocalsDictNodeNG):
if level:
if self... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_mul... | ["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest:... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 7 | 43 | 1,242 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230333 | 80.966 | |||
7,196 | swe_bench::test::972 | swe_bench | test | 972 | matplotlib__matplotlib-20816 | matplotlib/matplotlib | matplotlib/matplotlib | python | 586fcffaae03e40f851c5bc854de290b89bae18e | Add ability to disable callbacks temporarily
It may be useful to update some attributes on an object that has callbacks temporarily and we don't want those callback signals being processed during that time.
I guess we could add a `disabling_callbacks()` context manager on CallbackRegistry?
```python
with self.norm.cal... | Naming suggestion: `callbacks_disabled()` or even only `disabled()`:
```
with self.norm.callbacks.disabled():
```
In Qt, this is `Widget->blockSignals`, and in GTK, it is `g_signal_handlers_block_*`. Wx has a `wxEventBlocker` that you add on a widget to temporarily stop events. Not sure if Tk has anything similar.... | diff --git a/lib/matplotlib/cbook/__init__.py b/lib/matplotlib/cbook/__init__.py
--- a/lib/matplotlib/cbook/__init__.py
+++ b/lib/matplotlib/cbook/__init__.py
@@ -122,7 +122,8 @@ def _weak_or_strong_ref(func, callback):
class CallbackRegistry:
"""
- Handle registering and disconnecting for a set of signals a... | diff --git a/lib/matplotlib/tests/test_cbook.py b/lib/matplotlib/tests/test_cbook.py
--- a/lib/matplotlib/tests/test_cbook.py
+++ b/lib/matplotlib/tests/test_cbook.py
@@ -361,6 +361,39 @@ def test_callbackregistry_custom_exception_handler(monkeypatch, cb, excp):
cb.process('foo')
+def test_callbackregistry... | ["lib/matplotlib/tests/test_cbook.py::test_callbackregistry_blocking"] | ["lib/matplotlib/tests/test_cbook.py::Test_delete_masked_points::test_bad_first_arg", "lib/matplotlib/tests/test_cbook.py::Test_delete_masked_points::test_string_seq", "lib/matplotlib/tests/test_cbook.py::Test_delete_masked_points::test_datetime", "lib/matplotlib/tests/test_cbook.py::Test_delete_masked_points::test_rgb... | null | true | 2021-08-10T03:57:25Z | 1 | 34 | 1 | 502 | 0 | 0.8 | 1 | 0.55 | 1 | 0.197 | 80.966 | |
7,197 | swe_smith::train::10122 | swe_smith | train | 10,122 | paramiko__paramiko.23f92003.combine_file__hlj0kr05 | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | make_pipe() returns None on Windows platform
#### Description
The `make_pipe()` function in `paramiko/pipe.py` is returning `None` instead of a proper pipe object on Windows systems. This causes AttributeError when trying to use pipe functionality.
#### Steps/Code to Reproduce
```python
import paramiko.pipe as pipe... | diff --git a/paramiko/pipe.py b/paramiko/pipe.py
index 65944fa..8bccdec 100644
--- a/paramiko/pipe.py
+++ b/paramiko/pipe.py
@@ -31,19 +31,19 @@ import socket
def make_pipe():
- if sys.platform[:3] != "win":
+ if sys.platform[:3] == "win":
p = PosixPipe()
else:
p = WindowsPipe()
- r... | ["tests/test_buffered_pipe.py::BufferedPipeTest::test_or_pipe", "tests/test_transport.py::TransportTest::test_select", "tests/test_transport.py::TransportTest::test_select_after_close", "tests/test_transport.py::TransportTest::test_stderr_select", "tests/test_transport.py::ServiceRequestingTransportTest::test_select", ... | ["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag... | jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003 | true | null | 1 | 16 | 7 | 1,062 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230333 | 80.966 | |||
7,198 | swe_smith::train::20436 | swe_smith | train | 20,436 | tobymao__sqlglot.036601ba.combine_module__idagba7w | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | JSON path extraction fails for list indices when schema is not provided
#### Description
When executing queries with JSON path extraction on list elements without providing an explicit schema, the executor raises a `NotImplementedError` instead of properly extracting values from list indices.
#### Steps/Code to Repr... | diff --git a/sqlglot/executor/__init__.py b/sqlglot/executor/__init__.py
index cf4efc3..6b062de 100644
--- a/sqlglot/executor/__init__.py
+++ b/sqlglot/executor/__init__.py
@@ -55,19 +55,6 @@ def execute(
read = read or dialect
tables_ = ensure_tables(tables, dialect=read)
- if not schema:
- schem... | ["tests/test_executor.py::TestExecutor::test_aggregate_without_group_by", "tests/test_executor.py::TestExecutor::test_case_sensitivity", "tests/test_executor.py::TestExecutor::test_execute_subqueries", "tests/test_executor.py::TestExecutor::test_execute_tables", "tests/test_executor.py::TestExecutor::test_group_by", "t... | ["tests/test_executor.py::TestExecutor::test_agg_order", "tests/test_executor.py::TestExecutor::test_correlated_count", "tests/test_executor.py::TestExecutor::test_execute_callable", "tests/test_executor.py::TestExecutor::test_execute_catalog_db_table", "tests/test_executor.py::TestExecutor::test_execute_tpcds", "tests... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 2 | 20 | 7 | 982 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230333 | 80.966 | |||
7,199 | swe_smith::train::32274 | swe_smith | train | 32,274 | davidhalter__parso.338a5760.func_pm_remove_cond__746olb07 | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | Grammar.parse() returns None when file_io parameter is not provided
#### Description
When calling `Grammar.parse()` without providing a `file_io` parameter, the method returns `None` instead of the expected parsed tree. This breaks existing code that relies on the parser to return a valid AST node.
#### Steps/Code t... | diff --git a/parso/grammar.py b/parso/grammar.py
index 85c65db..87d0535 100644
--- a/parso/grammar.py
+++ b/parso/grammar.py
@@ -95,26 +95,10 @@ class Grammar(Generic[_NodeT]):
if isinstance(path, str):
path = Path(path)
- if isinstance(cache_path, str):
- cache_path = Path(cac... | ["test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_used_update[False-False]", "test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_cache.py::test_cache_last_used_update[True-False]", "test/test_cache.py::test_cache_last_used_update[True-True]", "test/test_cache.py::test_i... | ["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_dump_tree.py::test_dump_parser_tree_invalid_args", "test/test_dump... | jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760 | true | null | 1 | 19 | 93 | 1,002 | 0 | 0.6 | 1 | 0.75 | 1 | 0.230333 | 80.966 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.