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
6,100
swe_smith::train::2968
swe_smith
train
2,968
Suor__funcy.207a7810.combine_file__4ho5rovv
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Bug: Decorator argument access is broken in funcy **Describe the bug** I've discovered an issue with the decorator functionality in funcy. When trying to access arguments in decorated functions, I'm getting unexpected behavior. The decorator seems to be passing arguments in the wrong order or returning None when it ...
diff --git a/funcy/decorators.py b/funcy/decorators.py index e001629..d12b727 100644 --- a/funcy/decorators.py +++ b/funcy/decorators.py @@ -71,10 +71,10 @@ class Call(object): def __getattr__(self, name): try: - res = self.__dict__[name] = arggetter(self._func)(name, self._args, self._kwargs...
["tests/test_decorators.py::test_decorator_kw_only_args", "tests/test_decorators.py::test_decorator_access_args", "tests/test_decorators.py::test_double_decorator_defaults", "tests/test_decorators.py::test_chain_arg_access"]
["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_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_cal...
jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810
true
null
1
10
4
1,418
0
0.6
1
0.75
1
0.269667
81.084
6,101
swe_smith::train::44454
swe_smith
train
44,454
pydata__patsy.a5d16484.func_pm_remove_cond__n4j3qysl
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
FactorInfo constructor validation removed breaks existing behavior Description The FactorInfo constructor no longer validates its arguments, allowing invalid configurations to be created without raising appropriate errors. Steps/Code to Reproduce ```python from patsy.design_info import FactorInfo # These should ra...
diff --git a/patsy/design_info.py b/patsy/design_info.py index d94b97a..2508e89 100644 --- a/patsy/design_info.py +++ b/patsy/design_info.py @@ -79,27 +79,9 @@ class FactorInfo: def __init__(self, factor, type, state, num_columns=None, categories=None): self.factor = factor self.type = type - ...
["patsy/build.py::test__eval_factor_categorical", "patsy/design_info.py::test_FactorInfo"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "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__examine_factor_types", "patsy/builtins.py::test_I",...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
18
2
1,257
0
0.6
1
0.75
1
0.2695
81.0835
6,102
swe_smith::train::46609
swe_smith
train
46,609
python-trio__trio.cfbbe2c1.combine_file__e8p2iisa
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
#### Description When using `from_thread_run` during trio shutdown, the function incorrectly returns a successful outcome instead of raising `RunFinishedError` when the system nursery is closed. #### Steps/Code to Reproduce ```python import trio from trio import from_thread_run, to_thread_run_sync from functools imp...
diff --git a/src/trio/_threads.py b/src/trio/_threads.py index 7afd7b6..cddd71c 100644 --- a/src/trio/_threads.py +++ b/src/trio/_threads.py @@ -195,11 +195,11 @@ class Run(Generic[RetT]): # type: ignore[misc] trio.lowlevel.spawn_system_task( self.run_system, ...
["src/trio/_tests/test_threads.py::test_from_thread_run_during_shutdown", "src/trio/_tests/test_threads.py::test_from_thread_check_cancelled"]
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
12
2
1,377
0
0.6
1
0.75
1
0.2695
81.0835
6,103
swe_smith::train::10323
swe_smith
train
10,323
paramiko__paramiko.23f92003.func_basic__5uo82bzm
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH authentication fails when server doesn't send server-sig-algs list #### Description When connecting to SSH servers that don't send a server-sig-algs list, authentication fails unexpectedly. The client should fall back to using the first preferred algorithm from its own list, but instead it's selecting the wrong a...
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py index bc7f298..dc95f3f 100644 --- a/paramiko/auth_handler.py +++ b/paramiko/auth_handler.py @@ -294,15 +294,15 @@ class AuthHandler: return self.transport._key_info[algorithm](Message(keyblob)) def _choose_fallback_pubkey_algorithm(self, k...
["tests/auth.py::SHA2SignaturePubkeys::first_client_preferred_algo_used_when_no_server_sig_algs"]
["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
10
1
1,417
0
0.6
1
0.75
1
0.2695
81.0835
6,104
swe_smith::train::35758
swe_smith
train
35,758
stanfordnlp__dspy.651a4c71.func_pm_remove_cond__e4m44910
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Bug: Unable to get file path for class objects When trying to get the file path for a class object, the code fails because the handling for class objects has been removed from the `old_getfile` function in `dspy/teleprompt/utils.py`. ## Reproduction I encountered this issue when trying to work with class objects i...
diff --git a/dspy/teleprompt/utils.py b/dspy/teleprompt/utils.py index 954ce56..2606441 100644 --- a/dspy/teleprompt/utils.py +++ b/dspy/teleprompt/utils.py @@ -405,14 +405,6 @@ def old_getfile(object): if getattr(object, '__file__', None): return object.__file__ raise TypeError('{!r} is ...
["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
9
4
1,435
0
0.6
1
0.75
1
0.269167
81.0825
6,105
swe_smith::train::44626
swe_smith
train
44,626
mahmoud__glom.fb3c4e76.func_basic__39aaz49a
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
Match expressions return wrong values and have inverted logic #### Description Match expressions using the `M` object are behaving incorrectly. The comparison operators are inverted and the expressions return the wrong values when they should match. #### Steps/Code to Reproduce ```python from glom import glom, M #...
diff --git a/glom/matching.py b/glom/matching.py index 798ac40..deb88fb 100644 --- a/glom/matching.py +++ b/glom/matching.py @@ -439,26 +439,26 @@ class _MExpr: return Not(self) def glomit(self, target, scope): - lhs, op, rhs = self.lhs, self.op, self.rhs + lhs, op, rhs = self.rhs, self.op...
["glom/test/test_error.py::test_all_public_errors", "glom/test/test_match.py::test_basic", "glom/test/test_match.py::test_match_expressions", "glom/test/test_match.py::test_defaults", "glom/test/test_match.py::test_m_call_match", "glom/test/test_match.py::test_cruddy_json", "glom/test/test_match.py::test_pattern_matchi...
["glom/test/test_basic.py::test_initial_integration", "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", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
26
12
1,094
0
0.6
1
0.75
1
0.269
81.082
6,106
swe_smith::train::35923
swe_smith
train
35,923
stanfordnlp__dspy.651a4c71.lm_rewrite__naq8adqv
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# dotdict.__getattr__ fails to handle dunder methods correctly ## Description Python Version: 3.11.11 DSPy Version: latest I've encountered an issue with the `dotdict` class in DSPy. When trying to access dunder methods (methods surrounded by double underscores like `__len__`), the implementation fails to handle the...
diff --git a/dspy/dsp/utils/utils.py b/dspy/dsp/utils/utils.py index 4025dfa..1a3894f 100644 --- a/dspy/dsp/utils/utils.py +++ b/dspy/dsp/utils/utils.py @@ -77,13 +77,11 @@ def batch(group, bsize, provide_offset=False): class dotdict(dict): def __getattr__(self, key): - if key.startswith('__') and key.en...
["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
6
4
1,494
0
0.6
1
0.75
1
0.269
81.082
6,107
swe_smith::train::29879
swe_smith
train
29,879
getnikola__nikola.0f4c230e.func_pm_ctrl_shuffle__ajb0o51s
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
Post compilation fails with NameError: name 'dest' is not defined #### Description When compiling posts, the compilation process fails with a `NameError` because the variable `dest` is being used before it's defined in the `compile` method. #### Steps/Code to Reproduce ```python from nikola.post import Post from ni...
diff --git a/nikola/post.py b/nikola/post.py index d7c1b9e..dea3f52 100644 --- a/nikola/post.py +++ b/nikola/post.py @@ -720,19 +720,12 @@ class Post(object): return deps def compile(self, lang): - """Generate the cache/ file with the compiled post.""" - dest = self.translated_base_path(la...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "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[overall]", "tests/integration/test_archive_full.py::test_full...
["tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_per_day.py::test_archive_exists", "tests/integration/test_archive_per_day.py::test_check_files", "tests/integration/test_archive_per_month.py::test_archive_exists", "tests/integration/test_archive_per_month.py::test_check_files...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
31
98
993
0
0.6
1
0.75
1
0.268833
81.0815
6,108
swe_smith::train::50891
swe_smith
train
50,891
python-hyper__h11.bed0dd4a.func_pm_ctrl_shuffle__bzh4pp0p
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
UnboundLocalError in HTTP response parsing when variables used before assignment #### Description When parsing HTTP responses, the code is trying to use variables before they are assigned, causing an `UnboundLocalError`. This happens when the response parsing logic tries to access `lines`, `matches`, and `reason` var...
diff --git a/h11/_readers.py b/h11/_readers.py index 08a9574..602cbaf 100644 --- a/h11/_readers.py +++ b/h11/_readers.py @@ -94,18 +94,10 @@ status_line_re = re.compile(status_line.encode("ascii")) def maybe_read_from_SEND_RESPONSE_server( buf: ReceiveBuffer, ) -> Union[InformationalResponse, Response, None]: - ...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_client_talking_to_http10_server", "h11/tests/test_connection.py::test_automatic_transfer_encoding_in_...
["h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_connection.py::test_server_talking_to_http10_client", "h11/tests/test_connection.py::...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
19
20
1,233
0
0.6
1
0.75
1
0.268833
81.0815
6,109
swe_smith::train::48025
swe_smith
train
48,025
sqlfluff__sqlfluff.50a1c4b6.func_basic__teclrpdw
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Jinja macro context uses wrong key when iterating over module dict #### Description When loading Jinja macros from templates, the macro context is being populated with incorrect keys. The code iterates over the module dictionary keys but then uses the macro's `__name__` attribute as the context key instead of the ori...
diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py index 934ded3..b84a295 100644 --- a/src/sqlfluff/core/templaters/jinja.py +++ b/src/sqlfluff/core/templaters/jinja.py @@ -126,25 +126,17 @@ class JinjaTemplater(PythonTemplater): """ from jinja2.runtime import M...
["test/core/templaters/jinja_test.py::test__templater_full[jinja_b/jinja-False-False]", "test/core/templaters/jinja_test.py::test__templater_full[jinja_g_macros/jinja-True-False]", "test/core/templaters/jinja_test.py::test__templater_full[jinja_exclude_macro_path/jinja-True-False]", "test/core/templaters/jinja_test.py:...
["test/core/templaters/jinja_test.py::test__templater_jinja[simple]", "test/core/templaters/jinja_test.py::test__templater_jinja[unboundlocal_bugfix]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[basic_block]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[strip_left_block]", "...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
16
12
1,293
0
0.6
1
0.75
1
0.268833
81.0815
6,110
swe_smith::train::9991
swe_smith
train
9,991
google__textfsm.c31b6007.func_basic__mtg8zl85
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
<START WRITING> # Indentation error in _GetCh method of Pager class ## Description There's an indentation error in the `_GetCh` method of the `Pager` class in `terminal.py`. The method is defined outside the class scope, causing issues when trying to use the Pager functionality. ## Steps to Reproduce ```python from...
diff --git a/textfsm/terminal.py b/textfsm/terminal.py index 32252a4..eddfe02 100755 --- a/textfsm/terminal.py +++ b/textfsm/terminal.py @@ -412,7 +412,7 @@ class Pager(object): sys.stdout.flush() return ch - def _GetCh(self): +def _GetCh(self): """Read a single character from the user. Returns...
["tests/terminal_test.py::PagerTest::testPage", "tests/terminal_test.py::PagerTest::testPager"]
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.p...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
14
2
1,333
0
0.6
1
0.75
1
0.268833
81.0815
6,111
swe_smith::train::43852
swe_smith
train
43,852
pydata__patsy.a5d16484.func_basic__0mnkbnia
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
LinearConstraint validation logic inverted When creating linear constraints with matching variable names, the validation logic is backwards. The function raises an error when variable names match instead of when they don't match. #### Steps/Code to Reproduce ```python from patsy.constraint import LinearConstraint, l...
diff --git a/patsy/constraint.py b/patsy/constraint.py index 6c04414..3c8f99c 100644 --- a/patsy/constraint.py +++ b/patsy/constraint.py @@ -379,20 +379,17 @@ def linear_constraint(constraint_like, variable_names): """This is the internal interface implementing DesignInfo.linear_constraint, see there for docs...
["patsy/constraint.py::test_linear_constraint", "patsy/constraint.py::test_eval_errors", "patsy/design_info.py::test_DesignInfo_linear_constraint"]
["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
41
3
793
0
0.6
1
0.75
1
0.268833
81.0815
6,112
swe_smith::train::6786
swe_smith
train
6,786
joke2k__faker.8b401a7d.func_pm_remove_assign__kdiswtf6
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
Thai date formatting broken for %Y and %+ format specifiers #### Description When using the Thai locale (th_TH) date provider, certain format specifiers are not working correctly. The `%Y` and `%+` format specifiers return empty strings or cause errors instead of properly formatted dates. #### Steps/Code to Reproduc...
diff --git a/faker/providers/date_time/th_TH/__init__.py b/faker/providers/date_time/th_TH/__init__.py index 8ece4b5..7feeb78 100644 --- a/faker/providers/date_time/th_TH/__init__.py +++ b/faker/providers/date_time/th_TH/__init__.py @@ -128,10 +128,6 @@ def _thai_strftime( # Equivalent to ``%Y-%m-%d'' ...
["tests/providers/test_date_time.py::TestThTh::test_date", "tests/providers/test_date_time.py::TestThTh::test_date_pattern"]
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
17
2
1,273
0
0.6
1
0.75
1
0.268833
81.0815
6,113
swe_smith::train::7753
swe_smith
train
7,753
cantools__cantools.0c6a7871.func_basic__tskle2bm
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Monitor filter display broken with string index out of range error #### Description The monitor subcommand crashes with an `IndexError: string index out of range` when trying to display the filter menu or process user input. This affects all monitor functionality including basic message display, filtering, and intera...
diff --git a/src/cantools/subparsers/monitor.py b/src/cantools/subparsers/monitor.py index 043a1fa..7d08389 100644 --- a/src/cantools/subparsers/monitor.py +++ b/src/cantools/subparsers/monitor.py @@ -144,20 +144,18 @@ class Monitor(can.Listener): curses.color_pair(1)) def draw_menu(se...
["tests/test_monitor.py::CanToolsMonitorTest::test_bad_message_length_error", "tests/test_monitor.py::CanToolsMonitorTest::test_can_fd", "tests/test_monitor.py::CanToolsMonitorTest::test_display_muxed_data", "tests/test_monitor.py::CanToolsMonitorTest::test_display_muxed_data_multiple_single_line", "tests/test_monitor....
["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
20
15
1,213
0
0.6
1
0.75
1
0.268833
81.0815
6,114
swe_smith::train::2049
swe_smith
train
2,049
pdfminer__pdfminer.six.1a8bd2f7.func_basic__3na1amkd
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
dumppdf.py crashes with TypeError when processing PDF files #### Description The dumppdf.py tool is crashing with TypeError when trying to process PDF files. The error occurs during XML output generation when the tool encounters dictionary keys and other string-based values. #### Steps/Code to Reproduce ```python #...
diff --git a/tools/dumppdf.py b/tools/dumppdf.py index f88389a..17ab442 100755 --- a/tools/dumppdf.py +++ b/tools/dumppdf.py @@ -38,13 +38,13 @@ def escape(s: Union[str, bytes]) -> str: def dumpxml(out: TextIO, obj: object, codec: Optional[str] = None) -> None: if obj is None: - out.write("<null />") + ...
["tests/test_tools_dumppdf.py::TestDumpPDF::test_2", "tests/test_tools_dumppdf.py::TestDumpPDF::test_3", "tests/test_tools_dumppdf.py::TestDumpPDF::test_4", "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...
["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
36
9
893
0
0.6
1
0.75
1
0.268833
81.0815
6,115
r2e_gym::train::6644
r2e_gym
train
6,644
pillow__6ffe9e1689efd44c095a4c5d751b96dd37a8edf9
pillow
python-pillow/pillow
python
6ffe9e1689efd44c095a4c5d751b96dd37a8edf9
**Title:** Using Underscores in TIFF Tag Keywords Causes Missing Resolution Tags **Description:** When saving a TIFF image using keyword arguments with underscores (e.g., `x_resolution`, `y_resolution`), the resolution tags are not properly set. As a result, attempting to access these tags raises a `KeyError`. **Exam...
diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -1068,31 +1068,25 @@ if "icc_profile" in im.info: ifd[ICCPROFILE] = im.info["icc_profile"] - if "description" in im.encoderinfo: - ifd[IMAGEDESCRIPTION] = im.encode...
diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -306,7 +306,6 @@ self.assertEqual(im.mode, "L") self.assert_image_similar(im, original, 7.3) - def test_page_number_x_0(self): # Issue 973 # Test TIFF ...
null
null
namanjain12/pillow_final:6ffe9e1689efd44c095a4c5d751b96dd37a8edf9
true
null
2
54
null
1,245
0
0.75
1
0.6375
1
0.3875
81.08125
6,116
swe_smith::train::52839
swe_smith
train
52,839
stanfordnlp__string2string.c4a72f59.func_pm_op_change_const__sazy7lxt
swesmith/stanfordnlp__string2string.c4a72f59
stanfordnlp/string2string
python
null
### DTW Alignment Path Calculation Error #### Description It seems there's an issue with the DTW (Dynamic Time Warping) alignment path calculation when using the `absolute_difference` distance metric. The alignment path is not being computed correctly, leading to an `IndexError` in certain scenarios. #### Expected B...
diff --git a/string2string/alignment/classical.py b/string2string/alignment/classical.py index 86c8039..498aa83 100644 --- a/string2string/alignment/classical.py +++ b/string2string/alignment/classical.py @@ -921,7 +921,7 @@ class DTW: * The DTW algorithm is a dynamic programming algorithm that finds the o...
["tests/test_alignment.py::AlignmentTestCase::test_dtw"]
["tests/test_alignment.py::AlignmentTestCase::test_hiirschberg", "tests/test_alignment.py::AlignmentTestCase::test_longest_common_subsequence", "tests/test_alignment.py::AlignmentTestCase::test_longest_common_subsubtring", "tests/test_alignment.py::AlignmentTestCase::test_needleman_wunsch", "tests/test_alignment.py::Al...
jyangballin/swesmith.x86_64.stanfordnlp_1776_string2string.c4a72f59
true
null
1
14
1
1,332
0
0.6
1
0.75
1
0.268667
81.081
6,117
swe_smith::train::31612
swe_smith
train
31,612
benoitc__gunicorn.bacbf8aa.func_pm_ctrl_shuffle__8k08gmp5
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
# Positive integer validation broken in config.py ## Description The validation for positive integers in the configuration is broken. When setting a configuration value that should be a positive integer (like `workers`), the validation function is not properly checking if the value is positive or converting non-integ...
diff --git a/gunicorn/config.py b/gunicorn/config.py index 402a26b..3367e21 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -355,15 +355,14 @@ def validate_dict(val): def validate_pos_int(val): + return val + if val < 0: + raise ValueError("Value must be positive: %s" % val) if not is...
["tests/test_config.py::test_pos_int_validation"]
["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
7
1
1,472
0
0.6
1
0.75
1
0.268667
81.081
6,118
r2e_gym::train::5896
r2e_gym
train
5,896
tornado__cab39beba263e68647d54d68d18cab4f52c7a802
tornado
tornadoweb/tornado
python
cab39beba263e68647d54d68d18cab4f52c7a802
**[ISSUE]** **Title:** `gen_test` Decorator Does Not Accept `timeout` Parameter, Causing TypeError **Description:** When attempting to use the `gen_test` decorator with the `timeout` parameter to specify a custom timeout for asynchronous tests, a `TypeError` is raised. This prevents tests that require longer executio...
diff --git a/tornado/testing.py b/tornado/testing.py --- a/tornado/testing.py +++ b/tornado/testing.py @@ -32,6 +32,7 @@ from tornado.stack_context import ExceptionStackContext from tornado.util import raise_exc_info, basestring_type import functools +import inspect import logging import os import re @@ -354,7 +3...
diff --git a/tornado/test/testing_test.py b/tornado/test/testing_test.py --- a/tornado/test/testing_test.py +++ b/tornado/test/testing_test.py @@ -2,9 +2,12 @@ from __future__ import absolute_import, division, print_function, with_statement -from tornado import gen +from tornado import gen, ioloop from tornado.te...
null
null
namanjain12/tornado_final:cab39beba263e68647d54d68d18cab4f52c7a802
true
null
1
53
null
1,264
0
0.75
1
0.6375
1
0.387333
81.08075
6,119
swe_smith::train::40909
swe_smith
train
40,909
scanny__python-pptx.278b47b1.func_basic__ceo418bh
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
TickLabels offset setter incorrectly validates axis type and modifies values #### Description The TickLabels offset property setter has incorrect logic for validating axis types and modifying offset values. When setting the offset on category axis tick labels, it raises a ValueError claiming only category axes have o...
diff --git a/src/pptx/chart/axis.py b/src/pptx/chart/axis.py index a9b8770..c7c489c 100644 --- a/src/pptx/chart/axis.py +++ b/src/pptx/chart/axis.py @@ -409,13 +409,13 @@ class TickLabels(object): @offset.setter def offset(self, value): - if self._element.tag != qn("c:catAx"): + if self._eleme...
["tests/chart/test_axis.py::DescribeTickLabels::it_can_change_its_offset[offset_set_fixture0]", "tests/chart/test_axis.py::DescribeTickLabels::it_can_change_its_offset[offset_set_fixture1]"]
["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
8
2
1,451
0
0.6
1
0.75
1
0.2685
81.0805
6,120
swe_smith::train::28358
swe_smith
train
28,358
encode__starlette.db5063c2.combine_file__q8f5zyjp
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Exception handler lookup returns exception instead of None when no handler found #### Description When no exception handler is found for a given exception, the `_lookup_exception_handler` function returns the exception itself instead of `None`. This breaks the expected behavior where `None` should be returned when no...
diff --git a/starlette/_exception_handler.py b/starlette/_exception_handler.py index baf6e2f..57421c1 100644 --- a/starlette/_exception_handler.py +++ b/starlette/_exception_handler.py @@ -14,10 +14,12 @@ StatusHandlers = typing.Dict[int, ExceptionHandler] def _lookup_exception_handler(exc_handlers: ExceptionHandl...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/test_base.py::test_custom_middleware[trio]", "tests/middleware/test_base.py::test_fully_evaluated_response[trio]", "tests/test_applications.py::test_400[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-CustomMiddlewareWithoutBaseHTTPMiddleware]", "tests/middleware/test_base.py::test_run_background_tasks_...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
18
66
1,251
0
0.6
1
0.75
1
0.2685
81.0805
6,121
swe_smith::train::6507
swe_smith
train
6,507
mahmoud__boltons.3bfcfdd0.func_pm_remove_wrapper__js4zaaco
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
[Bug]: namedtuple objects cannot be pickled ### Description I've discovered that namedtuple objects created with boltons.namedutils.namedtuple cannot be pickled. This is causing issues in my application where I need to serialize these objects. ### Code for reproduction ```python from boltons.namedutils import named...
diff --git a/boltons/namedutils.py b/boltons/namedutils.py index 0311f81..85c94b5 100644 --- a/boltons/namedutils.py +++ b/boltons/namedutils.py @@ -206,19 +206,8 @@ def namedtuple(typename, field_names, verbose=False, rename=False): raise SyntaxError(e.msg + ':\n' + class_definition) result = namespace[t...
["tests/test_namedutils.py::test_namedtuple_pickle"]
["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
11
1
1,390
0
0.6
1
0.75
1
0.268333
81.08
6,122
swe_smith::train::22448
swe_smith
train
22,448
tweepy__tweepy.91a41c6e.func_pm_class_rm_funcs__ornkexcr
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
AttributeError in Cursor Iteration Description: It seems there's an issue with the `Cursor` class when iterating over items. After the recent changes, attempting to iterate over items using `Cursor` results in an `AttributeError`. This is affecting the retrieval of items from various endpoints like `get_friend_ids`, `...
diff --git a/tweepy/cursor.py b/tweepy/cursor.py index 1db73e1..5c5e512 100644 --- a/tweepy/cursor.py +++ b/tweepy/cursor.py @@ -271,13 +271,6 @@ class NextIterator(BaseIterator): class ItemIterator(BaseIterator): - def __init__(self, page_iterator): - self.page_iterator = page_iterator - self.lim...
["tests/test_cursors.py::TweepyCursorTests::testcursorcursoritems", "tests/test_cursors.py::TweepyCursorTests::testcursornext", "tests/test_cursors.py::TweepyCursorTests::testidcursoritems"]
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
9
3
1,430
0
0.6
1
0.75
1
0.268333
81.08
6,123
swe_smith::train::20876
swe_smith
train
20,876
tobymao__sqlglot.036601ba.func_pm_remove_assign__ckkfaop4
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
NameError in qualify_columns optimizer after recent changes #### Description The qualify_columns optimizer is throwing NameError exceptions for undefined variables after some recent changes. Multiple variables that were previously defined are now causing runtime errors. #### Steps/Code to Reproduce ```python import...
diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py index 3ab987d..b44bbf9 100644 --- a/sqlglot/optimizer/qualify_columns.py +++ b/sqlglot/optimizer/qualify_columns.py @@ -270,7 +270,6 @@ def _expand_alias_refs( SELECT y.foo AS bar, bar * 2 AS baz FROM y => SELECT y.f...
["tests/test_optimizer.py::TestOptimizer::test_canonicalize", "tests/test_optimizer.py::TestOptimizer::test_expand_alias_refs", "tests/test_optimizer.py::TestOptimizer::test_file_schema", "tests/test_optimizer.py::TestOptimizer::test_lateral_annotation", "tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", ...
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
14
18
1,330
0
0.6
1
0.75
1
0.268333
81.08
6,124
swe_smith::train::52415
swe_smith
train
52,415
pydicom__pydicom.7d361b3d.func_pm_ctrl_shuffle__darnfwt3
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
VR length validation not working - values exceeding maximum length are accepted #### Description When creating DataElements with values that exceed the maximum allowed length for their VR (Value Representation), the validation is not working properly. Values that should trigger warnings or errors are being accepted w...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..46fe62a 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -99,6 +99,15 @@ def validate_type( def validate_vr_length(vr: str, value: Any) -> tuple[bool, str]: + max_length = MAX_VALUE_LEN.get(vr, 0) + return True...
["tests/test_dataelem.py::TestDataElementValidation::test_maxvalue_exceeded[AE-17]", "tests/test_dataelem.py::TestDataElementValidation::test_maxvalue_exceeded[CS-17]", "tests/test_dataelem.py::TestDataElementValidation::test_maxvalue_exceeded[DS-27]", "tests/test_dataelem.py::TestDataElementValidation::test_maxvalue_e...
["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
19
14
1,230
0
0.6
1
0.75
1
0.268333
81.08
6,125
swe_smith::train::27775
swe_smith
train
27,775
arrow-py__arrow.1d70d009.func_pm_remove_cond__ajyfmxzk
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
NameError in dehumanize method when processing time strings #### Description The `dehumanize` method is throwing a `NameError: name 'strings_to_search' is not defined` when trying to parse relative time strings. #### Steps/Code to Reproduce ```python import arrow arw = arrow.Arrow(2000, 6, 18, 5, 55, 0) second_ago...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..38c0ada 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -1366,11 +1366,6 @@ class Arrow: # Search input string for each time unit within locale for unit, unit_object in locale_obj.timeframes.items(): - # Need to check the typ...
["tests/test_arrow.py::TestArrowDehumanize::test_now", "tests/test_arrow.py::TestArrowDehumanize::test_seconds", "tests/test_arrow.py::TestArrowDehumanize::test_minute", "tests/test_arrow.py::TestArrowDehumanize::test_minutes", "tests/test_arrow.py::TestArrowDehumanize::test_hour", "tests/test_arrow.py::TestArrowDehuma...
["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
30
21
1,010
0
0.6
1
0.75
1
0.268333
81.08
6,126
swe_smith::train::43671
swe_smith
train
43,671
cloudpipe__cloudpickle.6220b0ce.lm_rewrite__q1i4f88l
swesmith/cloudpipe__cloudpickle.6220b0ce
cloudpipe/cloudpickle
python
null
# Recursion detection in cloudpickle.dump() not working properly #### Description The recursion detection in cloudpickle's `dump()` method is not working correctly. When trying to pickle objects that cause recursion, cloudpickle is attempting to use a fallback mechanism instead of properly raising a `PicklingError` wi...
diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py index 8c50ba1..f977962 100644 --- a/cloudpickle/cloudpickle.py +++ b/cloudpickle/cloudpickle.py @@ -1291,15 +1291,17 @@ class Pickler(pickle.Pickler): return code, base_globals, None, None, closure def dump(self, obj): + """Writ...
["tests/cloudpickle_test.py::CloudPickleTest::test_recursion_during_pickling", "tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_recursion_during_pickling"]
["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "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/c...
jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce
true
null
1
12
2
1,369
0
0.6
1
0.75
1
0.268167
81.0795
6,127
swe_smith::train::50844
swe_smith
train
50,844
python-hyper__h11.bed0dd4a.func_basic__kns92cdj
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
LocalProtocolError re-raising broken - raises RuntimeError instead of RemoteProtocolError When a LocalProtocolError is caught and re-raised as a RemoteProtocolError using the `_reraise_as_remote_protocol_error()` method, it now raises a RuntimeError with message "Re-raised as RuntimeError" instead of the expected Remo...
diff --git a/h11/_util.py b/h11/_util.py index 6718445..1749020 100644 --- a/h11/_util.py +++ b/h11/_util.py @@ -58,23 +58,9 @@ class ProtocolError(Exception): # remote errors. class LocalProtocolError(ProtocolError): def _reraise_as_remote_protocol_error(self) -> NoReturn: - # After catching a LocalPro...
["h11/tests/test_connection.py::test_close_simple", "h11/tests/test_connection.py::test_close_different_states", "h11/tests/test_connection.py::test_errors", "h11/tests/test_connection.py::test_empty_request", "h11/tests/test_connection.py::test_empty_response", "h11/tests/test_connection.py::test_early_detection_of_in...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_conn...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
18
10
1,249
0
0.6
1
0.75
1
0.268167
81.0795
6,128
swe_smith::train::26313
swe_smith
train
26,313
pylint-dev__astroid.b114f6b5.func_pm_ctrl_shuffle__z95yfvkw
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
isinstance inference broken after recent changes #### Description The `isinstance` builtin inference is completely broken and returns `UnboundLocalError` instead of proper boolean results. #### Steps/Code to Reproduce ```python import astroid # Simple isinstance check that should return True code = "isinstance(1, ...
diff --git a/astroid/brain/brain_builtin_inference.py b/astroid/brain/brain_builtin_inference.py index a56b152..10c461b 100644 --- a/astroid/brain/brain_builtin_inference.py +++ b/astroid/brain/brain_builtin_inference.py @@ -791,21 +791,10 @@ def infer_issubclass(callnode, context: InferenceContext | None = None): def...
["tests/brain/test_brain.py::TestIsinstanceInference::test_type_type", "tests/brain/test_brain.py::TestIsinstanceInference::test_object_type", "tests/brain/test_brain.py::TestIsinstanceInference::test_type_object", "tests/brain/test_brain.py::TestIsinstanceInference::test_isinstance_int_true", "tests/brain/test_brain.p...
["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
25
23
1,109
0
0.6
1
0.75
1
0.268167
81.0795
6,129
swe_smith::train::42563
swe_smith
train
42,563
python-jsonschema__jsonschema.93e0caa5.func_basic__a4ng94in
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
best_match function returns None instead of most relevant error #### Description The `best_match` function in `jsonschema.exceptions` is returning `None` instead of the most relevant validation error when processing schema validation failures. #### Steps/Code to Reproduce ```python import jsonschema from jsonschema...
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 3dcd296..1558690 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -470,15 +470,13 @@ def best_match(errors, key=relevance): set of inputs from version to version if better heuristics are added. """ - best = ...
["jsonschema/tests/test_exceptions.py::TestBestMatch::test_anyOf_traversal_for_non_type_matching_sibling_errors", "jsonschema/tests/test_exceptions.py::TestBestMatch::test_anyOf_traversal_for_single_equally_relevant_error", "jsonschema/tests/test_exceptions.py::TestBestMatch::test_anyOf_traversal_for_single_sibling_err...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
10
18
1,409
0
0.6
1
0.75
1
0.268167
81.0795
6,130
swe_smith::train::2553
swe_smith
train
2,553
pdfminer__pdfminer.six.1a8bd2f7.func_pm_remove_cond__szs6jwk5
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFPageInterpreter fails to process resources when resources dict is empty #### Description When processing PDF pages with empty resource dictionaries, the PDFPageInterpreter crashes with an IndexError. This happens because the resource processing logic was removed but the code still tries to access resource elements...
diff --git a/pdfminer/pdfinterp.py b/pdfminer/pdfinterp.py index ae1c46a..8d2af61 100644 --- a/pdfminer/pdfinterp.py +++ b/pdfminer/pdfinterp.py @@ -377,41 +377,15 @@ class PDFPageInterpreter: self.fontmap: Dict[object, PDFFont] = {} self.xobjmap = {} self.csmap: Dict[str, PDFColorSpace] = PR...
["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cid_range", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cmap_bytes", "tests/test_highlevel_extracttext.py::TestExtractText::test_iss...
["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
26
22
1,089
0
0.6
1
0.75
1
0.268167
81.0795
6,131
swe_smith::train::31616
swe_smith
train
31,616
benoitc__gunicorn.bacbf8aa.func_pm_ctrl_shuffle__fo7e8sey
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
validate_statsd_address function broken after refactoring #### Description The `validate_statsd_address` function in `gunicorn/config.py` appears to have been incorrectly refactored, causing multiple issues with statsd configuration validation. #### Steps/Code to Reproduce ```python from gunicorn import config # T...
diff --git a/gunicorn/config.py b/gunicorn/config.py index 402a26b..faa682a 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -512,25 +512,24 @@ def validate_chdir(val): def validate_statsd_address(val): - val = validate_string(val) - if val is None: - return None - - # As of major releas...
["tests/test_config.py::test_defaults", "tests/test_config.py::test_app_config", "tests/test_config.py::test_statsd_host", "tests/test_config.py::test_statsd_host_with_unix_as_hostname", "tests/test_config.py::test_statsd_changes_logger", "tests/test_config.py::test_always_use_configured_logger", "tests/test_statsd.py:...
["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
21
7
1,189
0
0.6
1
0.75
1
0.268167
81.0795
6,132
swe_smith::train::14188
swe_smith
train
14,188
python-openxml__python-docx.0cf6d71f.func_pm_ctrl_shuffle__2p89zv85
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
JPEG image parsing broken when loading certain files I'm trying to load JPEG images in my code and I'm running into an issue where some JPEG files are not being processed correctly. **Steps to reproduce:** 1. Try to load a JPEG image file: ```python from docx import Document from docx.shared import Inches document...
diff --git a/src/docx/image/jpeg.py b/src/docx/image/jpeg.py index b0114a9..7ce4d2b 100644 --- a/src/docx/image/jpeg.py +++ b/src/docx/image/jpeg.py @@ -90,16 +90,15 @@ class _JfifMarkers: @classmethod def from_stream(cls, stream): - """Return a |_JfifMarkers| instance containing a |_JfifMarker| subc...
["tests/image/test_image.py::DescribeImage::it_correctly_characterizes_known_images[2]", "tests/image/test_image.py::DescribeImage::it_correctly_characterizes_known_images[3]", "tests/image/test_image.py::Describe_ImageHeaderFactory::it_constructs_the_right_class_for_a_given_image_stream[call_fixture1]", "tests/image/t...
["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
5
1,429
0
0.6
1
0.75
1
0.268167
81.0795
6,133
swe_smith::train::58933
swe_smith
train
58,933
bytedance__sonic.de4f017f.func_pm_op_swap__y6iy2n99
swesmith/bytedance__sonic.de4f017f
bytedance/sonic
go
null
Radix quicksort algorithm broken causing index out of range panics #### Description The radix quicksort implementation in the encoder is causing runtime panics with "index out of range" errors when processing maps. The sorting algorithm appears to have incorrect loop conditions and comparison operators that lead to a...
diff --git a/internal/encoder/alg/sort.go b/internal/encoder/alg/sort.go index 5bb0f901..6d009ba2 100644 --- a/internal/encoder/alg/sort.go +++ b/internal/encoder/alg/sort.go @@ -19,7 +19,7 @@ package alg // Algorithm 3-way Radix Quicksort, d means the radix. // Reference: https://algs4.cs.princeton.edu/51radix/Quick...
["TestCompatEncoderStd", "TestSortNodeTwitter", "TestTextMarshalTextKey_SortKeys", "TestEncoderMemoryCorruption"]
["TestValid", "TestIdent", "TestCompatUnmarshalStd", "TestMarshalerError", "TestDecoder_OptionCaseSensitive", "TestDecoder_MapWithIndirectElement", "TestDecoder_OptionCaseSensitiveForManyKeys", "TestSkipMismatchTypeAmd64Error", "TestSkipMismatchTypeAmd64Error/short_array", "TestSkipMismatchTypeAmd64Error/int_", "TestSk...
jyangballin/swesmith.x86_64.bytedance_1776_sonic.de4f017f
true
null
1
18
4
1,248
0
0.6
1
0.75
1
0.268
81.079
6,134
swe_smith::train::32689
swe_smith
train
32,689
pydantic__pydantic.acb0f10f.func_pm_remove_cond__ihhxul3m
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Config validation broken when both validate_by_alias and validate_by_name are False #### Description When creating a model with `validate_by_alias=False` and `validate_by_name=False` in the config, no error is raised even though this configuration should be invalid. Additionally, the `populate_by_name` config option ...
diff --git a/pydantic/_internal/_config.py b/pydantic/_internal/_config.py index 928a86c..f179aff 100644 --- a/pydantic/_internal/_config.py +++ b/pydantic/_internal/_config.py @@ -175,19 +175,6 @@ class ConfigWrapper: stacklevel=2, ) - if (populate_by_name := config.get('populate...
["tests/test_config.py::test_populate_by_name_still_effective", "tests/test_config.py::test_user_error_on_alias_settings"]
["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
14
2
1,328
0
0.6
1
0.75
1
0.268
81.079
6,135
swe_smith::train::42339
swe_smith
train
42,339
r1chardj0n3s__parse.30da9e4f.combine_file__tmi4n65a
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
Parser.findall() returns None instead of iterator when endpos is None #### Description When calling `findall()` on a Parser instance without specifying an `endpos` parameter, the method returns `None` instead of the expected `ResultIterator`. This breaks code that expects to iterate over the results. #### Steps/Code...
diff --git a/parse.py b/parse.py index 80242e1..1f792e7 100644 --- a/parse.py +++ b/parse.py @@ -536,9 +536,9 @@ class Parser(object): found. """ if endpos is None: - endpos = len(string) + pos = len(string) # Subtle bug introduced by altering 'pos' instead of 'endpos' ...
["README.rst::README.rst", "tests/test_bugs.py::test_named_date_issue7", "tests/test_bugs.py::test_dotted_type_conversion_pull_8", "tests/test_bugs.py::test_user_type_with_group_count_issue60", "tests/test_findall.py::test_findall", "tests/test_findall.py::test_no_evaluate_result", "tests/test_findall.py::test_case_sen...
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "tests/test_bugs.py::test_pm_overflow_issue16", "tests/test_bugs.py::test_pm_handling_issue57", "tests/test_bugs.py::test_unmatched_brace_doesnt_match", "tests/test_bugs.py::test_pickling_bug_110", "tests/test_bugs.py::test_unused_centered_...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
20
38
1,208
0
0.6
1
0.75
1
0.268
81.079
6,136
swe_smith::train::24086
swe_smith
train
24,086
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__tzd1o7ok
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
JSOC fetch method fails with empty response due to unreachable code #### Description When calling `fetch()` on an empty JSOC response, the method raises a `TypeError: 'NoneType' object is not iterable` instead of returning an empty `parfive.Results()` object as expected. #### Steps/Code to Reproduce ```python from ...
diff --git a/sunpy/net/jsoc/jsoc.py b/sunpy/net/jsoc/jsoc.py index f5506de..1752b5b 100644 --- a/sunpy/net/jsoc/jsoc.py +++ b/sunpy/net/jsoc/jsoc.py @@ -371,6 +371,21 @@ class JSOCClient(BaseClient): @convert_row_to_table def fetch(self, jsoc_response, path=None, progress=True, overwrite=False, ...
["sunpy/net/jsoc/tests/test_jsoc.py::test_row_and_warning", "sunpy/net/jsoc/tests/test_jsoc.py::test_empty_response_fetch"]
["sunpy/net/jsoc/tests/test_jsoc.py::test_jsocresponse_single", "sunpy/net/jsoc/tests/test_jsoc.py::test_empty_jsoc_response", "sunpy/net/jsoc/tests/test_jsoc.py::test_show", "sunpy/net/jsoc/tests/test_jsoc.py::test_can_handle_query_no_series", "sunpy/net/jsoc/tests/test_jsoc.py::test_jsoc_attrs"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
39
2
828
0
0.6
1
0.75
1
0.268
81.079
6,137
swe_smith::train::23761
swe_smith
train
23,761
rustedpy__result.0b855e1e.func_basic__9e86a5lo
swesmith/rustedpy__result.0b855e1e
rustedpy/result
python
null
# as_async_result decorator inverts Ok and Err behavior ## Description The `as_async_result` decorator is incorrectly handling return values and exceptions. When using this decorator on an async function, the behavior is completely inverted from what's expected: 1. Regular return values are being wrapped in `Err()` ...
diff --git a/src/result/result.py b/src/result/result.py index 8551239..80219e7 100644 --- a/src/result/result.py +++ b/src/result/result.py @@ -504,8 +504,8 @@ def as_async_result( Regular return values are turned into ``Ok(return_value)``. Raised exceptions of the specified exception type(s) are turned into...
["tests/test_result.py::test_as_async_result", "tests/type_checking/test_result.yml::failure_lash", "tests/type_checking/test_result.yml::covariance", "tests/type_checking/test_result.yml::map_ok_err", "tests/type_checking/test_result.yml::map_result"]
["tests/test_result.py::test_ok_factories", "tests/test_result.py::test_err_factories", "tests/test_result.py::test_eq", "tests/test_result.py::test_hash", "tests/test_result.py::test_repr", "tests/test_result.py::test_ok_value", "tests/test_result.py::test_err_value", "tests/test_result.py::test_ok", "tests/test_resul...
jyangballin/swesmith.x86_64.rustedpy_1776_result.0b855e1e
true
null
1
8
5
1,447
0
0.6
1
0.75
1
0.267833
81.0785
6,138
swe_smith::train::47381
swe_smith
train
47,381
sqlfluff__sqlfluff.50a1c4b6.combine_file__amgxm20o
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Linter silently swallows ValueError exceptions during file processing #### Description When linting files, ValueError exceptions are now being silently ignored instead of being properly handled. This causes the linter to fail silently without any indication that an error occurred during processing. #### Steps/Code t...
diff --git a/src/sqlfluff/core/linter/runner.py b/src/sqlfluff/core/linter/runner.py index 3ebe1db..b43baa6 100644 --- a/src/sqlfluff/core/linter/runner.py +++ b/src/sqlfluff/core/linter/runner.py @@ -94,14 +94,14 @@ class BaseRunner(ABC): @staticmethod def _handle_lint_path_exception(fname: Optional[str], ...
["test/core/linter/linter_test.py::test__linter__linting_unexpected_error_handled_gracefully", "test/core/linter/linter_test.py::test_delayed_exception"]
["test/core/linter/discovery_test.py::test__linter__path_from_paths__dir", "test/core/linter/discovery_test.py::test__linter__path_from_paths__default", "test/core/linter/discovery_test.py::test__linter__path_from_paths__exts", "test/core/linter/discovery_test.py::test__linter__path_from_paths__file", "test/core/linter...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
19
2
1,227
0
0.6
1
0.75
1
0.267833
81.0785
6,139
swe_smith::train::24823
swe_smith
train
24,823
marshmallow-code__marshmallow.9716fc62.func_pm_class_rm_funcs__gmbwc582
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
TimeDelta field deserialization broken - returns string instead of timedelta object #### Description The TimeDelta field is not properly deserializing values and returns the input string instead of a timedelta object. Additionally, invalid inputs that should raise ValidationError are being accepted. #### Steps/Code ...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..3479764 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -1524,20 +1524,6 @@ class TimeDelta(Field): assert self.serialization_type is float return value.total_seconds() / base_unit.total_seconds...
["tests/test_deserialization.py::TestFieldDeserialization::test_timedelta_field_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::test_invalid_timedelta_field_deserialization[]", "tests/test_deserialization.py::TestFieldDeserialization::test_invalid_timedelta_field_deserialization[badvalue]", ...
["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
14
5
1,327
0
0.6
1
0.75
1
0.267833
81.0785
6,140
swe_smith::train::3548
swe_smith
train
3,548
pygments__pygments.27649ebb.combine_file__x4k39xqz
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
SwiftLexer class inheritance broken #### Description The SwiftLexer class is not properly inheriting from RegexLexer, causing multiple failures when trying to use Swift syntax highlighting. The lexer appears to be missing required methods and attributes that should be inherited from the base RegexLexer class. #### S...
diff --git a/pygments/lexers/objective.py b/pygments/lexers/objective.py index b37a9d4..ca80a1a 100644 --- a/pygments/lexers/objective.py +++ b/pygments/lexers/objective.py @@ -165,15 +165,15 @@ def objective(baselexer): } def analyse_text(text): - if _oc_keywords.search(text): - ...
["tests/test_cmdline.py::test_C_opt", "tests/test_basic_api.py::test_lexer_classes[SwiftLexer]", "tests/test_basic_api.py::test_lexer_options[SwiftLexer]", "tests/test_basic_api.py::test_random_input[SwiftLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/examplefiles/swift/test.swift::", "tests/examplefiles/o...
["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
23
21
1,147
0
0.6
1
0.75
1
0.267833
81.0785
6,141
r2e_gym::train::85
r2e_gym
train
85
orange3__1725baa9d30f2d91485462e2c4a458dc4cd99931
orange3
biolab/orange3
python
1725baa9d30f2d91485462e2c4a458dc4cd99931
**Title:** PCA Widget Does Not Preserve Table Subclasses in Output **Description:** When providing an input table that is an instance of a subclass of `Table` (e.g., `TableSub`), the PCA widget fails to maintain the subclass in its output tables. Instead, it returns instances of the base `Table` class. This behavior i...
diff --git a/Orange/widgets/unsupervised/owpca.py b/Orange/widgets/unsupervised/owpca.py --- a/Orange/widgets/unsupervised/owpca.py +++ b/Orange/widgets/unsupervised/owpca.py @@ -5,13 +5,15 @@ from AnyQt.QtCore import Qt from orangewidget.report import bool_str +from orangewidget.settings import Setting from Ora...
diff --git a/Orange/widgets/unsupervised/tests/test_owpca.py b/Orange/widgets/unsupervised/tests/test_owpca.py --- a/Orange/widgets/unsupervised/tests/test_owpca.py +++ b/Orange/widgets/unsupervised/tests/test_owpca.py @@ -4,6 +4,8 @@ from unittest.mock import patch, Mock import numpy as np +from sklearn.utils impo...
null
null
namanjain12/orange3_final:1725baa9d30f2d91485462e2c4a458dc4cd99931
true
null
1
37
null
1,579
0
0.75
1
0.6375
1
0.3865
81.07825
6,142
swe_smith::train::28806
swe_smith
train
28,806
encode__starlette.db5063c2.func_pm_ctrl_shuffle__2iglc1kl
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Config with env_prefix doesn't check file values when environment variable is missing #### Description When using `Config` with an `env_prefix`, the configuration lookup doesn't properly fall back to checking file values if the prefixed environment variable is not found. The config only checks the environment with th...
diff --git a/starlette/config.py b/starlette/config.py index ca15c56..ec1448e 100644 --- a/starlette/config.py +++ b/starlette/config.py @@ -95,17 +95,16 @@ class Config: cast: typing.Callable[[typing.Any], typing.Any] | None = None, default: typing.Any = undefined, ) -> typing.Any: - key ...
["tests/test_config.py::test_config", "tests/test_config.py::test_config_with_env_prefix"]
["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
9
2
1,426
0
0.6
1
0.75
1
0.267667
81.078
6,143
swe_smith::train::43417
swe_smith
train
43,417
theskumar__python-dotenv.2b8635b7.func_pm_remove_cond__ko6c92fn
swesmith/theskumar__python-dotenv.2b8635b7
theskumar/python-dotenv
python
null
# find_dotenv function broken in latest version I found a bug in the latest version of python-dotenv. The `find_dotenv` function is completely broken and causes several issues. ## Description When trying to use `find_dotenv()`, I get the following error: ``` NameError: name 'path' is not defined ``` This happens b...
diff --git a/src/dotenv/main.py b/src/dotenv/main.py index 052de05..076e22c 100644 --- a/src/dotenv/main.py +++ b/src/dotenv/main.py @@ -291,33 +291,13 @@ def find_dotenv( return False return not hasattr(main, '__file__') - if usecwd or _is_interactive() or getattr(sys, 'frozen', False): - ...
["tests/test_ipython.py::test_ipython_existing_variable_no_override", "tests/test_ipython.py::test_ipython_existing_variable_override", "tests/test_ipython.py::test_ipython_new_variable", "tests/test_main.py::test_find_dotenv_no_file_raise", "tests/test_main.py::test_find_dotenv_no_file_no_raise", "tests/test_main.py::...
["tests/test_cli.py::test_list[shell-x='a\\nb\\nc'-x='a\\nb\\nc'\\n]", "tests/test_cli.py::test_list_non_existent_file", "tests/test_cli.py::test_list_not_a_file", "tests/test_cli.py::test_list_no_file", "tests/test_cli.py::test_get_existing_value", "tests/test_cli.py::test_get_non_existent_value", "tests/test_cli.py::...
jyangballin/swesmith.x86_64.theskumar_1776_python-dotenv.2b8635b7
true
null
1
20
9
1,206
0
0.6
1
0.75
1
0.267667
81.078
6,144
swe_smith::train::22116
swe_smith
train
22,116
jawah__charset_normalizer.1fdd6463.func_basic__psh671vk
swesmith/jawah__charset_normalizer.1fdd6463
jawah/charset_normalizer
python
null
CharsetMatches indexing broken after recent changes #### Description The `CharsetMatches` class indexing behavior has been broken. When trying to access charset matches by index or by encoding name, the results are incorrect or missing. #### Steps/Code to Reproduce ```python from charset_normalizer import from_byte...
diff --git a/charset_normalizer/models.py b/charset_normalizer/models.py index 09492a9..8ee21ff 100644 --- a/charset_normalizer/models.py +++ b/charset_normalizer/models.py @@ -259,13 +259,13 @@ class CharsetMatches: Raise KeyError upon invalid index or encoding not present in results. """ if...
["tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xfe\\xff-utf_16]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\x841\\x953-gb18030]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xff\\xfe\\x00\\x00-utf_32]", "tests/test_base_detection.py::test_content_with_bom_or_s...
["tests/test_base_detection.py::test_empty", "tests/test_base_detection.py::test_bool_matches", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xef\\xbb\\xbf-utf_8]", "tests/test_base_detection.py::test_content_with_bom_or_sig[\\xef\\xbb\\xbf\\xe6\\x88\\x91\\xe6\\xb2\\xa1\\xe6\\x9c\\x89\\xe5\\x9f\\x8b\\...
jyangballin/swesmith.x86_64.jawah_1776_charset_normalizer.1fdd6463
true
null
1
10
6
1,406
0
0.6
1
0.75
1
0.267667
81.078
6,145
swe_smith::train::2247
swe_smith
train
2,247
pdfminer__pdfminer.six.1a8bd2f7.func_basic__ooxuk08s
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
pdf2txt.py returns None instead of parsed arguments #### Description The `parse_args` function in `tools/pdf2txt.py` is returning `None` instead of the parsed arguments object, causing the tool to fail completely. #### Steps/Code to Reproduce ```python from tools.pdf2txt import parse_args # Try to parse some basic...
diff --git a/tools/pdf2txt.py b/tools/pdf2txt.py index 3341690..b8f5f9b 100755 --- a/tools/pdf2txt.py +++ b/tools/pdf2txt.py @@ -284,32 +284,31 @@ def create_parser() -> argparse.ArgumentParser: def parse_args(args: Optional[List[str]]) -> argparse.Namespace: parsed_args = create_parser().parse_args(args=args) ...
["tests/test_tools_pdf2txt.py::TestPdf2Txt::test_jo", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_simple1", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_simple2", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_simple3", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_sample_one_byte_identity_encode", "tests/tes...
["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
29
35
1,026
0
0.6
1
0.75
1
0.267667
81.078
6,146
swe_smith::train::18202
swe_smith
train
18,202
msiemens__tinydb.10644a0e.combine_file__u5cpp3ld
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
JSONStorage fails to create parent directories when they don't exist When using JSONStorage with a file path that includes non-existent parent directories, the database creation fails with a FileNotFoundError. The `touch` function in storages.py has a logic error where it only creates directories when they already exi...
diff --git a/tinydb/storages.py b/tinydb/storages.py index d5a2db7..4108f51 100644 --- a/tinydb/storages.py +++ b/tinydb/storages.py @@ -16,20 +16,20 @@ __all__ = ('Storage', 'JSONStorage', 'MemoryStorage') def touch(path: str, create_dirs: bool): """ Create a file if it doesn't exist yet. - + :para...
["tests/test_middlewares.py::test_caching_json_write", "tests/test_storages.py::test_json_kwargs", "tests/test_storages.py::test_create_dirs", "tests/test_storages.py::test_encoding", "tests/test_tinydb.py::test_unique_ids", "tests/test_tinydb.py::test_lastid_after_open", "tests/test_tinydb.py::test_insert_invalid_dict...
["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
24
8
1,126
0
0.6
1
0.75
1
0.267667
81.078
6,147
swe_smith::train::13709
swe_smith
train
13,709
python-openxml__python-docx.0cf6d71f.func_basic__kroszka6
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Table cell navigation returns wrong row when accessing row above #### Description When trying to access the row above a table cell using the `_tr_above` property, the method returns incorrect results or raises unexpected errors. The navigation logic appears to be looking in the wrong direction. #### Steps/Code to Re...
diff --git a/src/docx/oxml/table.py b/src/docx/oxml/table.py index e38d585..f9c0924 100644 --- a/src/docx/oxml/table.py +++ b/src/docx/oxml/table.py @@ -759,10 +759,10 @@ class CT_Tc(BaseOxmlElement): Raises |ValueError| if called on a cell in the top-most row. """ - tr_aboves = self.xpath("....
["tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[2-1-1-top-0]", "tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[4-2-1-top-1]", "tests/oxml/test_table.py::DescribeCT_Tc::it_raises_on_tr_above[0-0-0]", "tests/oxml/test_table.py::DescribeCT_Tc::it_raises_on_tr_above[4-0-0]", "...
["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
8
6
1,445
0
0.6
1
0.75
1
0.2675
81.0775
6,148
swe_smith::train::43778
swe_smith
train
43,778
pydata__patsy.a5d16484.combine_file__bmi45sib
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
DesignMatrix creation fails with dimension validation error #### Description When creating DesignMatrix objects, the dimension validation logic appears to be inverted, causing failures when working with valid 2D arrays. #### Steps/Code to Reproduce ```python import numpy as np from patsy import DesignMatrix, Design...
diff --git a/patsy/design_info.py b/patsy/design_info.py index d94b97a..bcc1832 100644 --- a/patsy/design_info.py +++ b/patsy/design_info.py @@ -426,7 +426,7 @@ class DesignInfo(object): @property def term_names(self): "A list of terms, in order." - return list(self.term_name_slices) + ...
["patsy/design_info.py::test_DesignInfo", "patsy/design_info.py::test_DesignInfo_from_array", "patsy/design_info.py::test_design_matrix", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths", "patsy/test_build....
["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
32
35
965
0
0.6
1
0.75
1
0.2675
81.0775
6,149
swe_smith::train::36554
swe_smith
train
36,554
lincolnloop__python-qrcode.456b01d4.combine_module__tcjh541z
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
QR code generation fails with AttributeError when using styled images #### Description When trying to generate QR codes with styled images or custom module drawers, the code fails with `AttributeError: 'NoneType' object has no attribute` errors. This affects both PIL and SVG image factories when using any styling opt...
diff --git a/qrcode/image/styles/moduledrawers/base.py b/qrcode/image/styles/moduledrawers/base.py index 154d2cf..34e9e80 100644 --- a/qrcode/image/styles/moduledrawers/base.py +++ b/qrcode/image/styles/moduledrawers/base.py @@ -27,7 +27,7 @@ class QRModuleDrawer(abc.ABC): pass def initialize(self, img:...
["qrcode/tests/test_qrcode_pil.py::test_render_styled_Image", "qrcode/tests/test_qrcode_pil.py::test_render_styled_with_embeded_image", "qrcode/tests/test_qrcode_pil.py::test_render_styled_with_embeded_image_path", "qrcode/tests/test_qrcode_pil.py::test_render_styled_with_drawer[CircleModuleDrawer]", "qrcode/tests/test...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
3
24
25
1,125
0
0.6
1
0.75
1
0.2675
81.0775
6,150
r2e_gym::train::6622
r2e_gym
train
6,622
pillow__6663ed929b41c3c89ec1469b78fbf6c36af487cc
pillow
python-pillow/pillow
python
6663ed929b41c3c89ec1469b78fbf6c36af487cc
**Analysis:** - **Key Parts:** - **Commit Message:** "If first frame has transparency for RGB_ALWAYS, use RGBA." - **Test Result on Old Commit:** - One failed test: `test_strategy` with `AssertionError: assert 'RGB' == 'RGBA'`. - **Test Changes:** - Added tests to check if images are loaded as "RGB" or "...
diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py --- a/src/PIL/GifImagePlugin.py +++ b/src/PIL/GifImagePlugin.py @@ -299,11 +299,13 @@ self.im.paste(self.dispose, self.dispose_extent) self._frame_palette = palette or self.global_palette + self._frame_transparency = frame...
diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -84,17 +84,24 @@ def test_strategy(): + with Image.open("Tests/images/iss634.gif") as im: + expected_rgb_always = im.convert("RGB") + with Image.open("Tests/images/chi.gif") as i...
null
null
namanjain12/pillow_final:6663ed929b41c3c89ec1469b78fbf6c36af487cc
true
null
1
24
null
1,837
0
0.75
1
0.6375
1
0.386167
81.07725
6,151
swe_smith::train::18682
swe_smith
train
18,682
seperman__deepdiff.ed252022.combine_file__re490iz4
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
JSON serialization broken with swapped parameters #### Description The `to_json` method is not working correctly - it appears the parameters are getting mixed up somehow. When trying to serialize DeepDiff objects to JSON, I'm getting unexpected behavior. #### Steps/Code to Reproduce ```python from deepdiff import D...
diff --git a/deepdiff/serialization.py b/deepdiff/serialization.py index aa56399..d845bb4 100644 --- a/deepdiff/serialization.py +++ b/deepdiff/serialization.py @@ -191,10 +191,12 @@ class SerializationMixin: '{"type_changes": {"root": {"old_type": "A", "new_type": "B", "old_value": "obj A", "new_value": "...
["tests/test_command.py::TestCommands::test_diff_command[t1.toml-t2.toml-10.0.0.2-0]", "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_...
["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
25
21
1,104
0
0.6
1
0.75
1
0.267333
81.077
6,152
swe_smith::train::44011
swe_smith
train
44,011
pydata__patsy.a5d16484.func_basic__eq23rx02
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Formula parsing broken - operators mapped to wrong functions #### Description Formula parsing is completely broken. Basic formulas like `'a + b'` are failing with errors about numbers beside each other. #### Steps/Code to Reproduce ```python import patsy from patsy import dmatrix # Simple formula parsing fails dat...
diff --git a/patsy/desc.py b/patsy/desc.py index 210350d..9ba7123 100644 --- a/patsy/desc.py +++ b/patsy/desc.py @@ -403,26 +403,24 @@ def _eval_python_expr(evaluator, tree): class Evaluator(object): def __init__(self): self._evaluators = {} - self.add_op("~", 2, _eval_any_tilde) self.add...
["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/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines...
["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
28
23
1,044
0
0.6
1
0.75
1
0.267333
81.077
6,153
swe_smith::train::29687
swe_smith
train
29,687
cookiecutter__cookiecutter.b4451231.lm_rewrite__gop1hd1h
swesmith/cookiecutter__cookiecutter.b4451231
cookiecutter/cookiecutter
python
null
# Missing cookiecutter key validation in replay.load function The `load` function in `cookiecutter/replay.py` no longer validates that the loaded context contains a 'cookiecutter' key. ## Description When loading a replay file, the function should verify that the context contains a 'cookiecutter' key, but this valid...
diff --git a/cookiecutter/replay.py b/cookiecutter/replay.py index de1eedd..6083796 100644 --- a/cookiecutter/replay.py +++ b/cookiecutter/replay.py @@ -37,15 +37,9 @@ def dump(replay_dir: Path | str, template_name: str, context: dict[str, Any]) -> json.dump(context, outfile, indent=2) -def load(replay_dir...
["tests/replay/test_load.py::test_value_error_if_key_missing_in_context"]
["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_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
14
1
1,324
0
0.6
1
0.75
1
0.267333
81.077
6,154
r2e_gym::train::4323
r2e_gym
train
4,323
numpy__cb89f88af361f045c560886b1268038ba5ea9cc2
numpy
numpy/numpy
python
cb89f88af361f045c560886b1268038ba5ea9cc2
**Title:** `numpy.select` Does Not Raise Errors for Empty or Non-Boolean Condition Lists **Description:** When using `numpy.select`, providing an empty condition list or non-boolean arrays in the condition list does not raise an error as expected. Instead, it raises a `DeprecationWarning` and continues execution, whic...
diff --git a/doc/release/upcoming_changes/14583.expired.rst b/doc/release/upcoming_changes/14583.expired.rst --- a/doc/release/upcoming_changes/14583.expired.rst +++ b/doc/release/upcoming_changes/14583.expired.rst @@ -0,0 +1,2 @@ +* Remove deprecated support for boolean and empty condition lists in + `numpy.select` d...
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -423,27 +423,17 @@ assert_equal(select([m], [d]), [0, 0, 0, np.nan, 0, 0]) def test_deprecated_empty(self): - with ...
null
null
namanjain12/numpy_final:cb89f88af361f045c560886b1268038ba5ea9cc2
true
null
2
26
null
1,796
0
0.75
1
0.6375
1
0.386
81.07675
6,155
swe_smith::train::39451
swe_smith
train
39,451
pallets__jinja.ada0a9a6.func_pm_ctrl_shuffle__mkaaftrp
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
TemplateStream.dump() raises UnboundLocalError when called #### Description When calling the `dump()` method on a `TemplateStream` object, an `UnboundLocalError` is raised for the variable `real_fp`. #### Steps/Code to Reproduce ```python from jinja2 import Template import io template = Template('Hello {{ name }}!...
diff --git a/src/jinja2/environment.py b/src/jinja2/environment.py index 0b303d5..0857e05 100644 --- a/src/jinja2/environment.py +++ b/src/jinja2/environment.py @@ -1593,24 +1593,6 @@ class TemplateStream: encoding: t.Optional[str] = None, errors: t.Optional[str] = "strict", ) -> None: - "...
["tests/test_api.py::TestStreaming::test_dump_stream"]
["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
35
1
903
0
0.6
1
0.75
1
0.267167
81.0765
6,156
swe_smith::train::51539
swe_smith
train
51,539
pydicom__pydicom.7d361b3d.combine_file__q3tna0fi
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
JSON conversion fails with TypeError after recent changes #### Description After some recent changes to the JSON conversion code, converting DICOM data to/from JSON format is broken. The conversion process now raises `TypeError: 'NoneType' object is not callable` errors when trying to process various data elements. ...
diff --git a/src/pydicom/jsonrep.py b/src/pydicom/jsonrep.py index 48fd36f..2550a2f 100644 --- a/src/pydicom/jsonrep.py +++ b/src/pydicom/jsonrep.py @@ -45,13 +45,6 @@ def convert_to_python_number(value: Any, vr: str) -> Any: return value number_type: type[int] | type[float] | None = None - if vr in ...
["tests/test_json.py::TestPersonName::test_json_pn_from_file", "tests/test_json.py::TestPersonName::test_pn_components_to_json", "tests/test_json.py::TestPersonName::test_pn_components_from_json", "tests/test_json.py::TestPersonName::test_multi_value_to_json", "tests/test_json.py::TestPersonName::test_dataelem_from_jso...
["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
25
18
1,103
0
0.6
1
0.75
1
0.267167
81.0765
6,157
swe_smith::train::32135
swe_smith
train
32,135
davidhalter__parso.338a5760.func_pm_class_rm_funcs__tcz4ba4i
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
BaseNode missing get_code method after refactoring #### Description After some recent changes, BaseNode instances no longer have a `get_code()` method, causing AttributeError when trying to get code representation from parsed nodes. #### Steps/Code to Reproduce ```python import parso code = """ def foo(): retu...
diff --git a/parso/tree.py b/parso/tree.py index e529871..cbe2f3c 100644 --- a/parso/tree.py +++ b/parso/tree.py @@ -402,41 +402,6 @@ class BaseNode(NodeOrLeaf): first = children[0].get_code(include_prefix=False) return first + "".join(c.get_code() for c in children[1:]) - def get_code(se...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_parser.py::test_one_statement_func...
["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_used_update[False-False]", "test/test_cache.py::test_cache_last_used_up...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
36
169
883
0
0.6
1
0.75
1
0.267167
81.0765
6,158
swe_smith::train::52761
swe_smith
train
52,761
pydicom__pydicom.7d361b3d.pr_1833
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# Error when using convert_tag with short byte strings ## Description I'm encountering an issue when trying to use the `convert_tag` function with byte strings that are shorter than 4 bytes. The function attempts to unpack the byte string without checking its length first, which leads to a struct.error. ## Steps to ...
diff --git a/src/pydicom/values.py b/src/pydicom/values.py index 9be0242..205bfec 100644 --- a/src/pydicom/values.py +++ b/src/pydicom/values.py @@ -72,7 +72,7 @@ def multi_string( def convert_tag(byte_string: bytes, is_little_endian: bool, offset: int = 0) -> BaseTag: """Return a decoded :class:`BaseTag<pydico...
["tests/test_values.py::TestConvertTag::test_empty_bytestring", "tests/test_values.py::TestConvertTag::test_bad_bytestring", "tests/test_values.py::TestConvertAT::test_bad_length"]
["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
12
3
1,363
0
0.6
1
0.75
1
0.267167
81.0765
6,159
swe_smith::train::47687
swe_smith
train
47,687
sqlfluff__sqlfluff.50a1c4b6.func_basic__0m8txu3y
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Progress bar initialization fails when parsing SQL files #### Description When parsing SQL files, the progress bar initialization is failing due to an assertion error. The parser expects the progress bar to already be initialized, but it's attempting to initialize it again. #### Steps/Code to Reproduce ```python fr...
diff --git a/src/sqlfluff/core/parser/context.py b/src/sqlfluff/core/parser/context.py index 7edf331..e296f38 100644 --- a/src/sqlfluff/core/parser/context.py +++ b/src/sqlfluff/core/parser/context.py @@ -271,21 +271,20 @@ class ParseContext: we know how far there is to go as we track progress through ...
["test/core/parser/parse_test.py::test__parser__parse_error", "test/core/parser/parse_test.py::test_parse_jinja_macro_exclude"]
["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar__oneof__copy", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[True]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[False]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser_...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
17
2
1,263
0
0.6
1
0.75
1
0.267167
81.0765
6,160
swe_smith::train::10041
swe_smith
train
10,041
paramiko__paramiko.23f92003.combine_file__1jl6fo0i
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
RSA key operations broken after recent changes #### Description RSA key operations are failing with various errors. The `size` property, `public_numbers` method, `get_bits()` method, and SSH signature generation all seem to be broken. #### Steps/Code to Reproduce ```python from paramiko import RSAKey # Load an RSA...
diff --git a/paramiko/rsakey.py b/paramiko/rsakey.py index b7ad3ce..d0892ae 100644 --- a/paramiko/rsakey.py +++ b/paramiko/rsakey.py @@ -85,14 +85,14 @@ class RSAKey(PKey): @property def size(self): - return self.key.key_size + return self.key_size @property def public_numbers(self...
["tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::AgentKey_::fields::defers_to_inner_key_when_present[rsa]", "tests/agent.py::AgentKey_::get_bits::defers_to_inner_key_when_present[rsa]", "tests/agent.py::AgentKey_::asbytes::defers_to_inner_key_when_present[rsa]", "tests/pkey.py::...
["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/pkey.py::PKey_::from_path::loads_from_Path[rsa]", "tests/pkey.py::PKey_::fingerprint...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
17
141
1,262
0
0.6
1
0.75
1
0.267
81.076
6,161
swe_smith::train::29637
swe_smith
train
29,637
django__channels.a144b4b8.lm_rewrite__m1k8due7
swesmith/django__channels.a144b4b8
django/channels
python
null
### Bug report **Bug summary** It seems that after a recent change, the `get_handler_name` function in `channels/consumer.py` is not handling message types correctly. This is causing a `ValueError` to be raised when processing certain messages, which previously worked without issues. The error message indicates that ...
diff --git a/channels/consumer.py b/channels/consumer.py index fc06543..84aa2b4 100644 --- a/channels/consumer.py +++ b/channels/consumer.py @@ -14,15 +14,9 @@ def get_handler_name(message): Looks at a message, checks it has a sensible type, and returns the handler name for that type. """ - # Check me...
["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...
["tests/security/test_auth.py::test_login_no_session_in_scope", "tests/security/test_auth.py::test_login_no_user_in_scope", "tests/security/test_auth.py::test_login_user_as_argument", "tests/security/test_auth.py::test_login_user_on_scope", "tests/security/test_auth.py::test_login_change_user", "tests/security/test_aut...
jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8
true
null
1
10
39
1,402
0
0.6
1
0.75
1
0.267
81.076
6,162
swe_smith::train::2208
swe_smith
train
2,208
pdfminer__pdfminer.six.1a8bd2f7.func_basic__kb6epa2w
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFPage.create_pages() fails to extract pages from some PDF files #### Description When trying to extract pages from certain PDF files, `PDFPage.create_pages()` raises an `AttributeError` indicating that a `dict` object has no attribute `get`. This appears to be related to how the page extraction logic handles differ...
diff --git a/pdfminer/pdfpage.py b/pdfminer/pdfpage.py index a6e6cfc..e08e9da 100644 --- a/pdfminer/pdfpage.py +++ b/pdfminer/pdfpage.py @@ -105,12 +105,9 @@ class PDFPage: object_id = obj object_properties = dict_value(document.getobj(object_id)).copy() else: - ...
["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
13
58
1,342
0
0.6
1
0.75
1
0.267
81.076
6,163
swe_smith::train::30565
swe_smith
train
30,565
gweis__isodate.17cb25eb.func_basic__cb73sptp
swesmith/gweis__isodate.17cb25eb
gweis/isodate
python
null
Date parsing fails for basic ISO 8601 formats #### Description When parsing ISO 8601 date strings, the parser fails to recognize basic formats that should be valid according to the standard. This affects both date-only and datetime parsing. #### Steps/Code to Reproduce ```python from isodate import parse_date, pars...
diff --git a/src/isodate/isodates.py b/src/isodate/isodates.py index aa432c5..63c8285 100644 --- a/src/isodate/isodates.py +++ b/src/isodate/isodates.py @@ -33,19 +33,19 @@ def build_date_regexps(yeardigits: int = 4, expanded: bool = False) -> list[re.P sign is required (expanded format). To support +/- sign for 4...
["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...
["tests/test_date.py::test_parse[4-1-W1-1-None-%YW%W%w]", "tests/test_date.py::test_format[4-19-expected0-%C]", "tests/test_date.py::test_format[4-1985-expected1-%Y]", "tests/test_date.py::test_format[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_format[4-198504-expected3-%Y%m]", "tests/test_date.py::test_form...
jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb
true
null
1
21
40
1,182
0
0.6
1
0.75
1
0.267
81.076
6,164
swe_smith::train::31835
swe_smith
train
31,835
davidhalter__parso.338a5760.combine_module__hcr9ebm4
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Diff parser crashes with AttributeError when processing code changes #### Description The diff parser is throwing AttributeError exceptions when trying to process various code modifications. The errors seem to be related to accessing attributes on objects that have unexpected types (dict instead of expected object ty...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..e238e54 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -520,11 +520,11 @@ class _NodesTreeNode: 'prefix children line_offset last_line_offset_leaf') def __init__(self, tree_node, parent=None, indentation=0): - ...
["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p...
["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
2
12
114
1,362
0
0.6
1
0.75
1
0.267
81.076
6,165
swe_smith::train::4916
swe_smith
train
4,916
bottlepy__bottle.a8dfef30.func_pm_ctrl_invert_if__7bl3gzb4
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
ConfigDict overlay deletion logic inverted When deleting keys from ConfigDict overlays, the logic for handling keys present in source vs keys not present in source appears to be inverted, causing incorrect behavior. #### Steps/Code to Reproduce ```python from bottle import ConfigDict # Create a source config and ov...
diff --git a/bottle.py b/bottle.py index 286b5bc..7e7bf4d 100755 --- a/bottle.py +++ b/bottle.py @@ -2469,16 +2469,15 @@ class ConfigDict(dict): if key in self._virtual_keys: raise KeyError("Virtual keys cannot be deleted: %s" % key) - if self._source and key in self._source: - ...
["test/test_config.py::TestConfDict::test_overlay"]
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
11
1
1,382
0
0.6
1
0.75
1
0.267
81.076
6,166
swe_smith::train::18329
swe_smith
train
18,329
msiemens__tinydb.10644a0e.func_basic__zccr81lw
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Table.all() returns set instead of list #### Description The `all()` method on Table instances is returning a set instead of a list, breaking code that expects a list return type. #### Steps/Code to Reproduce ```python from tinydb import TinyDB from tinydb.storages import MemoryStorage db = TinyDB(storage=MemorySt...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..5769b6e 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -229,12 +229,8 @@ class Table: :returns: a list with all documents. """ - # iter(self) (implemented in Table.__iter__ provides an iterator - # that returns all do...
["tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_json_write", "tests/test_storages.py::test_read_once", "tests/test_storages.py::test_yaml", "tests/test_tables.py::test_table_is_iterable[memory]", "tests/test_tables.py::test_table_is_iterable[json]", "tests/test_tinydb.py::test_...
["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_operations.p...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
8
19
1,441
0
0.6
1
0.75
1
0.266833
81.0755
6,167
swe_smith::train::50927
swe_smith
train
50,927
python-hyper__h11.bed0dd4a.func_pm_remove_cond__u3vgs0ux
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
Body framing logic broken after removing transfer-encoding and content-length handling #### Description The HTTP message body framing detection is not working correctly. When processing requests and responses, the connection fails to determine proper body framing, causing various errors during message parsing. #### ...
diff --git a/h11/_connection.py b/h11/_connection.py index e37d82a..3b71133 100644 --- a/h11/_connection.py +++ b/h11/_connection.py @@ -125,22 +125,12 @@ def _body_framing( # Step 2: check for Transfer-Encoding (T-E beats C-L): transfer_encodings = get_comma_header(event.headers, b"transfer-encoding") - ...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_connection.py::test_client_t...
["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_close_simple", "h11/tests/test_connection.py::test_idle_receive_nothing", "h11/tests/test_connection.py::test_connection_drop", "h11/tests/test_connection.py:...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
10
22
1,401
0
0.6
1
0.75
1
0.266833
81.0755
6,168
swe_smith::train::14406
swe_smith
train
14,406
python-openxml__python-docx.0cf6d71f.lm_rewrite__v228w4il
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
<START WRITING> Document function fails to handle non-Word files correctly Description I've encountered an issue with the Document function where it doesn't seem to handle non-Word files as expected. When attempting to open a file that isn't a .docx, the function should raise a ValueError indicating the file type mis...
diff --git a/src/docx/api.py b/src/docx/api.py index aea8764..f41aea2 100644 --- a/src/docx/api.py +++ b/src/docx/api.py @@ -16,20 +16,25 @@ if TYPE_CHECKING: from docx.parts.document import DocumentPart -def Document(docx: str | IO[bytes] | None = None) -> DocumentObject: +def Document(docx: (str | IO[bytes] ...
["tests/test_api.py::DescribeDocument::it_opens_a_docx_file", "tests/test_api.py::DescribeDocument::it_opens_the_default_docx_if_none_specified", "tests/test_api.py::DescribeDocument::it_raises_on_not_a_Word_file", "tests/test_blkcntnr.py::DescribeBlockItemContainer::it_can_iterate_its_inner_content", "tests/test_secti...
["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
19
5
1,221
0
0.6
1
0.75
1
0.266833
81.0755
6,169
swe_smith::train::31536
swe_smith
train
31,536
benoitc__gunicorn.bacbf8aa.func_basic__jzecbjjr
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Header map behaviour validation returns wrong values #### Description The `validate_header_map_behaviour` function in `gunicorn/config.py` is returning incorrect values for header map behaviour validation. When passing valid string values like "drop", "refuse", or "dangerous", the function returns the wrong mapped va...
diff --git a/gunicorn/config.py b/gunicorn/config.py index 402a26b..c342d7a 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -2374,21 +2374,20 @@ class CasefoldHTTPMethod(Setting): def validate_header_map_behaviour(val): - # FIXME: refactor all of this subclassing stdlib argparse - + if val ...
["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...
["tests/test_config.py::test_callable_validation_for_string", "tests/test_http.py::test_method_pattern", "tests/test_http.py::test_readline_empty_body", "tests/test_http.py::test_readline_zero_size", "tests/test_http.py::test_readline_new_line_before_size", "tests/test_http.py::test_readline_new_line_after_size", "test...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
17
170
1,260
0
0.6
1
0.75
1
0.266667
81.075
6,170
swe_smith::train::32683
swe_smith
train
32,683
pydantic__pydantic.acb0f10f.func_pm_remove_cond__el8f7i2f
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Field deprecated parameters not working correctly #### Description When using deprecated Field parameters like `max_items`, `const`, and `allow_mutation`, they don't behave as expected. The deprecation warnings are shown but the actual functionality is broken. #### Steps/Code to Reproduce ```python from pydantic im...
diff --git a/pydantic/fields.py b/pydantic/fields.py index 7081292..65ba52b 100644 --- a/pydantic/fields.py +++ b/pydantic/fields.py @@ -1020,8 +1020,6 @@ def Field( # noqa: C901 """ # Check deprecated and removed params from V1. This logic should eventually be removed. const = extra.pop('const', None) ...
["tests/test_deprecated.py::test_field_max_items", "tests/test_deprecated.py::test_field_const", "tests/test_deprecated.py::test_field_include_deprecation", "tests/test_deprecated.py::test_allow_mutation", "tests/test_docs.py::test_docstrings_examples[pydantic/fields.py:1350-1364]", "tests/test_docs.py::test_docstrings...
["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
9
8
1,420
0
0.6
1
0.75
1
0.266667
81.075
6,171
swe_smith::train::35534
swe_smith
train
35,534
stanfordnlp__dspy.651a4c71.func_pm_ctrl_shuffle__jzezkfqq
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# NameError: name 'pzip' is not defined in assert_structural_equivalency I found a bug in the `assert_structural_equivalency` function in `dspy/teleprompt/bootstrap_finetune.py`. The function tries to use a variable `pzip` before it's defined. ## Steps to Reproduce When trying to use the bootstrap fine-tuning functi...
diff --git a/dspy/teleprompt/bootstrap_finetune.py b/dspy/teleprompt/bootstrap_finetune.py index 129a8f7..23bfff1 100644 --- a/dspy/teleprompt/bootstrap_finetune.py +++ b/dspy/teleprompt/bootstrap_finetune.py @@ -299,21 +299,20 @@ def prepare_teacher(student: Program, teacher: Program = None) -> Program: def asser...
["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
17
4
1,260
0
0.6
1
0.75
1
0.266667
81.075
6,172
swe_smith::train::20648
swe_smith
train
20,648
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__j9g715a2
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
PRQL dialect parser fails with UnboundLocalError on derive operations #### Description When parsing PRQL queries with `derive` operations, the parser throws an `UnboundLocalError` for the variable `selects`. This affects basic PRQL functionality where you want to add computed columns to your query. #### Steps/Code t...
diff --git a/sqlglot/dialects/prql.py b/sqlglot/dialects/prql.py index 2fc2594..f8260ca 100644 --- a/sqlglot/dialects/prql.py +++ b/sqlglot/dialects/prql.py @@ -107,20 +107,6 @@ class PRQL(Dialect): parse_method: t.Optional[t.Callable] = None, append: bool = True, ) -> exp.Query: - ...
["tests/dialects/test_prql.py::TestPRQL::test_prql"]
["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
1
27
1
1,060
0
0.6
1
0.75
1
0.266667
81.075
6,173
swe_smith::train::24940
swe_smith
train
24,940
marshmallow-code__marshmallow.9716fc62.pr_2102
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
DateTime field fails to handle oversized timestamps Description (last modified by User) When using the DateTime field with timestamp or timestamp_ms formats, the library fails to properly handle oversized timestamp values. This causes unexpected errors when deserializing very large timestamp values. For example, ...
diff --git a/src/marshmallow/utils.py b/src/marshmallow/utils.py index a5fe726..da821be 100644 --- a/src/marshmallow/utils.py +++ b/src/marshmallow/utils.py @@ -200,12 +200,7 @@ def from_timestamp(value: typing.Any) -> dt.datetime: # Load a timestamp with utc as timezone to prevent using system timezone. # ...
["tests/test_deserialization.py::TestFieldDeserialization::test_oversized_timestamp_field_deserialization[MockDateTimeOSError-timestamp]", "tests/test_deserialization.py::TestFieldDeserialization::test_oversized_timestamp_field_deserialization[MockDateTimeOSError-timestamp_ms]", "tests/test_deserialization.py::TestFiel...
["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
4
1,419
0
0.6
1
0.75
1
0.2665
81.0745
6,174
swe_smith::train::5517
swe_smith
train
5,517
PyCQA__flake8.cf1542ce.func_pm_class_rm_funcs__duej91pm
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
# Missing check_files method in StyleGuide class I noticed that the `check_files` method is missing from the `StyleGuide` class in the `flake8.api.legacy` module, but it's still being used by other methods. ## Description The `StyleGuide.check_files()` method seems to have been removed, but the `input_file()` method...
diff --git a/src/flake8/api/legacy.py b/src/flake8/api/legacy.py index 446df29..71db522 100644 --- a/src/flake8/api/legacy.py +++ b/src/flake8/api/legacy.py @@ -100,23 +100,6 @@ class StyleGuide: assert self._application.options is not None return self._application.options.filenames - def check_f...
["tests/integration/test_api_legacy.py::test_legacy_api", "tests/unit/test_legacy_api.py::test_styleguide_check_files", "tests/unit/test_legacy_api.py::test_styleguide_input_file"]
["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
18
3
1,239
0
0.6
1
0.75
1
0.2665
81.0745
6,175
swe_smith::train::42390
swe_smith
train
42,390
r1chardj0n3s__parse.30da9e4f.func_pm_ctrl_shuffle__588ltq64
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
# Search function in Parser class is broken - UnboundLocalError when searching strings **Describe the bug & Reproduce** I'm trying to use the `search` method of the `Parser` class to find patterns in strings, but it's throwing an `UnboundLocalError` about a variable 'm' not being defined. Here's a simple example tha...
diff --git a/parse.py b/parse.py index 80242e1..f23a0ea 100644 --- a/parse.py +++ b/parse.py @@ -501,6 +501,11 @@ class Parser(object): return Match(self, m) def search(self, string, pos=0, endpos=None, evaluate_result=True): + + if evaluate_result: + return self.evaluate_result(m)...
["README.rst::README.rst", "tests/test_bugs.py::test_unused_centered_alignment_bug", "tests/test_bugs.py::test_unused_left_alignment_bug", "tests/test_parse.py::test_hyphen_inside_field_name", "tests/test_parse.py::test_hyphen_inside_field_name_collision_handling", "tests/test_search.py::test_basic", "tests/test_search...
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "tests/test_bugs.py::test_named_date_issue7", "tests/test_bugs.py::test_dotted_type_conversion_pull_8", "tests/test_bugs.py::test_pm_overflow_issue16", "tests/test_bugs.py::test_pm_handling_issue57", "tests/test_bugs.py::test_user_type_with...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
13
9
1,339
0
0.6
1
0.75
1
0.2665
81.0745
6,176
swe_smith::train::10038
swe_smith
train
10,038
paramiko__paramiko.23f92003.combine_file__19ygla3f
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTPAttributes._from_msg returns None instead of attribute object When using SFTP operations, file attributes are not being properly parsed and returned. The `_from_msg` method in `SFTPAttributes` class returns `None` instead of the expected attribute object, causing various SFTP operations to fail. #### Steps to Rep...
diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py index 18ffbf8..115dcdc 100644 --- a/paramiko/sftp_attr.py +++ b/paramiko/sftp_attr.py @@ -80,19 +80,16 @@ class SFTPAttributes: attr.filename = filename return attr - def __repr__(self): - return "<SFTPAttributes: {}>".format(s...
["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_append", "tests/test_sftp.py::TestSFTP::test_rename", "tests/test_sftp.py::TestSFTP::testa_posix_rename", "tests/test...
["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
28
43
1,039
0
0.6
1
0.75
1
0.2665
81.0745
6,177
swe_smith::train::18553
swe_smith
train
18,553
HIPS__autograd.ac044f0d.lm_rewrite__qw2cqxaf
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Describe the bug After the recent changes, it seems that certain tensor operations are not behaving as expected, leading to shape mismatch errors. Specifically, operations involving `np.tensordot` and `np.kron` are failing due to unexpected shape mismatches. This issue is causing several functions to not execute p...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..41f9c54 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -698,7 +698,7 @@ def tensordot_adjoint_1(A, G, axes, A_ndim, B_ndim): if type(axes) is int: axes = max(axes, 0) A_axes = ...
["tests/test_systematic.py::test_kron", "tests/test_systematic.py::test_inner", "tests/test_systematic.py::test_tensordot_5", "tests/test_systematic.py::test_tensordot_8", "tests/test_systematic.py::test_tensordot_1", "tests/test_systematic.py::test_tensordot_2", "tests/test_wrappers.py::test_tensor_jacobian_product", ...
["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
7
9
1,459
0
0.6
1
0.75
1
0.2665
81.0745
6,178
swe_smith::train::11967
swe_smith
train
11,967
andialbrecht__sqlparse.e57923b3.lm_rewrite__jby5rkxx
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
# Maximum recursion depth exceeded when parsing deeply nested SQL ## Description When trying to parse a SQL statement with deeply nested brackets, sqlparse fails with a recursion error. This happens because the `flatten()` method in `TokenList` class doesn't properly handle very deep nesting structures. ## How to re...
diff --git a/sqlparse/sql.py b/sqlparse/sql.py index 1037375..ca24daa 100644 --- a/sqlparse/sql.py +++ b/sqlparse/sql.py @@ -211,15 +211,12 @@ class TokenList(Token): This method is recursively called for all child tokens. """ - try: - for token in self.tokens: - if ...
["tests/test_regressions.py::test_max_recursion"]
["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
15
1
1,299
0
0.6
1
0.75
1
0.2665
81.0745
6,179
swe_smith::train::47284
swe_smith
train
47,284
python-trio__trio.cfbbe2c1.lm_rewrite__j3lwqhrf
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
### WeakKeyIdentityDictionary: TypeError in Remove Callback #### Description The `WeakKeyIdentityDictionary` class is encountering a `TypeError` in its `remove` callback function. This error occurs when the `remove` function is called without the required `selfref` argument, which is supposed to be a weak reference t...
diff --git a/src/trio/_core/_ki.py b/src/trio/_core/_ki.py index 46a7fdf..570c1e5 100644 --- a/src/trio/_core/_ki.py +++ b/src/trio/_core/_ki.py @@ -126,21 +126,16 @@ class WeakKeyIdentityDictionary(Generic[_KT, _VT]): def __init__(self) -> None: self._data: dict[_IdRef[_KT], _VT] = {} - def remo...
["src/trio/_core/_tests/test_ki.py::test_weak_key_identity_dict_remove_callback_keyerror", "src/trio/_core/_tests/test_ki.py::test_weak_key_identity_dict_remove_callback_selfref_expired"]
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
15
2
1,299
0
0.6
1
0.75
1
0.2665
81.0745
6,180
swe_smith::train::31871
swe_smith
train
31,871
davidhalter__parso.338a5760.func_basic__3ve6st0j
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Diff parser crashes with IndexError when processing code changes #### Description The diff parser is throwing IndexError exceptions when trying to process various code modifications. This appears to be related to string indexing operations that are accessing invalid positions. #### Steps/Code to Reproduce ```python...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..823aa61 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -612,16 +612,16 @@ class _NodesTree: old_prefix = self.prefix tree_nodes = self._remove_endmarker(tree_nodes) if not tree_nodes: - self.pr...
["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p...
["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
12
77
1,358
0
0.6
1
0.75
1
0.266333
81.074
6,181
swe_smith::train::9808
swe_smith
train
9,808
keleshev__schema.24a30457.func_basic__hghrqpu6
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
Or validation breaks with only_one=True and error accumulation issues #### Description When using `Or` with `only_one=True`, the validation logic incorrectly breaks on the first match instead of allowing proper validation to continue. Additionally, error accumulation in `Or` validation has been broken - instead of co...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..fb2f8aa 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -211,15 +211,15 @@ class Or(And[TSchema]): try: validation: Any = sub_schema.validate(data, **kwargs) self.match_count += 1 - ...
["test_schema.py::test_or_only_one", "test_schema.py::test_or_error_handling"]
["test_schema.py::test_schema", "test_schema.py::test_validate_file", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_test", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema.py::test_strictly", "test_schema.py:...
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
8
2
1,438
0
0.6
1
0.75
1
0.266333
81.074
6,182
swe_smith::train::18776
swe_smith
train
18,776
seperman__deepdiff.ed252022.func_basic__8in7y17s
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
LFU Cache broken after recent changes #### Description The LFU cache implementation appears to be completely broken. When trying to use the cache functionality, it's storing incorrect values and causing various operations to fail. #### Steps/Code to Reproduce ```python from deepdiff.lfucache import LFUCache # Crea...
diff --git a/deepdiff/lfucache.py b/deepdiff/lfucache.py index 3aa168a..d69f076 100644 --- a/deepdiff/lfucache.py +++ b/deepdiff/lfucache.py @@ -181,20 +181,20 @@ class LFUCache: def create_cache_node(self, key, report_type, value): cache_node = CacheNode( - key=key, report_type=report_type, ...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_distance.py::TestDeepDistance::test_get_distance_works_event_when_ignore_order_and_different_hasher", "tests/test_ignore_order.py::TestIgnoreOrder::test_ignore_order_max...
["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
14
15
1,318
0
0.6
1
0.75
1
0.266333
81.074
6,183
swe_bench::test::1506
swe_bench
test
1,506
scikit-learn__scikit-learn-10495
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
d6aa098dadc5eddca5287e823cacef474ac0d23f
check_array(X, dtype='numeric') should fail if X has strings Currently, dtype='numeric' is defined as "dtype is preserved unless array.dtype is object". This seems overly lenient and strange behaviour, as in #9342 where @qinhanmin2014 shows that `check_array(['a', 'b', 'c'], dtype='numeric')` works without error and pr...
ping @jnothman > This seems overly lenient and strange behaviour, as in #9342 where @qinhanmin2014 shows that check_array(['a', 'b', 'c'], dtype='numeric') works without error and produces an array of strings! I think you mean #9835 (https://github.com/scikit-learn/scikit-learn/pull/9835#issuecomment-348069380) ...
diff --git a/sklearn/utils/validation.py b/sklearn/utils/validation.py --- a/sklearn/utils/validation.py +++ b/sklearn/utils/validation.py @@ -516,6 +516,15 @@ def check_array(array, accept_sparse=False, dtype="numeric", order=None, # To ensure that array flags are maintained array = np.array(...
diff --git a/sklearn/utils/tests/test_validation.py b/sklearn/utils/tests/test_validation.py --- a/sklearn/utils/tests/test_validation.py +++ b/sklearn/utils/tests/test_validation.py @@ -285,6 +285,42 @@ def test_check_array(): result = check_array(X_no_array) assert_true(isinstance(result, np.ndarray)) + ...
["sklearn/utils/tests/test_validation.py::test_check_array"]
["sklearn/utils/tests/test_validation.py::test_as_float_array", "sklearn/utils/tests/test_validation.py::test_as_float_array_nan[X0]", "sklearn/utils/tests/test_validation.py::test_as_float_array_nan[X1]", "sklearn/utils/tests/test_validation.py::test_np_matrix", "sklearn/utils/tests/test_validation.py::test_memmap", "...
null
true
2018-01-18T03:11:24Z
1
9
1
1,217
0
0.8
1
0.55
1
0.232833
81.0735
6,184
swe_smith::train::5147
swe_smith
train
5,147
agronholm__exceptiongroup.0b4f4937.func_basic__tvh0dund
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
ExceptionGroup.subgroup() returns incorrect results when filtering #### Description The `subgroup()` method on ExceptionGroup instances is returning unexpected results when filtering exceptions. When calling `subgroup()` with a condition that should match no exceptions, it returns the original group instead of `None`...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..ecae479 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -142,7 +142,7 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]): ) -> BaseExceptionGroup[_BaseExc...
["tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predicate__match", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predicate__no_match", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_type__match", "tests/test_exceptions.p...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
12
11
1,357
0
0.6
1
0.75
1
0.266167
81.0735
6,185
swe_smith::train::23941
swe_smith
train
23,941
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__5fvhug38
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
UnboundLocalError in format_comments_and_history function #### Description When calling `format_comments_and_history` function in `sunpy.io._fits`, an `UnboundLocalError` is raised because the `header` variable is being referenced before it's defined. #### Steps/Code to Reproduce ```python from astropy.io import fi...
diff --git a/sunpy/io/_fits.py b/sunpy/io/_fits.py index 5513abe..8673f73 100644 --- a/sunpy/io/_fits.py +++ b/sunpy/io/_fits.py @@ -126,6 +126,14 @@ def get_header(afile): def format_comments_and_history(input_header): + waveunit = extract_waveunit(header) + header['HISTORY'] = history + header['KEYCOMME...
["sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-None-4]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-1-1]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits...
["sunpy/io/tests/test_fits.py::test_write_with_metadict_header_astropy", "sunpy/io/tests/test_fits.py::test_fitsheader", "sunpy/io/tests/test_fits.py::test_warn_nonascii", "sunpy/io/tests/test_fits.py::test_warn_nan", "sunpy/io/tests/test_fits.py::test_warn_longkey", "sunpy/io/tests/test_fits.py::test_split_multiline_c...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
31
22
977
0
0.6
1
0.75
1
0.266167
81.0735
6,186
swe_smith::train::7691
swe_smith
train
7,691
cantools__cantools.0c6a7871.func_basic__p7xtupgn
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML loader incorrectly rejects valid files with duplicate path error #### Description When loading ARXML files, the system loader incorrectly throws "File contains multiple elements with path" errors for valid ARXML files that should load successfully. This appears to be related to the path validation logic in the ...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..a318e81 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -2094,30 +2094,23 @@ class Syste...
["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_database.py::CanToolsDataba...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
29
19
1,017
0
0.6
1
0.75
1
0.266167
81.0735
6,187
swe_smith::train::46820
swe_smith
train
46,820
python-trio__trio.cfbbe2c1.func_basic__6d83qith
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Memory channel creation returns wrong order and rejects valid buffer sizes #### Description When creating memory channels with `trio.open_memory_channel()`, the function returns the send and receive channels in the wrong order, and incorrectly validates the `max_buffer_size` parameter. #### Steps/Code to Reproduce ...
diff --git a/src/trio/_channel.py b/src/trio/_channel.py index 6410d91..0a0b837 100644 --- a/src/trio/_channel.py +++ b/src/trio/_channel.py @@ -76,14 +76,14 @@ def _open_memory_channel( this channel (summing over all clones). """ - if max_buffer_size != inf and not isinstance(max_buffer_size, int): + ...
["src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_on_asyncio", "src/trio/_tests/test_channel.py::test_channel", "src/trio/_tests/test_channel.py::test_553", "src/trio/_tests/test_channel.py::test_channel_multiple_producers", "src/trio/_tests/test_channel.py::test_channel_multiple_consumers", "src/trio/_tests/...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
6
58
1,477
0
0.6
1
0.75
1
0.266167
81.0735
6,188
swe_smith::train::39689
swe_smith
train
39,689
tornadoweb__tornado.d5ac65c1.func_pm_class_rm_funcs__b5djkd2k
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
Template inheritance broken after removing _get_ancestors method #### Description Templates using `{% extends %}` blocks are failing with internal server errors. The template inheritance functionality appears to be broken. #### Steps/Code to Reproduce ```python from tornado.template import Template, DictLoader # C...
diff --git a/tornado/template.py b/tornado/template.py index 0064c6f..bbb4b5c 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -376,19 +376,6 @@ class Template: finally: buffer.close() - def _get_ancestors(self, loader: Optional["BaseLoader"]) -> List["_File"]: - ancestors...
["test_custom_escape (tornado.test.template_test.AutoEscapeTest)", "test_default_off (tornado.test.template_test.AutoEscapeTest)", "test_default_on (tornado.test.template_test.AutoEscapeTest)", "test_extended_block (tornado.test.template_test.AutoEscapeTest)", "test_manual_minimize_whitespace (tornado.test.template_tes...
["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
46
1,336
0
0.6
1
0.75
1
0.266
81.073
6,189
swe_smith::train::12073
swe_smith
train
12,073
lepture__mistune.bf54ef67.combine_file__iwxjzpyk
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
Table parsing broken after recent changes #### Description Table parsing is completely broken. When trying to parse markdown tables, the parser throws various TypeErrors and produces incorrect output. The table structure seems to be getting mangled during processing. #### Steps/Code to Reproduce ```python import mi...
diff --git a/src/mistune/plugins/table.py b/src/mistune/plugins/table.py index 39e81f9..0c92a6d 100644 --- a/src/mistune/plugins/table.py +++ b/src/mistune/plugins/table.py @@ -46,35 +46,34 @@ def parse_table( pos = m.end() header = m.group('table_head') align = m.group('table_align') - thead, aligns ...
["tests/test_plugins.py::TestPlugin1_table::test_align_table_001", "tests/test_plugins.py::TestPlugin1_table::test_align_table_002", "tests/test_plugins.py::TestPlugin1_table::test_misc_table_001", "tests/test_plugins.py::TestPlugin1_table::test_misc_table_002", "tests/test_plugins.py::TestPlugin1_table::test_misc_tabl...
["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
32
24
955
0
0.6
1
0.75
1
0.265833
81.0725
6,190
swe_smith::train::48328
swe_smith
train
48,328
sqlfluff__sqlfluff.50a1c4b6.func_pm_op_swap__qzh4r3og
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Sequence grammar fails with AttributeError when checking Indent subclass #### Description When using the Sequence grammar with certain configurations, an AttributeError is raised during the parsing process. The error occurs when the code attempts to check if an element is a subclass of Indent, but the element is not ...
diff --git a/src/sqlfluff/core/parser/grammar/sequence.py b/src/sqlfluff/core/parser/grammar/sequence.py index fabc0c1..0df6ec5 100644 --- a/src/sqlfluff/core/parser/grammar/sequence.py +++ b/src/sqlfluff/core/parser/grammar/sequence.py @@ -176,7 +176,7 @@ class Sequence(BaseGrammar): meta_buffer.a...
["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof_exclude", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof_take_longest_match", "test/core/parser/grammar/grammar_sequence_test.py::test__parser__grammar_sequence_nested_match", "test/core/parser/grammar/grammar_se...
["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar__oneof__copy", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[True]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[False]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser_...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
7
34
1,455
0
0.6
1
0.75
1
0.265833
81.0725
6,191
swe_smith::train::7893
swe_smith
train
7,893
cantools__cantools.0c6a7871.func_pm_ctrl_invert_if__aw1mygeg
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Signal plotting fails with KeyError when signal already exists #### Description When plotting CAN signals, the plot functionality crashes with a KeyError when trying to access signals that have already been processed. The error occurs during signal data collection and prevents any plots from being generated. #### St...
diff --git a/src/cantools/subparsers/plot.py b/src/cantools/subparsers/plot.py index c3d5890..6976f4a 100644 --- a/src/cantools/subparsers/plot.py +++ b/src/cantools/subparsers/plot.py @@ -601,9 +601,6 @@ class Signals: return if signal not in self.values: - graph = Graph() - ...
["tests/test_plot.py::CanToolsPlotTest::test_autocolor", "tests/test_plot.py::CanToolsPlotTest::test_break_time", "tests/test_plot.py::CanToolsPlotTest::test_break_time_none", "tests/test_plot.py::CanToolsPlotTest::test_case_sensitive", "tests/test_plot.py::CanToolsPlotTest::test_choices_stem", "tests/test_plot.py::Can...
["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
48
1,455
0
0.6
1
0.75
1
0.265833
81.0725
6,192
swe_smith::train::20557
swe_smith
train
20,557
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__2vkl1px1
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
DuckDB bracket_sql method produces UnboundLocalError for certain expressions #### Description When transpiling SQL expressions that involve bracket notation in DuckDB dialect, an `UnboundLocalError` is raised for the variable `this` in the `bracket_sql` method. This appears to be related to the version-specific handl...
diff --git a/sqlglot/dialects/duckdb.py b/sqlglot/dialects/duckdb.py index b362cfe..daecb11 100644 --- a/sqlglot/dialects/duckdb.py +++ b/sqlglot/dialects/duckdb.py @@ -973,15 +973,6 @@ class DuckDB(Dialect): return count_if_to_sum(self, expression) def bracket_sql(self, expression: exp.Bracket)...
["tests/dialects/test_duckdb.py::TestDuckDB::test_array_index", "tests/dialects/test_duckdb.py::TestDuckDB::test_duckdb"]
["tests/dialects/test_duckdb.py::TestDuckDB::test_analyze", "tests/dialects/test_duckdb.py::TestDuckDB::test_array", "tests/dialects/test_duckdb.py::TestDuckDB::test_at_sign_to_abs", "tests/dialects/test_duckdb.py::TestDuckDB::test_attach_detach", "tests/dialects/test_duckdb.py::TestDuckDB::test_cast", "tests/dialects/...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
17
2
1,255
0
0.6
1
0.75
1
0.265833
81.0725
6,193
swe_smith::train::23984
swe_smith
train
23,984
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__br095lpq
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
MetaDict initialization fails with keycomments and invalid arguments #### Description When initializing MetaDict with certain arguments, the constructor fails to properly handle keycomments and validate input arguments. This affects the initialization process and can lead to unexpected behavior. #### Steps/Code to R...
diff --git a/sunpy/util/metadata.py b/sunpy/util/metadata.py index 38b398b..b7536e0 100644 --- a/sunpy/util/metadata.py +++ b/sunpy/util/metadata.py @@ -38,6 +38,14 @@ class MetaDict(OrderedDict): # Store all keys as lower-case to allow for case-insensitive indexing # OrderedDict can be instantiated f...
["sunpy/util/tests/test_metadata.py::test_init_with_keycomments", "sunpy/util/tests/test_metadata.py::test_init_with_illegal_arg", "sunpy/util/tests/test_metadata.py::test_init_with_invalid_keycomments_type"]
["sunpy/util/tests/test_metadata.py::sunpy.util.tests.test_metadata.test_init_with_lst_of_lsts", "sunpy/util/tests/test_metadata.py::sunpy.util.tests.test_metadata.test_init_with_tuple_of_tuples", "sunpy/util/tests/test_metadata.py::test_init_with_lst_of_lsts", "sunpy/util/tests/test_metadata.py::test_init_with_tuple_o...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
17
3
1,254
0
0.6
1
0.75
1
0.265667
81.072
6,194
swe_smith::train::14527
swe_smith
train
14,527
hukkin__tomli.443a0c1b.func_basic__68y76uqd
swesmith/hukkin__tomli.443a0c1b
hukkin/tomli
python
null
[Bug]: Flags.add() method in tomli parser breaks when adding flags to existing keys ### Bug summary I've discovered an issue with the `Flags.add()` method in the tomli parser. When trying to add a flag to a key that already exists in the container, the method is failing to properly handle the existing key, causing pa...
diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index 16c76cd..f08bae8 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -234,9 +234,9 @@ class Flags: if k not in cont: cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}} cont = cont[k]["ne...
["tests/test_data.py::TestData::test_invalid"]
["tests/test_data.py::TestData::test_valid", "tests/test_error.py::TestError::test_deprecated_tomldecodeerror", "tests/test_error.py::TestError::test_invalid_char_quotes", "tests/test_error.py::TestError::test_invalid_parse_float", "tests/test_error.py::TestError::test_line_and_col", "tests/test_error.py::TestError::te...
jyangballin/swesmith.x86_64.hukkin_1776_tomli.443a0c1b
true
null
1
6
1
1,474
0
0.6
1
0.75
1
0.265667
81.072
6,195
swe_smith::train::20128
swe_smith
train
20,128
kurtmckee__feedparser.cad965a3.lm_rewrite__0hhi7ci9
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
KeyError when parsing validity in feedparser I've encountered an issue with the feedparser library where a KeyError is raised when parsing certain feeds. This seems to be related to the handling of the "validity" field in the Dublin Core namespace. Here's a minimal example to reproduce the issue: ```python from feed...
diff --git a/feedparser/namespaces/dc.py b/feedparser/namespaces/dc.py index 37c1619..764a1b9 100644 --- a/feedparser/namespaces/dc.py +++ b/feedparser/namespaces/dc.py @@ -112,20 +112,14 @@ class Namespace: self.push("validity", 1) def _end_dcterms_valid(self): - for validity_detail in self.pop(...
["tests/test_well_formed.py::test_strict_parser[info1582]", "tests/test_well_formed.py::test_strict_parser[info1598]", "tests/test_well_formed.py::test_loose_parser[info1472]", "tests/test_well_formed.py::test_loose_parser[info1587]", "tests/test_well_formed.py::test_strict_parser[info1604]", "tests/test_well_formed.py...
["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
1
22
12
1,154
0
0.6
1
0.75
1
0.265667
81.072
6,196
swe_smith::train::156
swe_smith
train
156
oauthlib__oauthlib.1fd52536.combine_file__vw550k00
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth2 authorization code parsing returns None instead of parameters #### Description When parsing OAuth2 authorization code responses, the `parse_authorization_code_response` function is returning `None` instead of the expected parameter dictionary. This breaks the OAuth2 flow for web applications. #### Steps/Code ...
diff --git a/oauthlib/oauth2/rfc6749/parameters.py b/oauthlib/oauth2/rfc6749/parameters.py index 6c55000..04ea79f 100644 --- a/oauthlib/oauth2/rfc6749/parameters.py +++ b/oauthlib/oauth2/rfc6749/parameters.py @@ -267,22 +267,22 @@ def parse_authorization_code_response(uri, state=None): &state=xyz ...
["tests/oauth2/rfc6749/clients/test_mobile_application.py::MobileApplicationClientTest::test_parse_token_response", "tests/oauth2/rfc6749/clients/test_web_application.py::WebApplicationClientTest::test_parse_grant_uri_response", "tests/oauth2/rfc6749/clients/test_web_application.py::WebApplicationClientTest::test_popul...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
18
5
1,233
0
0.6
1
0.75
1
0.2655
81.0715
6,197
swe_smith::train::52556
swe_smith
train
52,556
pydicom__pydicom.7d361b3d.func_pm_remove_cond__9mjxv0qo
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
dcmwrite fails with ValueError when no transfer syntax specified #### Description When trying to write DICOM datasets without specifying a transfer syntax, dcmwrite now raises a ValueError instead of using fallback encoding logic. This breaks existing code that relied on the automatic encoding determination. #### St...
diff --git a/src/pydicom/filewriter.py b/src/pydicom/filewriter.py index cb3ce64..3eb2dd5 100644 --- a/src/pydicom/filewriter.py +++ b/src/pydicom/filewriter.py @@ -1053,15 +1053,7 @@ def _determine_encoding( return cast(tuple[bool, bool], arg_encoding) - # The default for little_endian is `None` so we ...
["tests/test_dataelem.py::TestRawDataElement::test_read_known_private_tag_implicit", "tests/test_dataelem.py::TestRawDataElement::test_read_known_private_tag_explicit", "tests/test_dataelem.py::TestRawDataElement::test_read_known_private_tag_explicit_no_lookup", "tests/test_dataelem.py::TestDataElementValidation::test_...
["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
16
60
1,273
0
0.6
1
0.75
1
0.2655
81.0715
6,198
swe_smith::train::7091
swe_smith
train
7,091
cantools__cantools.0c6a7871.combine_file__wgij3822
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
DBC file loading broken - AttributeError when reading files #### Description When trying to load DBC files using `add_dbc_file()` or `add_dbc()`, I'm getting an AttributeError saying `'NoneType' object has no attribute 'read'`. This seems to affect all DBC file operations. #### Steps/Code to Reproduce ```python imp...
diff --git a/src/cantools/database/can/database.py b/src/cantools/database/can/database.py index 6637d58..3bd01eb 100644 --- a/src/cantools/database/can/database.py +++ b/src/cantools/database/can/database.py @@ -276,11 +276,15 @@ class Database: """ - self.add_dbc_string(fp.read()) + dbc_con...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_database.py::CanToolsDatabaseTest::test_add_two_dbc_files", "tests/test_database.py::CanToolsDatabaseTest::test_big_endian_no_decode_choices", "tests/test_database.py::CanToolsDatabaseTest::test_emc32", "tests/test_database.py::CanToolsDa...
["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
22
51
1,153
0
0.6
1
0.75
1
0.2655
81.0715
6,199
swe_smith::train::35779
swe_smith
train
35,779
stanfordnlp__dspy.651a4c71.func_pm_remove_cond__qlbjsg41
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Cache key generation fails in request_cache decorator ## Description I found an issue with the `request_cache` decorator in `dspy/clients/cache.py`. The decorator is trying to use a variable `modified_request` that is no longer defined after recent changes. When using any cached LM or embedding functionality, the ...
diff --git a/dspy/clients/cache.py b/dspy/clients/cache.py index d3bad50..34dcd41 100644 --- a/dspy/clients/cache.py +++ b/dspy/clients/cache.py @@ -199,18 +199,6 @@ def request_cache( def process_request(args, kwargs): # Use fully qualified function name for uniqueness fn_identifier ...
["tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/caching/test_litellm_cache.py::test_lm_calls_are_cached_across_lm_instances", "tests/caching/test_litellm_cache.py::test_lm_calls_are_cached_in_memory_when_expected", "tests/caching/test_litellm_...
["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_sync_call", "tests/adapters/test_json_adapter.py::test_json_adapter_async_call", "tests/adapters/test_json_adapter.py::test_js...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
14
28
1,313
0
0.6
1
0.75
1
0.2655
81.0715