selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
7,200
swe_smith::train::20620
swe_smith
train
20,620
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__cys9cf3u
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Parser error handling broken after recent changes #### Description The parser's `raise_error` method is not working correctly. When parsing invalid SQL, the parser fails with a `NameError` instead of properly handling the error. #### Steps/Code to Reproduce ```python import sqlglot from sqlglot import parse_one fro...
diff --git a/sqlglot/parser.py b/sqlglot/parser.py index 248a128..98ca493 100644 --- a/sqlglot/parser.py +++ b/sqlglot/parser.py @@ -1594,16 +1594,15 @@ class Parser(metaclass=_Parser): ) def raise_error(self, message: str, token: t.Optional[Token] = None) -> None: - """ - Appends an e...
["tests/dialects/test_bigquery.py::TestBigQuery::test_errors", "tests/dialects/test_bigquery.py::TestBigQuery::test_json_object", "tests/dialects/test_clickhouse.py::TestClickhouse::test_cte", "tests/dialects/test_databricks.py::TestDatabricks::test_databricks", "tests/dialects/test_dialect.py::TestDialect::test_alias"...
["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
45
841
0
0.6
1
0.75
1
0.230167
80.9655
7,201
swe_smith::train::2730
swe_smith
train
2,730
cknd__stackprinter.219fcc52.func_pm_ctrl_shuffle__mqsew38u
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
# UnboundLocalError when formatting stack frames I'm trying to use stackprinter to format error messages, but I'm running into an issue where it fails with an UnboundLocalError. ## Steps to reproduce Here's a simple script that demonstrates the issue: ```python import stackprinter def some_function(): # This w...
diff --git a/stackprinter/frame_formatting.py b/stackprinter/frame_formatting.py index 136920e..6a6d144 100644 --- a/stackprinter/frame_formatting.py +++ b/stackprinter/frame_formatting.py @@ -134,9 +134,6 @@ class FrameFormatter(): raise def _format_frame(self, fi): - msg = self.headline_tpl...
["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting"]
["tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
true
null
1
7
2
1,240
0
0.6
1
0.75
1
0.23
80.965
7,202
swe_smith::train::44994
swe_smith
train
44,994
mahmoud__glom.fb3c4e76.func_pm_remove_assign__dtum1eln
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
Dictionary matching broken after recent changes #### Description Dictionary matching in glom appears to be broken. When using `Match` with dictionary specs, the matching logic fails to properly handle key-value pairs and throws various errors. #### Steps/Code to Reproduce ```python from glom import glom, Match, A, ...
diff --git a/glom/matching.py b/glom/matching.py index 798ac40..ab10c5d 100644 --- a/glom/matching.py +++ b/glom/matching.py @@ -683,19 +683,16 @@ def _handle_dict(target, spec, scope): key for key in spec_keys if _precedence(key) == 0 and type(key) is not Optional or type(key) is Required} -...
["glom/test/test_match.py::test_basic", "glom/test/test_match.py::test_precedence", "glom/test/test_match.py::test_cruddy_json", "glom/test/test_match.py::test_sample", "glom/test/test_match.py::test_json_ref", "glom/test/test_match.py::test_nested_struct", "glom/test/test_match.py::test_check_ported_tests", "glom/test...
["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
10
8
1,180
0
0.6
1
0.75
1
0.23
80.965
7,203
swe_smith::train::29583
swe_smith
train
29,583
django__channels.a144b4b8.func_basic__ggx8uh26
swesmith/django__channels.a144b4b8
django/channels
python
null
InMemoryChannelLayer initialization swaps expiry and capacity parameters Description When creating an InMemoryChannelLayer instance, the expiry and capacity parameters are being swapped during initialization. Additionally, the channels and groups attributes are incorrectly initialized as lists instead of dictionaries...
diff --git a/channels/layers.py b/channels/layers.py index 5fc53f7..e77192c 100644 --- a/channels/layers.py +++ b/channels/layers.py @@ -220,14 +220,14 @@ class InMemoryChannelLayer(BaseChannelLayer): **kwargs, ): super().__init__( - expiry=expiry, - capacity=capacity, + ...
["tests/test_generic_websocket.py::test_websocket_consumer_groups", "tests/test_generic_websocket.py::test_async_websocket_consumer_groups", "tests/test_generic_websocket.py::test_async_websocket_consumer_specific_channel_layer", "tests/test_generic_websocket.py::test_block_underscored_type_function_call", "tests/test_...
["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_generic_websocket.py::test_websocket...
jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8
true
null
1
10
17
1,180
0
0.6
1
0.75
1
0.23
80.965
7,204
swe_smith::train::47098
swe_smith
train
47,098
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__1dq43chg
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
`name_asyncgen` function returns undefined variable when async generator lacks `__qualname__` #### Description The `name_asyncgen` function in `_util.py` has a bug where it tries to return an undefined variable `qualname` when an async generator doesn't have the `__qualname__` attribute. This causes a `NameError` whe...
diff --git a/src/trio/_util.py b/src/trio/_util.py index 994a465..23d763a 100644 --- a/src/trio/_util.py +++ b/src/trio/_util.py @@ -328,21 +328,20 @@ class NoPublicConstructor(ABCMeta): def name_asyncgen(agen: AsyncGeneratorType[object, NoReturn]) -> str: - """Return the fully-qualified name of the async gener...
["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...
["src/trio/_core/_tests/test_exceptiongroup_gc.py::test_concat_tb", "src/trio/_core/_tests/test_exceptiongroup_gc.py::test_ExceptionGroup_catch_doesnt_create_cyclic_garbage", "src/trio/_core/_tests/test_guest_mode.py::test_guest_trivial", "src/trio/_core/_tests/test_guest_mode.py::test_guest_can_do_io", "src/trio/_core...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
13
15
1,120
0
0.6
1
0.75
1
0.23
80.965
7,205
swe_smith::train::30119
swe_smith
train
30,119
getnikola__nikola.0f4c230e.func_pm_remove_wrapper__rmdo0kkh
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
Theme loading fails with TypeError when invalid theme specified #### Description When an invalid theme is specified in the configuration, Nikola crashes with a `TypeError: 'NoneType' object is not iterable` instead of gracefully falling back to the default theme. #### Steps/Code to Reproduce ```python from nikola i...
diff --git a/nikola/nikola.py b/nikola/nikola.py index 6f80377..7f1d852 100644 --- a/nikola/nikola.py +++ b/nikola/nikola.py @@ -1335,15 +1335,6 @@ class Nikola(object): def _get_themes(self): if self._THEMES is None: - try: - self._THEMES = utils.get_theme_chain(self.config['T...
["tests/test_path_handlers.py::test_render_taxonomies_permalink[authors-base:]", "tests/test_path_handlers.py::test_render_taxonomies_permalink[authors-base:blog]", "tests/test_path_handlers.py::test_render_taxonomies_permalink[authors-base:path/with/trailing/slash/]", "tests/test_path_handlers.py::test_render_taxonomi...
["tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org]", "tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org:1234/blog]", "tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org:3456/blog/]", "tests/integration/test_dev_server...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
10
20
1,180
0
0.6
1
0.75
1
0.23
80.965
7,206
swe_smith::train::30955
swe_smith
train
30,955
mido__mido.a0158ff9.lm_rewrite__a6z2jqfa
swesmith/mido__mido.a0158ff9
mido/mido
python
null
# MIDI port meta message with length 0 causes IndexError I've encountered an issue when working with MIDI files that contain meta messages with port information that have a length of 0. ## Reproduction ```python from mido import MidiFile, MidiTrack, MetaMessage # Create a MIDI file with a port meta message with emp...
diff --git a/mido/midifiles/meta.py b/mido/midifiles/meta.py index 0a7e2ba..5bfa6d5 100644 --- a/mido/midifiles/meta.py +++ b/mido/midifiles/meta.py @@ -271,13 +271,7 @@ class MetaSpec_midi_port(MetaSpec): defaults = [0] def decode(self, message, data): - if len(data) == 0: - # Message wit...
["../dev/tests/midifiles/test_midifiles.py::test_meta_messages_with_length_0"]
["../dev/tests/test_frozen.py::test_hashability", "../dev/tests/test_frozen.py::test_freeze_and_thaw", "../dev/tests/test_frozen.py::test_thawed_message_is_copy", "../dev/tests/test_frozen.py::test_is_frozen", "../dev/tests/test_frozen.py::test_frozen_repr", "../dev/tests/test_frozen.py::test_frozen_meta_repr", "../dev...
jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9
true
null
1
8
1
1,220
0
0.6
1
0.75
1
0.23
80.965
7,207
swe_smith::train::47288
swe_smith
train
47,288
python-trio__trio.cfbbe2c1.lm_rewrite__o14ukjf3
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
# wrap_file doesn't validate file object attributes ## Description At this line: https://github.com/python-trio/trio/blob/master/src/trio/_file_io.py#L500 The `wrap_file` function no longer validates that the file object has the required methods before wrapping it. This looks like a bug as the validation code has be...
diff --git a/src/trio/_file_io.py b/src/trio/_file_io.py index 5a612ff..45de24f 100644 --- a/src/trio/_file_io.py +++ b/src/trio/_file_io.py @@ -483,7 +483,7 @@ async def open_file( return _file -def wrap_file(file: FileT) -> AsyncIOWrapper[FileT]: +def wrap_file(file: FileT) ->AsyncIOWrapper[FileT]: """T...
["src/trio/_tests/test_file_io.py::test_wrap_invalid", "src/trio/_tests/test_file_io.py::test_wrap_non_iobase"]
["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
14
2
1,099
0
0.6
1
0.75
1
0.229833
80.9645
7,208
swe_smith::train::39377
swe_smith
train
39,377
pallets__jinja.ada0a9a6.func_pm_ctrl_invert_if__aczqowmi
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Template error debugging broken when no traceback available #### Description When template errors occur without an existing traceback context, the debug information is not properly populated, causing template locals to be empty instead of containing the expected context variables. #### Steps/Code to Reproduce ```py...
diff --git a/src/jinja2/debug.py b/src/jinja2/debug.py index f85a319..ee9ab88 100644 --- a/src/jinja2/debug.py +++ b/src/jinja2/debug.py @@ -89,12 +89,12 @@ def fake_traceback( # type: ignore :param lineno: The line number in the template source. """ if tb is not None: + locals = {} + else: ...
["tests/test_core_tags.py::TestForLoop::test_loop_unassignable", "tests/test_core_tags.py::TestMacros::test_arguments_defaults_nonsense", "tests/test_core_tags.py::TestMacros::test_caller_defaults_nonsense", "tests/test_core_tags.py::TestSet::test_set_invalid", "tests/test_debug.py::TestDebug::test_syntax_error", "test...
["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
7
42
1,239
0
0.6
1
0.75
1
0.229833
80.9645
7,209
swe_smith::train::2949
swe_smith
train
2,949
madzak__python-json-logger.5f85723f.func_pm_ctrl_shuffle__p79tpe0r
swesmith/madzak__python-json-logger.5f85723f
madzak/python-json-logger
python
null
JsonFormatter fails with UnboundLocalError when using format strings #### Description When using JsonFormatter with format strings, the formatter raises an `UnboundLocalError` because `formatter_style_pattern` is referenced before assignment. #### Steps/Code to Reproduce ```python import logging from pythonjsonlogg...
diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py index 519a64d..301b77a 100644 --- a/src/pythonjsonlogger/jsonlogger.py +++ b/src/pythonjsonlogger/jsonlogger.py @@ -184,6 +184,11 @@ class JsonFormatter(logging.Formatter): This method is responsible for returning a list of fi...
["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg...
["tests/test_jsonlogger.py::TestJsonLogger::test_merge_record_extra"]
jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f
true
null
1
11
19
1,159
0
0.6
1
0.75
1
0.229833
80.9645
7,210
swe_smith::train::51564
swe_smith
train
51,564
pydicom__pydicom.7d361b3d.combine_file__xmr6nn9b
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Dictionary lookup fails for repeater tags with incorrect mask handling #### Description When looking up DICOM tags that should match repeater patterns (tags with 'x' wildcards), the dictionary lookup is failing due to incorrect handling of the mask matching logic. #### Steps/Code to Reproduce ```python from pydicom...
diff --git a/src/pydicom/datadict.py b/src/pydicom/datadict.py index b4f9f3a..b820a56 100644 --- a/src/pydicom/datadict.py +++ b/src/pydicom/datadict.py @@ -260,19 +260,14 @@ def get_entry(tag: TagType) -> tuple[str, str, str, str, str]: get_private_entry Return an entry from the private dictionary. ...
["tests/test_charset.py::TestCharset::test_charset_patient_names[chrJapMulti-\\u3084\\u307e\\u3060^\\u305f\\u308d\\u3046]", "tests/test_charset.py::TestCharset::test_charset_patient_names[chrJapMultiExplicitIR6-\\u3084\\u307e\\u3060^\\u305f\\u308d\\u3046]", "tests/test_charset.py::TestCharset::test_charset_patient_name...
["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
13
25
1,119
0
0.6
1
0.75
1
0.229833
80.9645
7,211
swe_smith::train::48333
swe_smith
train
48,333
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__002tlo1s
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
## UnboundLocalError in prune_options function #### Description The `prune_options` function in `match_algorithms.py` raises an `UnboundLocalError` when trying to access variables that were removed during code cleanup. The function references `available_options` and `matched` variables that are no longer defined at t...
diff --git a/src/sqlfluff/core/parser/match_algorithms.py b/src/sqlfluff/core/parser/match_algorithms.py index aa6ef41..d88f8dd 100644 --- a/src/sqlfluff/core/parser/match_algorithms.py +++ b/src/sqlfluff/core/parser/match_algorithms.py @@ -88,8 +88,6 @@ def prune_options( Works in the context of a grammar making ...
["test/core/parser/match_algorithms_test.py::test__parser__algorithms__trim_to_terminator[raw_segments0-target_words0-2]", "test/core/parser/match_algorithms_test.py::test__parser__algorithms__trim_to_terminator[raw_segments1-target_words1-0]", "test/core/parser/match_algorithms_test.py::test__parser__algorithms__trim_...
["test/core/parser/match_algorithms_test.py::test__parser__algorithms__next_match[matcher_keywords0-result_slice0-bar]", "test/core/parser/match_algorithms_test.py::test__parser__algorithms__next_match[matcher_keywords1-result_slice1-foo]", "test/core/parser/match_algorithms_test.py::test__parser__algorithms__next_matc...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
9
3
1,199
0
0.6
1
0.75
1
0.229833
80.9645
7,212
r2e_gym::train::4473
r2e_gym
train
4,473
numpy__8ea9e8bf13e4292d02e9ea5af2f4d10c07e02459
numpy
numpy/numpy
python
8ea9e8bf13e4292d02e9ea5af2f4d10c07e02459
**Title:** `histogram2d` and `histogramdd` Raise TypeError When Using `density` Argument **Description:** When using the `density` parameter with `numpy.histogram2d` or `numpy.histogramdd`, a `TypeError` is raised indicating that the function does not recognize the `density` keyword argument. This prevents users from ...
diff --git a/doc/release/1.15.0-notes.rst b/doc/release/1.15.0-notes.rst --- a/doc/release/1.15.0-notes.rst +++ b/doc/release/1.15.0-notes.rst @@ -278,6 +278,12 @@ indicate that the range for the corresponding axis should be computed from the data. Previously, this could not be specified on a per-axis basis. +The n...
diff --git a/numpy/lib/tests/test_histograms.py b/numpy/lib/tests/test_histograms.py --- a/numpy/lib/tests/test_histograms.py +++ b/numpy/lib/tests/test_histograms.py @@ -535,13 +535,13 @@ # Check normalization ed = [[-2, 0, 2], [0, 1, 2, 3], [0, 1, 2, 3]] - H, edges = histogramdd(x, bins=ed,...
null
null
namanjain12/numpy_final:8ea9e8bf13e4292d02e9ea5af2f4d10c07e02459
true
null
3
46
null
1,171
0
0.75
1
0.6375
1
0.3485
80.96425
7,213
swe_smith::train::44453
swe_smith
train
44,453
pydata__patsy.a5d16484.func_pm_remove_cond__mw2f51wr
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
NameError: name 'fi' is not defined in design_matrix_builders #### Description When calling functions that use `design_matrix_builders`, I'm getting a `NameError: name 'fi' is not defined`. This seems to happen when trying to build design matrices with various formulas. #### Steps/Code to Reproduce ```python import...
diff --git a/patsy/build.py b/patsy/build.py index cbe2524..00bfd4d 100644 --- a/patsy/build.py +++ b/patsy/build.py @@ -750,24 +750,6 @@ def design_matrix_builders(termlists, data_iter_maker, eval_env, NA_action="drop # how to turn any given factor into a chunk of data: factor_infos = {} for factor in a...
["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.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy_thoroughly", "patsy/test_build.py::test_data_...
["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
19
32
998
0
0.6
1
0.75
1
0.229667
80.964
7,214
swe_smith::train::43977
swe_smith
train
43,977
pydata__patsy.a5d16484.func_basic__bzj7efpy
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
PatsyError message and origin attributes swapped Description When creating a PatsyError with both message and origin parameters, the message and origin attributes get swapped - the message becomes the origin and the origin becomes the message. Steps/Code to Reproduce ```python from patsy import PatsyError from pats...
diff --git a/patsy/__init__.py b/patsy/__init__.py index 50431ec..93a29cd 100644 --- a/patsy/__init__.py +++ b/patsy/__init__.py @@ -46,9 +46,10 @@ class PatsyError(Exception): def __init__(self, message, origin=None): Exception.__init__(self, message) - self.message = message - self.origi...
["patsy/build.py::test__examine_factor_types", "patsy/constraint.py::test_eval_errors", "patsy/desc.py::test_eval_formula_error_reporting", "patsy/missing.py::test_NAAction_raise", "patsy/parse_formula.py::test_parse_errors", "patsy/parse_formula.py::test_parse_extra_op", "patsy/test_highlevel.py::test_evalfactor_rerai...
["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/builtins.py::test_...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
7
8
1,238
0
0.6
1
0.75
1
0.229667
80.964
7,215
swe_smith::train::26466
swe_smith
train
26,466
pylint-dev__astroid.b114f6b5.func_pm_remove_cond__zr3h00oz
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Dataclass __init__ generation broken after recent changes #### Description The dataclass brain module is failing to generate proper `__init__` methods for dataclasses. When trying to infer the `__init__` method of a dataclass, it's throwing `NameError` exceptions for undefined variables like `init_var`, `assignment_s...
diff --git a/astroid/brain/brain_dataclasses.py b/astroid/brain/brain_dataclasses.py index 92d983e..641807d 100644 --- a/astroid/brain/brain_dataclasses.py +++ b/astroid/brain/brain_dataclasses.py @@ -260,9 +260,6 @@ def _generate_dataclass_init( continue if not additional_assign.decorator...
["tests/brain/test_builtin.py::TestStringNodes::test_string_format_in_dataclass_pylint8109", "tests/brain/test_dataclasses.py::test_inference_attribute_no_default[dataclasses]", "tests/brain/test_dataclasses.py::test_inference_attribute_no_default[pydantic.dataclasses]", "tests/brain/test_dataclasses.py::test_inference...
["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
16
69
1,058
0
0.6
1
0.75
1
0.229667
80.964
7,216
swe_smith::train::7756
swe_smith
train
7,756
cantools__cantools.0c6a7871.func_basic__tvrqmijj
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Tester Message periodic task not updating when _periodic_task is None #### Description When using the cantools tester with periodic messages, the message data is not being updated properly. The periodic task modification seems to be inverted - it only tries to modify data when the periodic task is None instead of whe...
diff --git a/src/cantools/tester.py b/src/cantools/tester.py index c2ad9f2..4773878 100644 --- a/src/cantools/tester.py +++ b/src/cantools/tester.py @@ -249,13 +249,13 @@ class Message(UserDict): extended_id = self.database.is_extended_frame pruned_data = self.database.gather_signals(self.data) ...
["tests/test_tester.py::CanToolsTesterTest::test_bad_message_name", "tests/test_tester.py::CanToolsTesterTest::test_enable_disable", "tests/test_tester.py::CanToolsTesterTest::test_expect", "tests/test_tester.py::CanToolsTesterTest::test_flush_input", "tests/test_tester.py::CanToolsTesterTest::test_on_message", "tests/...
["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
10
9
1,178
0
0.6
1
0.75
1
0.229667
80.964
7,217
swe_smith::train::20527
swe_smith
train
20,527
tobymao__sqlglot.036601ba.func_pm_ctrl_invert_if__wi79fx88
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
@null_if_any decorator breaks when required parameters are specified #### Description The `@null_if_any` decorator in `sqlglot/executor/env.py` is not working correctly when specific required parameters are provided. Functions decorated with `@null_if_any("param1", "param2")` are not properly checking for null values...
diff --git a/sqlglot/executor/env.py b/sqlglot/executor/env.py index c6c8ee0..996e629 100644 --- a/sqlglot/executor/env.py +++ b/sqlglot/executor/env.py @@ -49,6 +49,10 @@ def null_if_any(*required): def decorator(func): if required: + + def predicate(*args): + return any(a is ...
["tests/test_executor.py::TestExecutor::test_execute_tpcds", "tests/test_executor.py::TestExecutor::test_execute_tpch", "tests/test_executor.py::TestExecutor::test_scalar_functions", "tests/test_executor.py::TestExecutor::test_set_operations"]
["tests/test_executor.py::TestExecutor::test_agg_order", "tests/test_executor.py::TestExecutor::test_aggregate_without_group_by", "tests/test_executor.py::TestExecutor::test_case_sensitivity", "tests/test_executor.py::TestExecutor::test_correlated_count", "tests/test_executor.py::TestExecutor::test_execute_callable", "...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
10
4
1,178
0
0.6
1
0.75
1
0.229667
80.964
7,218
swe_smith::train::8108
swe_smith
train
8,108
cantools__cantools.0c6a7871.func_pm_remove_cond__3poi9esg
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Message initialization fails with AttributeError for _comments attribute #### Description When creating Message objects, the initialization process fails with an AttributeError indicating that the '_comments' attribute doesn't exist. This affects message loading from database files and prevents proper message instant...
diff --git a/src/cantools/database/can/message.py b/src/cantools/database/can/message.py index 942b2cc..654b2b8 100644 --- a/src/cantools/database/can/message.py +++ b/src/cantools/database/can/message.py @@ -86,16 +86,6 @@ class Message: ) -> None: frame_id_bit_length = frame_id.bit_length()...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source", "tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_bit_fields", "tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_data...
["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
18
72
1,018
0
0.6
1
0.75
1
0.229667
80.964
7,219
swe_smith::train::6476
swe_smith
train
6,476
mahmoud__boltons.3bfcfdd0.func_pm_remove_cond__cjhkz40y
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
Bits constructor fails with non-integer input types #### Description The Bits class constructor no longer accepts string, list, or bytes input after recent changes. All non-integer inputs now cause a TypeError. #### Steps/Code to Reproduce ```python from boltons.mathutils import Bits # These should work but now fa...
diff --git a/boltons/mathutils.py b/boltons/mathutils.py index 1367a54..3329881 100644 --- a/boltons/mathutils.py +++ b/boltons/mathutils.py @@ -138,34 +138,12 @@ class Bits: __slots__ = ('val', 'len') def __init__(self, val=0, len_=None): - if type(val) is not int: - if type(val) is list:...
["tests/test_mathutils.py::test_bits"]
["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
22
1
938
0
0.6
1
0.75
1
0.229667
80.964
7,220
swe_smith::train::25033
swe_smith
train
25,033
pylint-dev__astroid.b114f6b5.combine_file__dju7odgi
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Property inference fails when caller is not None #### Description When trying to infer properties in certain contexts, the inference fails with a TypeError instead of properly raising an InferenceError. This happens when the property is accessed in specific code structures like try/except blocks or if statements. ##...
diff --git a/astroid/objects.py b/astroid/objects.py index 9f638d4..b4c5d71 100644 --- a/astroid/objects.py +++ b/astroid/objects.py @@ -235,7 +235,7 @@ class ExceptionInstance(bases.Instance): @cached_property def special_attributes(self): - qname = self.qname() + qname = self.qname().lower()...
["tests/brain/test_brain.py::TestFunctoolsPartial::test_inferred_partial_function_calls", "tests/brain/test_brain.py::test_oserror_model", "tests/test_object_model.py::ExceptionModelTest::test_import_error", "tests/test_object_model.py::ExceptionModelTest::test_syntax_error", "tests/test_object_model.py::ExceptionModel...
["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
8
7
1,217
0
0.6
1
0.75
1
0.2295
80.9635
7,221
swe_smith::train::20714
swe_smith
train
20,714
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__tb772fal
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnboundLocalError in merge_subqueries optimizer when processing JOIN clauses #### Description The merge_subqueries optimizer is throwing an `UnboundLocalError: local variable 'joins' referenced before assignment` when processing queries with JOIN clauses. This appears to be affecting multiple optimization scenarios. ...
diff --git a/sqlglot/optimizer/merge_subqueries.py b/sqlglot/optimizer/merge_subqueries.py index 14ecde6..3ee0c18 100644 --- a/sqlglot/optimizer/merge_subqueries.py +++ b/sqlglot/optimizer/merge_subqueries.py @@ -277,14 +277,12 @@ def _merge_joins(outer_scope: Scope, inner_scope: Scope, from_or_join: FromOrJoi """...
["tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", "tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch"]
["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
7
4
1,237
0
0.6
1
0.75
1
0.2295
80.9635
7,222
swe_smith::train::49445
swe_smith
train
49,445
mozilla__bleach.73871d76.func_pm_ctrl_shuffle__sb01nfsp
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
URL parsing fails with UnboundLocalError when processing netloc #### Description When processing URLs with certain netloc patterns, the URL parser raises an `UnboundLocalError` for the variable `n`. This appears to happen during the netloc validation process. #### Steps/Code to Reproduce ```python import bleach # ...
diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py index ac6e7a9..6b20396 100644 --- a/bleach/_vendor/parse.py +++ b/bleach/_vendor/parse.py @@ -395,23 +395,22 @@ def _splitnetloc(url, start=0): return url[start:delim], url[delim:] # return (domain, rest) def _checknetloc(netloc): - if not netl...
["tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_disallowed_attr", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_invalid_filter_attr", "tests/test_clean.py::test_poster_attribute", "tests/test_clean.py::test_attributes_wildcard", "tests/test_clean.p...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
17
24
1,037
0
0.6
1
0.75
1
0.2295
80.9635
7,223
swe_smith::train::12816
swe_smith
train
12,816
python-openxml__python-docx.0cf6d71f.combine_file__cn9bvgsu
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Image.from_file() fails with string paths and incorrect scaling behavior #### Description When using `Image.from_file()` with string paths, the method fails because it's checking for `bytes` instead of `str`. Additionally, there are issues with dimension scaling where width calculation is missing and filename handlin...
diff --git a/src/docx/image/image.py b/src/docx/image/image.py index 0022b5b..b8ecbab 100644 --- a/src/docx/image/image.py +++ b/src/docx/image/image.py @@ -36,18 +36,18 @@ class Image: def from_file(cls, image_descriptor: str | IO[bytes]): """Return a new |Image| subclass instance loaded from the image f...
["tests/image/test_image.py::DescribeImage::it_can_construct_from_an_image_path", "tests/image/test_image.py::DescribeImage::it_can_construct_from_an_image_file_like", "tests/image/test_image.py::DescribeImage::it_can_scale_its_dimensions[scale_fixture2]", "tests/image/test_image.py::DescribeBaseImageHeader::it_defines...
["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
16
4
1,057
0
0.6
1
0.75
1
0.2295
80.9635
7,224
swe_smith::train::25567
swe_smith
train
25,567
pylint-dev__astroid.b114f6b5.func_basic__bybfyvn1
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
getattr() inference broken - passes wrong argument to igetattr #### Description The `getattr()` builtin function inference is broken and produces AttributeError when trying to access attributes on objects. The issue appears to be in the argument handling where the wrong parameter is being passed to the `igetattr` met...
diff --git a/astroid/brain/brain_builtin_inference.py b/astroid/brain/brain_builtin_inference.py index a56b152..dc35068 100644 --- a/astroid/brain/brain_builtin_inference.py +++ b/astroid/brain/brain_builtin_inference.py @@ -552,20 +552,20 @@ def infer_getattr(node, context: InferenceContext | None = None): """ ...
["tests/test_inference.py::GetattrTest::test_attribute_missing", "tests/test_inference.py::GetattrTest::test_default", "tests/test_inference.py::GetattrTest::test_lambda", "tests/test_inference.py::GetattrTest::test_lookup"]
["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
16
4
1,057
0
0.6
1
0.75
1
0.2295
80.9635
7,225
swe_smith::train::4903
swe_smith
train
4,903
bottlepy__bottle.a8dfef30.func_pm_class_rm_funcs__3qzaxe1t
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
WSGIHeaderDict missing __getitem__ method breaks header access When trying to access headers through WSGIHeaderDict using bracket notation, a TypeError is raised because the `__getitem__` method is missing. #### Steps/Code to Reproduce ```python import bottle from bottle import WSGIHeaderDict # Create a simple WSGI...
diff --git a/bottle.py b/bottle.py index 286b5bc..7a0d966 100755 --- a/bottle.py +++ b/bottle.py @@ -2306,15 +2306,6 @@ class WSGIHeaderDict(DictMixin): """ Return the header value as is (may be bytes or unicode). """ return self.environ.get(self._ekey(key), default) - def __getitem__(self, key):...
["test/test_environ.py::TestRequest::test_header_access", "test/test_environ.py::TestRequest::test_header_access_special", "test/test_environ.py::TestWSGIHeaderDict::test_bytes", "test/test_environ.py::TestWSGIHeaderDict::test_dict", "test/test_environ.py::TestWSGIHeaderDict::test_empty", "test/test_environ.py::TestWSG...
["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
10
8
1,177
0
0.6
1
0.75
1
0.2295
80.9635
7,226
swe_smith::train::24218
swe_smith
train
24,218
sunpy__sunpy.f8edfd5c.func_pm_remove_assign__cck3bwsu
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
make_fitswcs_header missing required metadata after recent changes #### Description The `make_fitswcs_header` function is failing to generate complete FITS WCS headers. When trying to create headers for map reprojection, the function raises `KeyError: 'cdelt2'` indicating that essential WCS metadata is missing from t...
diff --git a/sunpy/map/header_helper.py b/sunpy/map/header_helper.py index 4b12bc6..b722c8b 100644 --- a/sunpy/map/header_helper.py +++ b/sunpy/map/header_helper.py @@ -109,14 +109,11 @@ def make_fitswcs_header(data, if hasattr(data, "unit"): if unit is None: - unit = data.unit + p...
["sunpy/map/tests/test_header_helper.py::test_scale_conversion", "sunpy/map/tests/test_header_helper.py::test_default_rotation", "sunpy/map/tests/test_header_helper.py::test_rotation_angle", "sunpy/map/tests/test_header_helper.py::test_rotation_angle_rectangular_pixels", "sunpy/map/tests/test_header_helper.py::test_ins...
["sunpy/map/tests/test_header_helper.py::test_rotation_matrix"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
6
19
1,257
0
0.6
1
0.75
1
0.2295
80.9635
7,227
r2e_gym::train::6302
r2e_gym
train
6,302
pillow__7c0554c74e449fd3a7d34dc4349837f325ee0f4b
pillow
python-pillow/pillow
python
7c0554c74e449fd3a7d34dc4349837f325ee0f4b
**Title:** `ImageGrab.grabclipboard` Not Implemented on macOS **Description:** After updating to the latest version of Pillow, attempting to use the `ImageGrab.grabclipboard` method on macOS results in a `NotImplementedError`. This prevents users from accessing clipboard images on OS X, a functionality that was previo...
diff --git a/PIL/ImageGrab.py b/PIL/ImageGrab.py --- a/PIL/ImageGrab.py +++ b/PIL/ImageGrab.py @@ -18,31 +18,46 @@ from PIL import Image import sys -if sys.platform != "win32": - raise ImportError("ImageGrab is Windows only") +if sys.platform not in ["win32", "darwin"]: + raise ImportError("ImageGrab is OS X ...
diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -37,11 +37,12 @@ exception = e # Assert - if sys.platform == 'win32': + if sys.platform in ["win32", "darwin"]: self.assertIsNone(exception, No...
null
null
namanjain12/pillow_final:7c0554c74e449fd3a7d34dc4349837f325ee0f4b
true
null
2
61
null
869
0
0.75
1
0.6375
1
0.348167
80.96325
7,228
swe_smith::train::33310
swe_smith
train
33,310
pallets__click.fde47b4b.combine_file__3lobcdsk
swesmith/pallets__click.fde47b4b
pallets/click
python
null
LazyFile and open_file functions broken after recent changes #### Description The `LazyFile` class and `open_file` function are not working correctly. When trying to open files, they either return `None` instead of file objects or raise unexpected errors about atomic writes. #### Steps/Code to Reproduce ```python i...
diff --git a/src/click/utils.py b/src/click/utils.py index ab2fe58..27b97ac 100644 --- a/src/click/utils.py +++ b/src/click/utils.py @@ -38,10 +38,9 @@ def safecall(func: t.Callable[P, R]) -> t.Callable[P, R | None]: def wrapper(*args: P.args, **kwargs: P.kwargs) -> R | None: try: - return fu...
["tests/test_arguments.py::test_file_args", "tests/test_arguments.py::test_file_atomics", "tests/test_basic.py::test_file_option", "tests/test_basic.py::test_file_lazy_mode", "tests/test_commands.py::test_custom_parser", "tests/test_shell_completion.py::test_files_closed", "tests/test_termui.py::test_file_prompt_defaul...
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
1
25
15
876
0
0.6
1
0.75
1
0.229333
80.963
7,229
swe_smith::train::39277
swe_smith
train
39,277
pallets__jinja.ada0a9a6.func_basic__x04r6nwx
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
OverlayScope visitor incorrectly processes child nodes #### Description When using overlay scopes in Jinja2 templates, the FrameSymbolVisitor incorrectly processes child nodes instead of skipping them as intended. This causes issues with variable scoping and context handling in overlay scope extensions. #### Steps/C...
diff --git a/src/jinja2/idtracking.py b/src/jinja2/idtracking.py index d6cb635..8d7b5d6 100644 --- a/src/jinja2/idtracking.py +++ b/src/jinja2/idtracking.py @@ -316,3 +316,10 @@ class FrameSymbolVisitor(NodeVisitor): def visit_OverlayScope(self, node: nodes.OverlayScope, **kwargs: t.Any) -> None: """Do ...
["tests/test_ext.py::TestAutoEscape::test_overlay_scopes"]
["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
7
1
1,236
0
0.6
1
0.75
1
0.229333
80.963
7,230
swe_smith::train::21793
swe_smith
train
21,793
life4__textdistance.c3aca916.combine_file__fvw0hl05
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
Normalized distance calculation returns incorrect values #### Description The normalized distance calculation is producing incorrect results. When comparing identical strings, the normalized distance should be 0, but it's returning 1 instead. Additionally, there are issues with division by zero errors occurring in va...
diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py index 5ce8cc7..dc675d1 100644 --- a/textdistance/algorithms/base.py +++ b/textdistance/algorithms/base.py @@ -45,9 +45,9 @@ class Base: """Get distance from 0 to 1 """ maximum = self.maximum(*sequences) - if...
["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati...
["tests/test_common.py::test_normalization_range[alg21]", "tests/test_common.py::test_normalization_by_one[alg21]", "tests/test_common.py::test_normalization_same[alg21]", "tests/test_common.py::test_normalization_monotonic[alg21]", "tests/test_common.py::test_no_common_chars[alg1]", "tests/test_common.py::test_no_comm...
jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916
true
null
1
16
135
1,056
0
0.6
1
0.75
1
0.229333
80.963
7,231
swe_smith::train::5296
swe_smith
train
5,296
PyCQA__flake8.cf1542ce.combine_module__6s6gtqrd
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
# Incorrect parameter order in PluginExecutionFailed.__str__ causes confusing error messages ## Description When a plugin fails during execution, Flake8 shows an error message that is incorrectly formatted. The parameters in the `PluginExecutionFailed.__str__` method are passed in the wrong order, causing confusing e...
diff --git a/src/flake8/exceptions.py b/src/flake8/exceptions.py index 18646e7..b7d2823 100644 --- a/src/flake8/exceptions.py +++ b/src/flake8/exceptions.py @@ -72,7 +72,7 @@ class PluginExecutionFailed(Flake8Exception): def __str__(self) -> str: """Format our exception message.""" return self.FO...
["tests/unit/plugins/pycodestyle_test.py::test_up_to_date", "tests/unit/test_file_checker.py::test_raises_exception_on_failed_plugin"]
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker....
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
2
10
2
1,175
0
0.6
1
0.75
1
0.229167
80.9625
7,232
swe_smith::train::14404
swe_smith
train
14,404
python-openxml__python-docx.0cf6d71f.lm_rewrite__tqnjolr8
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
### Bug: Unable to Retrieve Latent Style by Name #### Description I've encountered an issue when trying to access latent styles by name using dictionary-style access. The method seems to fail when the style name is not directly found in the list of latent styles. This behavior is unexpected and inconsistent with the ...
diff --git a/src/docx/styles/latent.py b/src/docx/styles/latent.py index c9db62f..058d8d6 100644 --- a/src/docx/styles/latent.py +++ b/src/docx/styles/latent.py @@ -11,12 +11,10 @@ class LatentStyles(ElementProxy): def __getitem__(self, key): """Enables dictionary-style access to a latent style by name....
["tests/styles/test_latent.py::DescribeLatentStyles::it_can_get_a_latent_style_by_name[getitem_fixture1]", "tests/styles/test_latent.py::DescribeLatentStyles::it_can_get_a_latent_style_by_name[getitem_fixture2]"]
["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
10
2
1,175
0
0.6
1
0.75
1
0.229167
80.9625
7,233
swe_smith::train::35342
swe_smith
train
35,342
alecthomas__voluptuous.a7a55f83.func_pm_class_rm_funcs__343vqr11
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
Marker classes not callable after removing __call__ method #### Description When using Marker classes like Required, Optional, Remove, etc., they are no longer callable and raise AttributeError. This breaks basic schema validation functionality. #### Steps/Code to Reproduce ```python from voluptuous import Schema, ...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..632c055 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -964,14 +964,6 @@ class Marker(object): self.description = description self.__hash__ = cache(lambda: hash(schema_)) # type: i...
["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_remove", "voluptuous/tests/tests.py::test_remove_with_error", "voluptuous/tests/tests.py::test_copy_dict_undefined", "voluptuous/tests/tests.py::tes...
["voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests.py::test_in", "voluptuous/tests/tests.py::test_in_unsortable_container", "voluptuous/tests/tests.py::test_not_in", "voluptuous/tests/tests...
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
true
null
1
9
18
1,195
0
0.6
1
0.75
1
0.229167
80.9625
7,234
swe_smith::train::38343
swe_smith
train
38,343
burnash__gspread.a8be3b96.func_pm_remove_cond__w100gkok
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
Worksheet find/findall methods broken with regex patterns #### Description The `find()` and `findall()` methods on worksheets are throwing `UnboundLocalError` when using compiled regex patterns as the query parameter. #### Steps/Code to Reproduce ```python import gspread import re # Authenticate and open a spreads...
diff --git a/gspread/worksheet.py b/gspread/worksheet.py index 883e3a2..d435239 100644 --- a/gspread/worksheet.py +++ b/gspread/worksheet.py @@ -2262,19 +2262,7 @@ class Worksheet: else: return x.value.casefold() == str_query.casefold() - elif isinstance(query, re.Pattern)...
["tests/worksheet_test.py::WorksheetTest::test_find", "tests/worksheet_test.py::WorksheetTest::test_findall"]
["tests/cell_test.py::CellTest::test_a1_value", "tests/cell_test.py::CellTest::test_define_named_range", "tests/cell_test.py::CellTest::test_delete_named_range", "tests/cell_test.py::CellTest::test_equality", "tests/cell_test.py::CellTest::test_merge_cells", "tests/cell_test.py::CellTest::test_numeric_value", "tests/ce...
jyangballin/swesmith.x86_64.burnash_1776_gspread.a8be3b96
true
null
1
12
2
1,135
0
0.6
1
0.75
1
0.229167
80.9625
7,235
swe_smith::train::36122
swe_smith
train
36,122
borntyping__python-colorlog.dfa10f59.func_basic__4thfkp1e
swesmith/borntyping__python-colorlog.dfa10f59
borntyping/python-colorlog
python
null
# basicConfig in colorlog fails with IndexError I found an issue with the `basicConfig` function in colorlog. When trying to use it, I get an IndexError. ## Reproduction Here's a simple script that demonstrates the issue: ```python import colorlog # Configure colorlog colorlog.basicConfig() # Try to log something...
diff --git a/colorlog/wrappers.py b/colorlog/wrappers.py index e05756f..ce9485c 100644 --- a/colorlog/wrappers.py +++ b/colorlog/wrappers.py @@ -46,26 +46,25 @@ __all__ = ( def basicConfig( style: colorlog.formatter._FormatStyle = "%", log_colors: typing.Optional[colorlog.formatter.LogColors] = None, - re...
["colorlog/tests/test_wrappers.py::test_colorlog_module", "colorlog/tests/test_wrappers.py::test_colorlog_basicConfig"]
["colorlog/tests/test_colorlog.py::test_colored_formatter", "colorlog/tests/test_colorlog.py::test_custom_colors", "colorlog/tests/test_colorlog.py::test_reset", "colorlog/tests/test_colorlog.py::test_no_reset", "colorlog/tests/test_colorlog.py::test_secondary_colors", "colorlog/tests/test_colorlog.py::test_some_second...
jyangballin/swesmith.x86_64.borntyping_1776_python-colorlog.dfa10f59
true
null
1
19
2
995
0
0.6
1
0.75
1
0.229167
80.9625
7,236
swe_smith::train::36538
swe_smith
train
36,538
lincolnloop__python-qrcode.456b01d4.combine_module__kmwmfwj7
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
QR code generation fails with UnboundLocalError for back_color and fill_color #### Description When generating QR codes using the PIL image factory, the code raises an `UnboundLocalError` because `back_color` and `fill_color` variables are referenced before being assigned. #### Steps/Code to Reproduce ```python imp...
diff --git a/qrcode/image/pil.py b/qrcode/image/pil.py index 57ee13a..895fabd 100644 --- a/qrcode/image/pil.py +++ b/qrcode/image/pil.py @@ -13,11 +13,8 @@ class PilImage(qrcode.image.base.BaseImage): if not Image: raise ImportError("PIL library not found.") - back_color = kwargs.get("bac...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode_pil.py::test_render_pil", "qrcode/tests/test_qrcode_pil.py::test_render_pil_background[TransParent]", "qrcode/tests/test_qrcode_pil.py::test_render_pil_background[red]", "qrcode/tests/test_qrcode_pil.py::test_render_pil_background[back_color2]", "...
["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_add_qrdata", "qrcode/tests/test_qrcode.py::test...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
2
27
15
834
0
0.6
1
0.75
1
0.229
80.962
7,237
swe_smith::train::23962
swe_smith
train
23,962
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__9ahozyt3
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
NameError when calling peek() on empty TimeSeries #### Description When calling `peek()` on an empty TimeSeries object, a `UnboundLocalError` is raised instead of the expected `ValueError`. This happens because the matplotlib import was moved after the columns validation, but the variable `plt` is referenced before t...
diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py index 80e5d20..945e2b4 100644 --- a/sunpy/timeseries/timeseriesbase.py +++ b/sunpy/timeseries/timeseriesbase.py @@ -716,23 +716,22 @@ class GenericTimeSeries: return axes def _setup_axes_columns(self, axes, columns, *, ...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_empty_ts_invalid_peek"]
["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
11
1
1,154
0
0.6
1
0.75
1
0.229
80.962
7,238
swe_smith::train::39896
swe_smith
train
39,896
tornadoweb__tornado.d5ac65c1.func_pm_remove_cond__i896s7p8
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
Template whitespace handling broken when no loader provided #### Description When creating a Template without a loader and without explicitly setting the whitespace parameter, the template fails to render properly. The whitespace parameter ends up being None, causing an assertion error during template compilation. #...
diff --git a/tornado/template.py b/tornado/template.py index 0064c6f..11eb9a5 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -287,21 +287,11 @@ class Template: Added ``whitespace`` parameter; deprecated ``compress_whitespace``. """ self.name = escape.native_str(name) - - ...
["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
48
1,114
0
0.6
1
0.75
1
0.229
80.962
7,239
swe_smith::train::13966
swe_smith
train
13,966
python-openxml__python-docx.0cf6d71f.func_basic__tl423tbn
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
InlineShapes indexing broken after recent changes #### Description The indexed access to inline shapes is not working correctly. When trying to access inline shapes by index, the wrong shape is returned and the error handling is also broken. #### Steps/Code to Reproduce ```python from docx import Document # Create...
diff --git a/src/docx/shape.py b/src/docx/shape.py index cd35deb..35cea80 100644 --- a/src/docx/shape.py +++ b/src/docx/shape.py @@ -28,12 +28,12 @@ class InlineShapes(Parented): def __getitem__(self, idx: int): """Provide indexed access, e.g. 'inline_shapes[idx]'.""" try: - inline = s...
["tests/test_shape.py::DescribeInlineShapes::it_provides_indexed_access_to_inline_shapes", "tests/test_shape.py::DescribeInlineShapes::it_raises_on_indexed_access_out_of_range"]
["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
6
2
1,254
0
0.6
1
0.75
1
0.229
80.962
7,240
swe_smith::train::31977
swe_smith
train
31,977
davidhalter__parso.338a5760.func_basic__i6kbfic6
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
DiffParser returns integer instead of node when getting old line statement When using the DiffParser to analyze code changes, the `_get_old_line_stmt` method is returning an integer `0` instead of a proper node object or `None`. This causes AttributeError when trying to access node attributes. #### Steps/Code to Repr...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..bb615f4 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -390,19 +390,16 @@ class DiffParser: def _get_old_line_stmt(self, old_line): leaf = self._module.get_leaf_for_position((old_line, 0), include_prefixes=True) - ...
["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", "test/test_diff_parser.py::test_for_on_one_line", "test/test_diff_pa...
["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
13
75
1,114
0
0.6
1
0.75
1
0.229
80.962
7,241
swe_smith::train::39325
swe_smith
train
39,325
pallets__jinja.ada0a9a6.func_basic__zh9v4tti
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Block references broken with incorrect attribute assignment #### Description Template block references are not working correctly due to incorrect attribute assignment in the BlockReference constructor. When using `super()` in template blocks or accessing block references, the name and context attributes are swapped, ...
diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py index 9dcc9d4..4d4d9fb 100644 --- a/src/jinja2/runtime.py +++ b/src/jinja2/runtime.py @@ -351,10 +351,10 @@ class BlockReference: stack: t.List[t.Callable[["Context"], t.Iterator[str]]], depth: int, ) -> None: - self.name = name - ...
["tests/test_async.py::test_async_blocks[asyncio]", "tests/test_async.py::test_async_blocks[trio]", "tests/test_inheritance.py::TestInheritance::test_super", "tests/test_inheritance.py::TestInheritance::test_reuse_blocks", "tests/test_inheritance.py::TestInheritance::test_preserve_blocks", "tests/test_inheritance.py::T...
["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
8
6
1,214
0
0.6
1
0.75
1
0.229
80.962
7,242
r2e_gym::train::6109
r2e_gym
train
6,109
pillow__2df28a6601bf5890f1eb2232755afb5062d84c5d
pillow
python-pillow/pillow
python
2df28a6601bf5890f1eb2232755afb5062d84c5d
**Title:** PNG Saving Incorrectly Orders iCCP Chunk After PLTE **Description:** When saving a PNG image with an embedded ICC profile, the `iCCP` chunk is written after the `PLTE` chunk. According to the PNG specification, the `iCCP` chunk should appear before the `PLTE` chunk. This incorrect ordering causes tests that...
diff --git a/PIL/PngImagePlugin.py b/PIL/PngImagePlugin.py --- a/PIL/PngImagePlugin.py +++ b/PIL/PngImagePlugin.py @@ -715,6 +715,32 @@ b'\0', # 11: filter category b'\0') # 12: interlace flag + chunks = [b"cHRM", b"gAMA", b"sBIT",...
diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -394,8 +394,8 @@ self.assertIsInstance(im.info["Text"], str) def test_unicode_text(self): - # Check preservation of non-ASCII characters on Python3 - # This cannot real...
null
null
namanjain12/pillow_final:2df28a6601bf5890f1eb2232755afb5062d84c5d
true
null
1
43
null
1,226
0
0.75
1
0.6375
1
0.347667
80.96175
7,243
swe_smith::train::27100
swe_smith
train
27,100
tkrajina__gpxpy.09fc46b3.func_pm_ctrl_invert_if__0xob9sr9
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX parsing fails with TypeError when using gpx_fields_from_xml Description When parsing GPX files, the `gpx_fields_from_xml` function is incorrectly handling class vs instance parameters, causing a TypeError when trying to call GPX objects as if they were constructors. Steps/Code to Reproduce ```python import gpxp...
diff --git a/gpxpy/gpxfield.py b/gpxpy/gpxfield.py index e253df3..5e1b30d 100644 --- a/gpxpy/gpxfield.py +++ b/gpxpy/gpxfield.py @@ -558,9 +558,9 @@ def gpx_fields_to_xml(instance: Any, tag: str, version: str, custom_attributes: def gpx_fields_from_xml(class_or_instance: Any, node: str, version: str) -> Any: if...
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_missing_elevations_without_ele", "test.py::GPXTests::test_add_missing_times_2", "test.py::GPXTests::test_clone_and_smooth", "test.py::GPXTests::test_course_between", "test.py::GPXTests::test_creator_field", "test.py::GPXTests::test_dilutions",...
["test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_add_missing_elevations", "test.py::GPXTests::tes...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
23
89
913
0
0.6
1
0.75
1
0.228833
80.9615
7,244
swe_smith::train::32082
swe_smith
train
32,082
davidhalter__parso.338a5760.func_basic__y4k5skag
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Diff parser returns wrong number of copied nodes When using the diff parser, the `copy_nodes` method is returning an incorrect count of copied nodes. Instead of returning the actual list of new nodes, it's returning the length of the list, which breaks code that expects to work with the actual node objects. #### Step...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..63a68e0 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -690,16 +690,14 @@ class _NodesTree: Returns the number of tree nodes that were copied. """ - if tree_nodes[0].type in ('error_leaf', 'error_node'): ...
["test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_parser.py::test_one_statement_func", "test/test_diff_parser.py::test_for_on_one_line", "test/test_diff_parser.py::test_open_parentheses", "test/test_...
["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
52
1,133
0
0.6
1
0.75
1
0.228833
80.9615
7,245
swe_smith::train::21994
swe_smith
train
21,994
life4__textdistance.c3aca916.func_pm_ctrl_shuffle__kevadfj5
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
Prefix algorithm throws UnboundLocalError when called #### Description The Prefix algorithm in textdistance is throwing an `UnboundLocalError: local variable 'test' referenced before assignment` when trying to compute distances or similarities. #### Steps/Code to Reproduce ```python import textdistance # Create a ...
diff --git a/textdistance/algorithms/simple.py b/textdistance/algorithms/simple.py index 28f8948..e1e051b 100644 --- a/textdistance/algorithms/simple.py +++ b/textdistance/algorithms/simple.py @@ -24,22 +24,21 @@ class Prefix(_BaseSimilarity): self.sim_test = sim_test or self._ident def __call__(self, *...
["tests/test_common.py::test_normalization_range[alg18]", "tests/test_common.py::test_normalization_range[alg19]", "tests/test_common.py::test_normalization_by_one[alg18]", "tests/test_common.py::test_normalization_by_one[alg19]", "tests/test_common.py::test_normalization_same[alg18]", "tests/test_common.py::test_norma...
["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati...
jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916
true
null
1
15
14
1,073
0
0.6
1
0.75
1
0.228833
80.9615
7,246
swe_smith::train::5157
swe_smith
train
5,157
agronholm__exceptiongroup.0b4f4937.func_pm_ctrl_invert_if__dy3b9wmo
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
Exception group formatting shows truncation message instead of exceptions when max_group_width exceeded #### Description When formatting exception groups that exceed the `max_group_width` limit, the formatter incorrectly displays a truncation message ("and X more exceptions") instead of showing the actual exceptions....
diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py index 4c52d77..c8f4d10 100644 --- a/src/exceptiongroup/_formatting.py +++ b/src/exceptiongroup/_formatting.py @@ -247,9 +247,6 @@ class PatchedTracebackException(traceback.TracebackException): yield from _ctx.emit(ex...
["tests/test_formatting.py::test_exceptionhook", "tests/test_formatting.py::test_exceptiongroup_as_cause", "tests/test_formatting.py::test_exceptiongroup_loop", "tests/test_formatting.py::test_exceptionhook_format_exception_only", "tests/test_formatting.py::test_format_exception[patched-newstyle]", "tests/test_formatti...
["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
11
16
1,153
0
0.6
1
0.75
1
0.228833
80.9615
7,247
swe_smith::train::22510
swe_smith
train
22,510
tweepy__tweepy.91a41c6e.func_pm_remove_assign__s1sbi3bk
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
AttributeError when accessing certain Tweet attributes Description It seems that accessing certain attributes of a Tweet object is causing an AttributeError. Specifically, when trying to retrieve attributes like `bookmarks`, `home_timeline`, `liked_tweets`, `list_tweets`, `quote_tweets`, `tweet`, `tweets`, `users_men...
diff --git a/tweepy/tweet.py b/tweepy/tweet.py index e6947d1..800111a 100644 --- a/tweepy/tweet.py +++ b/tweepy/tweet.py @@ -163,9 +163,7 @@ class Tweet(HashableID, DataMapping): self.id = int(data["id"]) self.text = data["text"] try: - self.edit_history_tweet_ids = list( - ...
["tests/test_asyncclient.py::TweepyAsyncClientTests::test_bookmarks", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_get_home_timeline", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_get_liked_tweets", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_get_list_tweets", "tests/test_asyncclien...
["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
20
22
973
0
0.6
1
0.75
1
0.228833
80.9615
7,248
swe_smith::train::26405
swe_smith
train
26,405
pylint-dev__astroid.b114f6b5.func_pm_remove_cond__6yyymb1k
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
ClassDef slots iteration broken for string and dict slots #### Description When a class defines `__slots__` as a string constant or dictionary, the slots iteration in ClassDef fails with a NameError. #### Steps/Code to Reproduce ```python import astroid # Test with string slots code1 = ''' class A: __slots__ =...
diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index 99ed796..9724000 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -2707,23 +2707,9 @@ class ClassDef( continue else: ...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_mul...
["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest:...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
15
88
1,073
0
0.6
1
0.75
1
0.228833
80.9615
7,249
swe_smith::train::36605
swe_smith
train
36,605
lincolnloop__python-qrcode.456b01d4.func_basic__e6nqtvbt
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
QR code generation fails with IndexError: list index out of range #### Description When generating QR codes, the library throws an `IndexError: list index out of range` during the mask pattern evaluation process. This affects all QR code generation operations. #### Steps/Code to Reproduce ```python import qrcode q...
diff --git a/qrcode/util.py b/qrcode/util.py index 02fe11d..9da2522 100644 --- a/qrcode/util.py +++ b/qrcode/util.py @@ -269,10 +269,6 @@ def _lost_point_level2(modules, modules_count): def _lost_point_level3(modules, modules_count): - # 1 : 1 : 3 : 1 : 1 ratio (dark:light:dark:light:dark) pattern in - # row...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_fit", "qrcode/tests/test_qrcode.py::test_mode_number", "qrcode/tests/test_qrcode.py::test_mode_alpha", "qrcode/tests/test_qrcode.py::test_regression_mode_comma", "qrcode/tests/test_qrcode.py::tes...
["qrcode/tests/test_qrcode.py::test_basic", "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_add_qrdata", "qrcode/tests/test_qrcode.py::test_make_image_with_wrong_pattern", "qrcode/te...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
27
53
833
0
0.6
1
0.75
1
0.228833
80.9615
7,250
swe_smith::train::43142
swe_smith
train
43,142
gawel__pyquery.811cd048.func_pm_ctrl_invert_if__7it9jtmf
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
html() method returns None when called without arguments on empty PyQuery object #### Description When calling the `html()` method without arguments on an empty PyQuery object, it should return `None`, but instead it's trying to execute the setter logic and raising a `ValueError`. #### Steps/Code to Reproduce ```py...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..3ac7bba 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -1093,19 +1093,6 @@ class PyQuery(list): <div><span>Youhou !</span></div> """ if value is no_default: - if not self: - return N...
["README.rst::README.rst", "docs/manipulating.rst::manipulating.rst", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.html", "tests/test_pyquery.py::TestUnicode::test_unicode", "tests/test_pyquery.py::TestCallback::test_S_this_inside_callback", "tests/test_pyquery.py::TestCallback::test_parameterless_callback", "tests/tes...
["docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselectpatch.JQueryTranslator.xpath_button_pseudo", "pyquery/cssselectpatch...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
27
17
833
0
0.6
1
0.75
1
0.228833
80.9615
7,251
swe_smith::train::33474
swe_smith
train
33,474
pallets__click.fde47b4b.func_basic__543c0152
swesmith/pallets__click.fde47b4b
pallets/click
python
null
Shell completion broken with empty string arguments #### Description Shell completion is failing when encountering empty string arguments. The completion system appears to be incorrectly handling empty values, causing IndexError exceptions when trying to access string indices. #### Steps/Code to Reproduce ```python...
diff --git a/src/click/shell_completion.py b/src/click/shell_completion.py index c8655b1..5e4f139 100644 --- a/src/click/shell_completion.py +++ b/src/click/shell_completion.py @@ -498,11 +498,11 @@ def _is_incomplete_argument(ctx: Context, param: Parameter) -> bool: def _start_of_option(ctx: Context, value: str) ->...
["tests/test_shell_completion.py::test_command", "tests/test_shell_completion.py::test_group", "tests/test_shell_completion.py::test_chained", "tests/test_shell_completion.py::test_argument_order", "tests/test_shell_completion.py::test_argument_default", "tests/test_shell_completion.py::test_type_choice", "tests/test_s...
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
1
8
29
1,213
0
0.6
1
0.75
1
0.228833
80.9615
7,252
swe_smith::train::20706
swe_smith
train
20,706
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__rq4xvhqf
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnboundLocalError in qualify_columns optimizer when using REPLACE clause #### Description When using the REPLACE clause in SQL queries, the column qualification optimizer throws an `UnboundLocalError: local variable 'columns' referenced before assignment`. This happens because the `columns` variable is being referenc...
diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py index 3ab987d..59c6618 100644 --- a/sqlglot/optimizer/qualify_columns.py +++ b/sqlglot/optimizer/qualify_columns.py @@ -744,6 +744,9 @@ def _add_rename_columns( def _add_replace_columns( expression: exp.Expression, tables, re...
["tests/test_optimizer.py::TestOptimizer::test_file_schema", "tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", "tests/test_optimizer.py::TestOptimizer::test_no_pseudocolumn_expansion", "tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_pushdown_projecti...
["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
7
12
1,232
0
0.6
1
0.75
1
0.228667
80.961
7,253
swe_smith::train::48207
swe_smith
train
48,207
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__c9g34jpy
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
JinjaTemplater fails with NameError on loader_search_path variable #### Description The JinjaTemplater is throwing a `NameError` when trying to access the `loader_search_path` variable. This appears to be happening because the variable is being referenced before it's defined in the `_get_jinja_env` method. #### Step...
diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py index 934ded3..4b80dd7 100644 --- a/src/sqlfluff/core/templaters/jinja.py +++ b/src/sqlfluff/core/templaters/jinja.py @@ -341,6 +341,11 @@ class JinjaTemplater(PythonTemplater): ) def _get_jinja_env(self, conf...
["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]", "...
["test/core/templaters/jinja_test.py::test_dummy_undefined_fail_with_undefined_error", "test/core/templaters/jinja_test.py::test_undefined_magic_methods"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
19
73
992
0
0.6
1
0.75
1
0.228667
80.961
7,254
swe_smith::train::35354
swe_smith
train
35,354
alecthomas__voluptuous.a7a55f83.func_pm_ctrl_invert_if__912c5oe8
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
Schema.extend() fails when extending with duplicate keys #### Description When using `Schema.extend()` to merge schemas that contain duplicate keys, the method raises a `KeyError` instead of properly handling the key replacement or merging logic. #### Steps/Code to Reproduce ```python from voluptuous import Schema,...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..e657c09 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -716,24 +716,20 @@ class Schema(object): # if the key is already in the dictionary, we need to replace it # transform ...
["voluptuous/tests/tests.py::test_schema_extend", "voluptuous/tests/tests.py::test_schema_extend_overrides", "voluptuous/tests/tests.py::test_subschema_extension", "voluptuous/tests/tests.py::test_schema_extend_handles_schema_subclass"]
["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests....
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
true
null
1
15
4
1,072
0
0.6
1
0.75
1
0.228667
80.961
7,255
swe_smith::train::24304
swe_smith
train
24,304
sunpy__sunpy.f8edfd5c.func_pm_remove_cond__7xnh7g6n
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
MapSequence.plot() fails with TypeError when plot_function is None #### Description When calling `plot()` on a MapSequence without providing a custom plot_function, the method fails with a TypeError indicating that 'NoneType' object is not callable. #### Steps/Code to Reproduce ```python import sunpy.map from sunpy...
diff --git a/sunpy/map/mapsequence.py b/sunpy/map/mapsequence.py index c875ad6..ba6a32d 100644 --- a/sunpy/map/mapsequence.py +++ b/sunpy/map/mapsequence.py @@ -336,10 +336,6 @@ class MapSequence: """ axes = self[0]._check_axes(axes) fig = axes.get_figure() - - if not plot_function: - ...
["sunpy/map/tests/test_mapsequence.py::test_mapsequence_plot_uint8_norm", "sunpy/map/tests/test_mapsequence.py::test_mapsequence_plot_uint8_norm_clip_interval", "sunpy/map/tests/test_mapsequence.py::test_mapsequence_plot_set_norm_pass_vmin_vmax"]
["sunpy/map/tests/test_mapsequence.py::test_deprecations", "sunpy/map/tests/test_mapsequence.py::test_as_array_different_shapes", "sunpy/map/tests/test_mapsequence.py::test_as_array_no_masks", "sunpy/map/tests/test_mapsequence.py::test_as_array_all_masks", "sunpy/map/tests/test_mapsequence.py::test_as_array_some_masks"...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
11
3
1,152
0
0.6
1
0.75
1
0.228667
80.961
7,256
swe_smith::train::51747
swe_smith
train
51,747
pydicom__pydicom.7d361b3d.func_basic__4e9n8xj8
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Decoder raises ValueError for valid frames with correct byte length #### Description The pixel decoder is incorrectly raising a ValueError when decoding frames that have the expected number of bytes. The error message indicates an "unexpected number of bytes" even when the actual and expected byte counts match. ####...
diff --git a/src/pydicom/pixels/decoders/base.py b/src/pydicom/pixels/decoders/base.py index 268f0d4..dca0cf6 100644 --- a/src/pydicom/pixels/decoders/base.py +++ b/src/pydicom/pixels/decoders/base.py @@ -1382,7 +1382,7 @@ class Decoder(CoderBase): if index is not None: frame = runner.decode(index...
["tests/pixels/test_decoder_base.py::TestDecoder::test_buffer"]
["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
10
1
1,172
0
0.6
1
0.75
1
0.228667
80.961
7,257
swe_smith::train::2917
swe_smith
train
2,917
seatgeek__thefuzz.8a05a3ee.lm_rewrite__8m940ky9
swesmith/seatgeek__thefuzz.8a05a3ee
seatgeek/thefuzz
python
null
String processing fails with tuple input Description When trying to use process.extract with a tuple that has been converted to a string, the function fails with a TypeError. In the following example code, the query is a string representation of a tuple, and the choices list contains a tuple: ```python query = str(...
diff --git a/thefuzz/process.py b/thefuzz/process.py index bdfe900..dd4eea0 100644 --- a/thefuzz/process.py +++ b/thefuzz/process.py @@ -18,24 +18,22 @@ def _get_processor(processor, scorer): function passed into process.* while rapidfuzz only runs the one passed into process.*. This function wraps the proces...
["test_thefuzz.py::ProcessTest::testIssue57", "test_thefuzz.py::TestCodeFormat::test_pep8_conformance"]
["test_thefuzz.py::StringProcessingTest::test_dont_condense_whitespace", "test_thefuzz.py::StringProcessingTest::test_replace_non_letters_non_numbers_with_whitespace", "test_thefuzz.py::UtilsTest::test_ascii_only", "test_thefuzz.py::UtilsTest::test_fullProcess", "test_thefuzz.py::UtilsTest::test_fullProcessForceAscii",...
jyangballin/swesmith.x86_64.seatgeek_1776_thefuzz.8a05a3ee
true
null
1
26
2
852
0
0.6
1
0.75
1
0.228667
80.961
7,258
swe_smith::train::51218
swe_smith
train
51,218
marshmallow-code__apispec.8b421526.func_basic__x3mz7kug
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
Components subsection mapping broken for schemas and security schemes #### Description When using the Components class, schema and security scheme registration is not working correctly. Schemas are not being properly stored in the schemas collection, and security scheme duplicate detection is failing. #### Steps/Cod...
diff --git a/src/apispec/core.py b/src/apispec/core.py index e9ccb40..75e0fa7 100644 --- a/src/apispec/core.py +++ b/src/apispec/core.py @@ -59,15 +59,15 @@ class Components: self.examples_lazy: dict[str, dict] = {} self._subsections = { - "schema": self.schemas, + "schema": se...
["tests/test_core.py::TestComponents::test_schema_duplicate_name[2.0]", "tests/test_core.py::TestComponents::test_schema_duplicate_name[3.0.0]", "tests/test_core.py::TestComponents::test_security_scheme_duplicate_name[2.0]", "tests/test_core.py::TestComponents::test_security_scheme_duplicate_name[3.0.0]", "tests/test_e...
["tests/test_core.py::TestAPISpecInit::test_raises_wrong_apispec_version", "tests/test_core.py::TestMetadata::test_openapi_metadata[2.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata[3.0.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestTags::test_tag[...
jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526
true
null
1
6
36
1,252
0
0.6
1
0.75
1
0.228667
80.961
7,259
swe_smith::train::19197
swe_smith
train
19,197
seperman__deepdiff.ed252022.func_pm_remove_assign__29dh73rm
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
NameError when using ignore_order with iterable comparison #### Description When using `ignore_order=True` with DeepDiff, a `NameError` is raised due to undefined variables in the comparison logic. This affects various scenarios including lists, nested structures, and custom comparison functions. #### Steps/Code to ...
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..033aaaf 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -1185,7 +1185,6 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): Perhaps in future we can have a report key that is item duplicated and modified instead of ju...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_overlap", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.csv-t2.csv-args4-0]", "tests/test_delt...
["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
12
112
1,131
0
0.6
1
0.75
1
0.2285
80.9605
7,260
swe_smith::train::5074
swe_smith
train
5,074
agronholm__exceptiongroup.0b4f4937.combine_file__bld28s29
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
Exception formatting broken with incorrect indentation and module name display #### Description Exception group formatting is producing incorrect output with malformed indentation and missing dots in module names when displaying tracebacks. #### Steps/Code to Reproduce ```python from exceptiongroup import Exception...
diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py index 4c52d77..b377903 100644 --- a/src/exceptiongroup/_formatting.py +++ b/src/exceptiongroup/_formatting.py @@ -49,7 +49,7 @@ class _ExceptionPrintContext: self.need_close = False def indent(self): - return " " *...
["tests/test_formatting.py::test_exceptionhook", "tests/test_formatting.py::test_exceptiongroup_as_cause", "tests/test_formatting.py::test_exceptiongroup_loop", "tests/test_formatting.py::test_exceptionhook_format_exception_only", "tests/test_formatting.py::test_formatting_syntax_error", "tests/test_formatting.py::test...
["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
10
20
1,171
0
0.6
1
0.75
1
0.2285
80.9605
7,261
swe_smith::train::7957
swe_smith
train
7,957
cantools__cantools.0c6a7871.func_pm_ctrl_shuffle__cd4jsy0h
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Tester Message initialization fails with UnboundLocalError #### Description When creating a Tester Message object, the `_prepare_initial_signal_values` method fails with an `UnboundLocalError` because `initial_sig_values` is referenced before assignment. #### Steps/Code to Reproduce ```python import cantools # Loa...
diff --git a/src/cantools/tester.py b/src/cantools/tester.py index c2ad9f2..6939638 100644 --- a/src/cantools/tester.py +++ b/src/cantools/tester.py @@ -259,13 +259,6 @@ class Message(UserDict): self._periodic_task.modify_data(self._can_message) def _prepare_initial_signal_values(self): - ini...
["tests/test_tester.py::CanToolsTesterTest::test_bad_message_name", "tests/test_tester.py::CanToolsTesterTest::test_enable_disable", "tests/test_tester.py::CanToolsTesterTest::test_expect", "tests/test_tester.py::CanToolsTesterTest::test_flush_input", "tests/test_tester.py::CanToolsTesterTest::test_on_message", "tests/...
["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
15
9
1,071
0
0.6
1
0.75
1
0.2285
80.9605
7,262
swe_smith::train::2108
swe_smith
train
2,108
pdfminer__pdfminer.six.1a8bd2f7.func_basic__9mz98oqd
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDF color space handling broken when no colorspace specified #### Description When processing PDFs with color operations but no explicit colorspace, the interpreter incorrectly handles the `scn` (set color for nonstroking operations) command. This causes failures when extracting text or images from certain PDF files....
diff --git a/pdfminer/pdfinterp.py b/pdfminer/pdfinterp.py index ae1c46a..7fd5e33 100644 --- a/pdfminer/pdfinterp.py +++ b/pdfminer/pdfinterp.py @@ -685,12 +685,12 @@ class PDFPageInterpreter: def do_scn(self) -> None: """Set color for nonstroking operations""" - if self.ncs: + if not self...
["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::test_issue_566_cid_range", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cmap_bytes", "tests/test_tools_pd...
["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
6
8
1,251
0
0.6
1
0.75
1
0.2285
80.9605
7,263
swe_smith::train::20613
swe_smith
train
20,613
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__c0gl7qdw
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnboundLocalError in merge_subqueries optimizer when removing CTEs #### Description The merge_subqueries optimizer is throwing an `UnboundLocalError` when trying to access variables `cte` and `with_` before they are defined. The variables are being used before assignment in the `_pop_cte` function. #### Steps/Code t...
diff --git a/sqlglot/optimizer/merge_subqueries.py b/sqlglot/optimizer/merge_subqueries.py index 14ecde6..1733704 100644 --- a/sqlglot/optimizer/merge_subqueries.py +++ b/sqlglot/optimizer/merge_subqueries.py @@ -400,15 +400,15 @@ def _merge_hints(outer_scope: Scope, inner_scope: Scope) -> None: def _pop_cte(inner...
["tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", "tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch"]
["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
4
1,091
0
0.6
1
0.75
1
0.2285
80.9605
7,264
swe_smith::train::52351
swe_smith
train
52,351
pydicom__pydicom.7d361b3d.func_pm_class_rm_funcs__evzj3e8k
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
CoderBase missing is_encapsulated and missing_dependencies properties #### Description After recent changes, the `CoderBase` class is missing the `is_encapsulated` and `missing_dependencies` properties that are expected by the decoder/encoder system. This causes `AttributeError` when trying to access these properties...
diff --git a/src/pydicom/pixels/common.py b/src/pydicom/pixels/common.py index 10a4a93..97e1aa5 100644 --- a/src/pydicom/pixels/common.py +++ b/src/pydicom/pixels/common.py @@ -144,13 +144,6 @@ class CoderBase: return bool(self._available) - @property - def is_encapsulated(self) -> bool: - """...
["tests/pixels/test_common.py::TestCoderBase::test_init", "tests/pixels/test_common.py::TestCoderBase::test_missing_dependencies", "tests/pixels/test_common.py::TestCoderBase::test_validate_plugins", "tests/pixels/test_decoder_base.py::TestDecoder::test_init", "tests/pixels/test_decoder_base.py::TestDecoder::test_prope...
["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
24
9
891
0
0.6
1
0.75
1
0.2285
80.9605
7,265
swe_smith::train::26295
swe_smith
train
26,295
pylint-dev__astroid.b114f6b5.func_pm_ctrl_shuffle__mklt4v79
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
UnboundLocalError in _object_type_is_subclass when checking type relationships #### Description When using `isinstance` or `issubclass` with type objects, an `UnboundLocalError` is raised for the variable `class_seq`. This affects basic type checking operations that should work correctly. #### Steps/Code to Reproduc...
diff --git a/astroid/helpers.py b/astroid/helpers.py index ea7523b..00223e9 100644 --- a/astroid/helpers.py +++ b/astroid/helpers.py @@ -118,12 +118,6 @@ def _object_type_is_subclass( obj_type, nodes.ClassDef ): return util.Uninferable - - # Instances are not types - class_seq = [ - ...
["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
13
33
1,111
0
0.6
1
0.75
1
0.2285
80.9605
7,266
swe_smith::train::26475
swe_smith
train
26,475
pylint-dev__astroid.b114f6b5.func_pm_remove_loop__5rcm3eey
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Slice inference accepts invalid arguments #### Description The slice inference function is not properly validating arguments, allowing invalid slice parameters to be processed without raising inference errors. #### Steps/Code to Reproduce ```python import astroid # These should raise InferenceError but don't code ...
diff --git a/astroid/brain/brain_builtin_inference.py b/astroid/brain/brain_builtin_inference.py index a56b152..79c9558 100644 --- a/astroid/brain/brain_builtin_inference.py +++ b/astroid/brain/brain_builtin_inference.py @@ -699,13 +699,6 @@ def infer_slice(node, context: InferenceContext | None = None): infer_f...
["tests/test_inference.py::SliceTest::test_slice_inference_error"]
["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
8
1
1,211
0
0.6
1
0.75
1
0.2285
80.9605
7,267
swe_smith::train::31591
swe_smith
train
31,591
benoitc__gunicorn.bacbf8aa.func_pm_class_rm_funcs__o9a7btn5
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Message.should_close() method missing after refactor #### Description After a recent code change, the `should_close()` method has been removed from the `Message` class in `gunicorn/http/message.py`. This method was used to determine whether an HTTP connection should be closed based on the Connection header and HTTP v...
diff --git a/gunicorn/http/message.py b/gunicorn/http/message.py index 59ce0bf..e4af60a 100644 --- a/gunicorn/http/message.py +++ b/gunicorn/http/message.py @@ -226,20 +226,6 @@ class Message: else: self.body = Body(EOFReader(self.unreader)) - def should_close(self): - if self.must_clo...
["tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_10.http]", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_09.http]", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_12.http]", "tests/test_inva...
["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
14
48
1,091
0
0.6
1
0.75
1
0.2285
80.9605
7,268
swe_smith::train::26606
swe_smith
train
26,606
pylint-dev__astroid.b114f6b5.lm_rewrite__o34rhsg3
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
**KW_ONLY Sentinel Not Recognized in Dataclasses** **Describe the bug** When using the `KW_ONLY` sentinel in dataclasses, it appears that the sentinel is not being correctly recognized, leading to unexpected behavior. This issue seems to occur when attempting to infer the sentinel type, resulting in an `AssertionError...
diff --git a/astroid/brain/brain_dataclasses.py b/astroid/brain/brain_dataclasses.py index 92d983e..afc8e66 100644 --- a/astroid/brain/brain_dataclasses.py +++ b/astroid/brain/brain_dataclasses.py @@ -560,17 +560,18 @@ def _is_class_var(node: nodes.NodeNG) -> bool: return getattr(inferred, "name", "") == "ClassVar...
["tests/brain/test_dataclasses.py::test_kw_only_sentinel"]
["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
13
1
1,111
0
0.6
1
0.75
1
0.2285
80.9605
7,269
swe_smith::train::34954
swe_smith
train
34,954
pyutils__line_profiler.a646bf0f.combine_module__zapa662j
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
String concatenation operator error in util_static.py When using the line profiler with certain module path configurations, I'm getting a TypeError related to string operations. It seems like there's an issue with string concatenation in the `_syspath_modname_to_modpath` function. #### Steps/Code to Reproduce The er...
diff --git a/line_profiler/autoprofile/ast_profle_transformer.py b/line_profiler/autoprofile/ast_profle_transformer.py index 06772ab..9132491 100644 --- a/line_profiler/autoprofile/ast_profle_transformer.py +++ b/line_profiler/autoprofile/ast_profle_transformer.py @@ -119,7 +119,7 @@ class AstProfileTransformer(ast.Nod...
["tests/test_autoprofile.py::test_autoprofile_module", "tests/test_autoprofile.py::test_autoprofile_module_list", "tests/test_autoprofile.py::test_autoprofile_module_with_prof_imports", "tests/test_autoprofile.py::test_autoprofile_script_with_prof_imports", "tests/test_complex_case.py::test_varied_complex_invocations"]
["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_cli.py::test_cli", "tests/test_cli.py::test_versio...
jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f
true
null
2
15
5
1,070
0
0.6
1
0.75
1
0.228333
80.96
7,270
swe_smith::train::39371
swe_smith
train
39,371
pallets__jinja.ada0a9a6.func_pm_ctrl_invert_if__4vkh4q2z
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Template error tracebacks showing wrong line numbers and missing frames #### Description When template errors occur, the traceback is not displaying the correct line numbers and some frames are missing from the stack trace. This makes debugging template issues very difficult. #### Steps/Code to Reproduce ```python ...
diff --git a/src/jinja2/debug.py b/src/jinja2/debug.py index f85a319..92ddc72 100644 --- a/src/jinja2/debug.py +++ b/src/jinja2/debug.py @@ -27,6 +27,9 @@ def rewrite_traceback_stack(source: t.Optional[str] = None) -> BaseException: tb = t.cast(TracebackType, tb) if isinstance(exc_value, TemplateSyntaxError...
["tests/test_api.py::TestExtendedAPI::test_sandbox_max_range", "tests/test_api.py::TestUndefined::test_stopiteration_is_undefined", "tests/test_api.py::TestUndefined::test_logging_undefined", "tests/test_api.py::TestUndefined::test_default_undefined", "tests/test_api.py::TestUndefined::test_chainable_undefined", "tests...
["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
11
84
1,150
0
0.6
1
0.75
1
0.228333
80.96
7,271
swe_smith::train::707
swe_smith
train
707
oauthlib__oauthlib.1fd52536.func_pm_class_rm_funcs__auo4n3db
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
GrantTypeBase missing __getattr__ method breaks OpenID Connect functionality #### Description After recent changes, OpenID Connect grant types are no longer working properly. The `GrantTypeBase` class appears to be missing method delegation to its `proxy_target`, causing AttributeError when trying to access methods t...
diff --git a/oauthlib/openid/connect/core/grant_types/base.py b/oauthlib/openid/connect/core/grant_types/base.py index 29d583e..6df1277 100644 --- a/oauthlib/openid/connect/core/grant_types/base.py +++ b/oauthlib/openid/connect/core/grant_types/base.py @@ -13,12 +13,6 @@ log = logging.getLogger(__name__) class Grant...
["tests/oauth2/rfc6749/endpoints/test_metadata.py::MetadataEndpointTest::test_openid_oauth2_preconfigured", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_claims_stored_on_code_creation", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_inval...
["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
7
164
1,230
0
0.6
1
0.75
1
0.228333
80.96
7,272
swe_smith::train::43802
swe_smith
train
43,802
pydata__patsy.a5d16484.combine_file__leqrv1hd
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
ModelDesc.from_formula returns None instead of ModelDesc object #### Description When calling `ModelDesc.from_formula()` with a formula string, the method returns `None` instead of the expected `ModelDesc` object. This breaks formula parsing functionality throughout the library. #### Steps/Code to Reproduce ```pyth...
diff --git a/patsy/desc.py b/patsy/desc.py index 210350d..6ac598f 100644 --- a/patsy/desc.py +++ b/patsy/desc.py @@ -174,9 +174,9 @@ class ModelDesc(object): tree = tree_or_string else: tree = parse_formula(tree_or_string) - value = Evaluator().eval(tree, require_evalexpr=False...
["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
12
24
1,130
0
0.6
1
0.75
1
0.228333
80.96
7,273
swe_smith::train::38633
swe_smith
train
38,633
erikrose__parsimonious.0d3f5f93.func_basic__kasxymrx
swesmith/erikrose__parsimonious.0d3f5f93
erikrose/parsimonious
python
null
ParseError message is incorrect and misleading Description When a parse error occurs, the error message is incorrect and misleading. The error message says "Rule matched at..." when it should say "Rule didn't match at...". Additionally, the line and column positions are swapped, and the error message shows only 10 ch...
diff --git a/parsimonious/exceptions.py b/parsimonious/exceptions.py index b9e05bc..d108572 100644 --- a/parsimonious/exceptions.py +++ b/parsimonious/exceptions.py @@ -20,13 +20,13 @@ class ParseError(StrAndRepr, ParsimoniousError): self.expr = expr def __str__(self): - rule_name = (("'%s'" % se...
["parsimonious/tests/test_expressions.py::ErrorReportingTests::test_favoring_named_rules", "parsimonious/tests/test_expressions.py::ErrorReportingTests::test_inner_rule_succeeding", "parsimonious/tests/test_expressions.py::ErrorReportingTests::test_line_and_column", "parsimonious/tests/test_grammar.py::TokenGrammarTest...
["parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_call_vs_inline", "parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_lists_vs_dicts", "parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_startswith_vs_regex", "parsimonious/tests/test_expressions.py::LengthTests::test_not", "parsimonious/t...
jyangballin/swesmith.x86_64.erikrose_1776_parsimonious.0d3f5f93
true
null
1
12
4
1,130
0
0.6
1
0.75
1
0.228333
80.96
7,274
swe_bench::dev::3
swe_bench
dev
3
marshmallow-code__marshmallow-1343
marshmallow-code/marshmallow
marshmallow-code/marshmallow
python
2be2d83a1a9a6d3d9b85804f3ab545cecc409bb0
[version 2.20.0] TypeError: 'NoneType' object is not subscriptable After update from version 2.19.5 to 2.20.0 I got error for code like: ```python from marshmallow import Schema, fields, validates class Bar(Schema): value = fields.String() @validates('value') # <- issue here def validate_value(self, val...
Thanks for reporting. I was able to reproduce this on 2.20.0. This is likely a regression from https://github.com/marshmallow-code/marshmallow/pull/1323 . I don't have time to look into it now. Would appreciate a PR.
diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -877,7 +877,7 @@ def _invoke_field_validators(self, unmarshal, data, many): for idx, item in enumerate(data): try: value = ...
diff --git a/tests/test_marshalling.py b/tests/test_marshalling.py --- a/tests/test_marshalling.py +++ b/tests/test_marshalling.py @@ -2,7 +2,7 @@ import pytest -from marshmallow import fields, Schema +from marshmallow import fields, Schema, validates from marshmallow.marshalling import Marshaller, Unmarshaller, ...
["tests/test_marshalling.py::TestUnmarshaller::test_deserialize_wrong_nested_type_with_validates_method"]
["tests/test_marshalling.py::test_missing_is_falsy", "tests/test_marshalling.py::TestMarshaller::test_prefix", "tests/test_marshalling.py::TestMarshaller::test_marshalling_generator", "tests/test_marshalling.py::TestMarshaller::test_default_to_missing", "tests/test_marshalling.py::TestMarshaller::test_serialize_fields_...
null
true
2019-08-13T04:36:01Z
1
4
1
2,039
0
0.8
1
0.7
0.8
0.353167
80.9595
7,275
swe_smith::train::4261
swe_smith
train
4,261
pygments__pygments.27649ebb.func_pm_class_rm_funcs__gbix6ful
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
VisibleWhitespaceFilter missing __init__ method causes AttributeError #### Description The VisibleWhitespaceFilter is missing its `__init__` method, causing an AttributeError when trying to use the filter with any options. #### Steps/Code to Reproduce ```python from pygments import lexers # Try to use the whitespa...
diff --git a/pygments/filters/__init__.py b/pygments/filters/__init__.py index 86e8dac..8af78db 100644 --- a/pygments/filters/__init__.py +++ b/pygments/filters/__init__.py @@ -816,23 +816,6 @@ class VisibleWhitespaceFilter(Filter): .. versionadded:: 0.8 """ - def __init__(self, **options): - Filt...
["tests/test_basic_api.py::TestFilters::test_whitespace", "tests/test_basic_api.py::TestFilters::test_basic"]
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
18
2
1,009
0
0.6
1
0.75
1
0.228167
80.9595
7,276
swe_smith::train::25054
swe_smith
train
25,054
pylint-dev__astroid.b114f6b5.combine_file__jnch8v9o
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Dunder method lookup broken for Set nodes and returns empty list instead of raising AttributeInferenceError #### Description When trying to look up dunder methods on Set nodes, the lookup function returns an empty list instead of properly raising an AttributeInferenceError. This breaks inference for operations involv...
diff --git a/astroid/interpreter/dunder_lookup.py b/astroid/interpreter/dunder_lookup.py index 727c1ad..5c717f2 100644 --- a/astroid/interpreter/dunder_lookup.py +++ b/astroid/interpreter/dunder_lookup.py @@ -29,10 +29,10 @@ def _lookup_in_mro(node, name) -> list: attrs = node.locals.get(name, []) nodes = i...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_numerictypes.py::NumpyBrainCoreNumericTypesTest::test_generic_types_are_subscriptables", "tests/brain/numpy/test_ndarray.py::NumpyBrainNdarrayTest::test_numpy_ndarray_class_support_type_indexing", "...
["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_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
15
137
1,069
0
0.6
1
0.75
1
0.228167
80.9595
7,277
swe_smith::train::51558
swe_smith
train
51,558
pydicom__pydicom.7d361b3d.combine_file__vmsrgekt
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
CLI element evaluation returns None instead of raising error for missing elements #### Description When using the CLI to access DICOM elements that don't exist in a dataset, the command now returns `None` instead of properly raising an error indicating the element is missing. #### Steps/Code to Reproduce ```python ...
diff --git a/src/pydicom/cli/main.py b/src/pydicom/cli/main.py index 2f616ba..2a16781 100644 --- a/src/pydicom/cli/main.py +++ b/src/pydicom/cli/main.py @@ -46,15 +46,14 @@ filespec_help = ( def eval_element(ds: Dataset, element: str) -> Any: try: - return eval("ds." + element, {"ds": ds}) + retur...
["tests/test_cli.py::TestFilespec::test_syntax[extra:colon]", "tests/test_cli.py::TestFilespec::test_syntax[no_callable()]", "tests/test_cli.py::TestFilespec::test_syntax[BeamSequence[0]extra]", "tests/test_cli.py::TestFilespec::test_syntax[BeamSequence[x]]", "tests/test_cli.py::TestFilespec::test_elem_not_exists[NotTh...
["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
24
14
889
0
0.6
1
0.75
1
0.228167
80.9595
7,278
swe_smith::train::20925
swe_smith
train
20,925
tobymao__sqlglot.036601ba.func_pm_remove_assign__xnoymqjk
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
NameError in qualify_columns optimizer after removing variable assignments #### Description The qualify_columns optimizer is throwing NameError exceptions for several variables that were accidentally removed. Variables like `is_bigquery`, `pivot_exclude_columns`, `renamed_columns`, and `columns` are being referenced ...
diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py index 3ab987d..1d415c2 100644 --- a/sqlglot/optimizer/qualify_columns.py +++ b/sqlglot/optimizer/qualify_columns.py @@ -621,13 +621,10 @@ def _expand_stars( c.output_name for e in field.expressions for c in e.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
8
18
1,209
0
0.6
1
0.75
1
0.228167
80.9595
7,279
swe_smith::train::28721
swe_smith
train
28,721
encode__starlette.db5063c2.func_basic__xn5rdof0
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 now returns the exception itself instead of `None`. This breaks the expected behavior where `None` should be returned whe...
diff --git a/starlette/_exception_handler.py b/starlette/_exception_handler.py index baf6e2f..df8789e 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_custom_middleware[trio]", "tests/test_exceptions.py::test_websockets_should_raise[asyncio]", "tests/test_exceptions.py::test_request_in_app_and_handler_is_the_same_object[asyncio]", "tests/test_exceptions.py::test_we...
["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/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTT...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
6
8
1,249
0
0.6
1
0.75
1
0.228167
80.9595
7,280
swe_smith::train::8074
swe_smith
train
8,074
cantools__cantools.0c6a7871.func_pm_remove_assign__ns3x8e75
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
UnboundLocalError when loading invalid database files #### Description When trying to load invalid database files, cantools raises `UnboundLocalError: local variable 'e_arxml' referenced before assignment` or similar errors for other format variables instead of the expected `UnsupportedDatabaseFormatError`. #### Ste...
diff --git a/src/cantools/database/__init__.py b/src/cantools/database/__init__.py index 701b1bc..46d6924 100644 --- a/src/cantools/database/__init__.py +++ b/src/cantools/database/__init__.py @@ -322,11 +322,8 @@ def load_string(string: str, raise ValueError( f"expected database format 'arxml', '...
["tests/test_database.py::CanToolsDatabaseTest::test_dbc_issue_199_more_than_11_bits_standard_frame_id", "tests/test_database.py::CanToolsDatabaseTest::test_dbc_issue_199_more_than_29_bits_extended_frame_id", "tests/test_database.py::CanToolsDatabaseTest::test_illegal_namespace", "tests/test_database.py::CanToolsDataba...
["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
10
14
1,167
0
0.6
1
0.75
1
0.227833
80.9585
7,281
swe_smith::train::31357
swe_smith
train
31,357
benoitc__gunicorn.bacbf8aa.combine_file__5b531oae
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
HTTP request parsing broken after recent changes #### Description HTTP request parsing is completely broken. When trying to parse any HTTP request, the parser fails with various errors related to string/bytes handling and socket operations. #### Steps/Code to Reproduce ```python from gunicorn.http.unreader import S...
diff --git a/gunicorn/http/unreader.py b/gunicorn/http/unreader.py index 9aadfbc..09d8b72 100644 --- a/gunicorn/http/unreader.py +++ b/gunicorn/http/unreader.py @@ -11,7 +11,7 @@ import os class Unreader: def __init__(self): - self.buf = io.BytesIO() + self.buf = io.StringIO() def chunk(sel...
["tests/test_http.py::test_unreader_unread", "tests/test_http.py::test_unreader_read_with_nonzero_size", "tests/test_http.py::test_iter_unreader_chunk", "tests/test_http.py::test_socket_unreader_chunk", "tests/test_http.py::test_length_reader_read", "tests/test_http.py::test_eof_reader_read", "tests/test_invalid_reques...
["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
12
104
1,127
0
0.6
1
0.75
1
0.227833
80.9585
7,282
swe_smith::train::12069
swe_smith
train
12,069
lepture__mistune.bf54ef67.combine_file__hxquua6p
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
List rendering broken with UnboundLocalError #### Description When rendering markdown lists, the code throws an `UnboundLocalError` for variables that are referenced before assignment. This affects both ordered and unordered lists across different renderers. #### Steps/Code to Reproduce ```python import mistune # ...
diff --git a/src/mistune/renderers/_list.py b/src/mistune/renderers/_list.py index a9f0313..d170f80 100644 --- a/src/mistune/renderers/_list.py +++ b/src/mistune/renderers/_list.py @@ -9,13 +9,11 @@ if TYPE_CHECKING: def render_list( renderer: "BaseRenderer", token: Dict[str, Any], state: "BlockState" ) -> str: ...
["tests/test_renderers.py::TestRendererRst::test_list_001", "tests/test_renderers.py::TestRendererRst::test_list_002", "tests/test_renderers.py::TestRendererRst::test_list_003", "tests/test_renderers.py::TestRendererRst::test_list_004", "tests/test_renderers.py::TestRendererRst::test_list_005", "tests/test_renderers.py...
["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
24
11
887
0
0.6
1
0.75
1
0.227833
80.9585
7,283
swe_smith::train::26289
swe_smith
train
26,289
pylint-dev__astroid.b114f6b5.func_pm_ctrl_shuffle__g03mzofm
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
UnboundLocalError in typing brain when inferring special aliases #### Description When using typing aliases like `Tuple[int, int]` or `Optional[int]`, astroid throws an `UnboundLocalError` because variables are being used before they're defined in the `infer_special_alias` function. #### Steps/Code to Reproduce ```...
diff --git a/astroid/brain/brain_typing.py b/astroid/brain/brain_typing.py index c44687b..e735529 100644 --- a/astroid/brain/brain_typing.py +++ b/astroid/brain/brain_typing.py @@ -370,19 +370,25 @@ def _looks_like_special_alias(node: Call) -> bool: def infer_special_alias( node: Call, ctx: context.InferenceConte...
["tests/brain/test_brain.py::TypingBrain::test_callable_type", "tests/brain/test_brain.py::TypingBrain::test_tuple_type", "tests/brain/test_brain.py::TypingBrain::test_typing_no_duplicates_2", "tests/brain/test_brain.py::TypingBrain::test_typing_object_builtin_subscriptable", "tests/brain/test_brain.py::TypingBrain::te...
["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
17
11
1,027
0
0.6
1
0.75
1
0.227833
80.9585
7,284
swe_smith::train::37925
swe_smith
train
37,925
kayak__pypika.1c9646f0.func_pm_ctrl_shuffle__bt0qt8nh
swesmith/kayak__pypika.1c9646f0
kayak/pypika
python
null
Case statement generates invalid SQL when no when clauses are added #### Description When creating a Case statement without any when clauses, the SQL generation produces invalid syntax instead of raising an appropriate error. #### Steps/Code to Reproduce ```python from pypika import Query, Case # This should raise...
diff --git a/pypika/terms.py b/pypika/terms.py index a277e1a..4bfb34b 100644 --- a/pypika/terms.py +++ b/pypika/terms.py @@ -1271,22 +1271,21 @@ class Case(Criterion): return self def get_sql(self, with_alias: bool = False, **kwargs: Any) -> str: - if not self._cases: - raise CaseExcep...
["pypika/tests/test_functions.py::ConditionTests::test__case__else", "pypika/tests/test_functions.py::ConditionTests::test__case__field", "pypika/tests/test_functions.py::ConditionTests::test__case__multi", "pypika/tests/test_functions.py::ConditionTests::test__case__no_cases", "pypika/tests/test_functions.py::Conditio...
["pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_0__ridley_scott_jimi_hendrix_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_1__1_2_3_4_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_2__toInt64_1_toInt64_2_toInt64_3_toInt64_4_", "pypika/tests/clickhouse/test_array...
jyangballin/swesmith.x86_64.kayak_1776_pypika.1c9646f0
true
null
1
11
15
1,146
0
0.6
1
0.75
1
0.227667
80.958
7,285
swe_smith::train::22445
swe_smith
train
22,445
tweepy__tweepy.91a41c6e.func_pm_class_rm_funcs__izb9e15d
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
# Missing Place.parse method causes API failures ## Bug description After a recent update, several API methods are failing with `NotImplementedError`. The issue appears to be related to the `Place` model in the codebase. When trying to use geographic API methods or other methods that return place information, the ap...
diff --git a/tweepy/models.py b/tweepy/models.py index f29361e..5b9824f 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -225,25 +225,6 @@ class Media(Model): class Place(Model): - @classmethod - def parse(cls, api, json): - place = cls(api) - for k, v in json.items(): - if k ...
["tests/test_api.py::TweepyAPITests::testcachedresult", "tests/test_api.py::TweepyAPITests::testgeoapis", "tests/test_api.py::TweepyAPITests::testgetlistsubscribers", "tests/test_api.py::TweepyAPITests::testsearchtweets", "tests/test_api.py::TweepyAPITests::testusertimeline"]
["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::testcreatede...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
20
5
966
0
0.6
1
0.75
1
0.227667
80.958
7,286
swe_smith::train::31233
swe_smith
train
31,233
scrapy__scrapy.35212ec5.func_pm_class_rm_funcs__ury1fmn1
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
`startproject` command fails with AttributeError after project name validation removal #### Description The `scrapy startproject` command is broken and throws an AttributeError when trying to create a new project. This appears to be related to missing project name validation logic. #### Steps/Code to Reproduce ```b...
diff --git a/scrapy/commands/startproject.py b/scrapy/commands/startproject.py index 1adc153..e44e24e 100644 --- a/scrapy/commands/startproject.py +++ b/scrapy/commands/startproject.py @@ -42,22 +42,6 @@ class Command(ScrapyCommand): def short_desc(self) -> str: return "Create new project" - def _is_...
["tests/test_commands.py::StartprojectTest::test_existing_project_dir", "tests/test_commands.py::StartprojectTest::test_startproject", "tests/test_commands.py::StartprojectTest::test_startproject_with_project_dir", "tests/test_commands.py::StartprojectTemplatesTest::test_startproject_permissions_from_read_only", "tests...
["tests/test_commands.py::CommandSettings::test_help_formatter", "tests/test_commands.py::CommandSettings::test_settings_json_string", "tests/test_commands.py::GenspiderStandaloneCommandTest::test_generate_standalone_spider", "tests/test_commands.py::GenspiderStandaloneCommandTest::test_same_name_as_existing_file", "te...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
1
18
52
1,006
0
0.6
1
0.75
1
0.227667
80.958
7,287
swe_smith::train::18071
swe_smith
train
18,071
pndurette__gTTS.dbcda4f3.combine_file__7vere5rn
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
Tokenizer regex compilation broken after recent changes #### Description The tokenizer is failing to process text properly. When trying to use gTTS with any text input, it throws errors related to regex pattern compilation and file-like object handling. #### Steps/Code to Reproduce ```python from gtts import gTTS ...
diff --git a/gtts/tokenizer/core.py b/gtts/tokenizer/core.py index d7e0a4e..74e7638 100644 --- a/gtts/tokenizer/core.py +++ b/gtts/tokenizer/core.py @@ -116,12 +116,12 @@ class PreProcessorRegex: """ def __init__(self, search_args, search_func, repl, flags=0): - self.repl = repl + self.repl = ...
["gtts/tests/test_cli.py::test_lang_nocheck", "gtts/tests/test_cli.py::test_params_set", "gtts/tests/test_cli.py::test_stdin_text", "gtts/tests/test_cli.py::test_stdin_text_unicode", "gtts/tests/test_cli.py::test_stdin_file", "gtts/tests/test_cli.py::test_stdin_file_unicode", "gtts/tests/test_cli.py::test_text", "gtts/...
["gtts/tests/test_cli.py::test_text_no_text_or_file", "gtts/tests/test_cli.py::test_text_text_and_file", "gtts/tests/test_cli.py::test_text_empty", "gtts/tests/test_cli.py::test_file_not_exists", "gtts/tests/test_cli.py::test_all", "gtts/tests/test_cli.py::test_lang_not_valid", "gtts/tests/test_lang.py::test_main_langs...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
true
null
1
8
86
1,206
0
0.6
1
0.75
1
0.227667
80.958
7,288
swe_smith::train::18128
swe_smith
train
18,128
pndurette__gTTS.dbcda4f3.func_basic__hibrw2uh
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
gTTS returns empty tokens for short text causing "No text to send to TTS API" error #### Description When using gTTS with short text (under the character limit), the tokenizer returns an empty list instead of the text, causing the TTS API to fail with "No text to send to TTS API" error. #### Steps/Code to Reproduce ...
diff --git a/gtts/tts.py b/gtts/tts.py index eae351f..4688575 100644 --- a/gtts/tts.py +++ b/gtts/tts.py @@ -165,31 +165,25 @@ class gTTS: self.timeout = timeout def _tokenize(self, text): - # Pre-clean - text = text.strip() + text = text.rstrip() - # Apply pre-processors ...
["gtts/tests/test_cli.py::test_lang_nocheck", "gtts/tests/test_cli.py::test_params_set", "gtts/tests/test_cli.py::test_stdin_text", "gtts/tests/test_cli.py::test_stdin_text_unicode", "gtts/tests/test_cli.py::test_stdin_file", "gtts/tests/test_cli.py::test_stdin_file_unicode", "gtts/tests/test_cli.py::test_text", "gtts/...
["gtts/tests/test_cli.py::test_text_no_text_or_file", "gtts/tests/test_cli.py::test_text_text_and_file", "gtts/tests/test_cli.py::test_text_empty", "gtts/tests/test_cli.py::test_file_not_exists", "gtts/tests/test_cli.py::test_all", "gtts/tests/test_cli.py::test_lang_not_valid", "gtts/tests/test_lang.py::test_main_langs...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
true
null
1
18
78
1,006
0
0.6
1
0.75
1
0.227667
80.958
7,289
swe_smith::train::32987
swe_smith
train
32,987
pydantic__pydantic.acb0f10f.pr_7976
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# Documentation examples in model_validator docstring no longer work When using the `model_validator` decorator, the documentation examples in the docstring no longer work. The docstring has been modified and the reference to the usage documentation has been removed. ## Steps to reproduce 1. Create a model with a mo...
diff --git a/pydantic/functional_validators.py b/pydantic/functional_validators.py index 2eed4ef..887c017 100644 --- a/pydantic/functional_validators.py +++ b/pydantic/functional_validators.py @@ -670,10 +670,7 @@ def model_validator( *, mode: Literal['wrap', 'before', 'after'], ) -> Any: - """!!! abstrac...
["tests/test_docs.py::test_docstrings_examples[pydantic/functional_validators.py:679-706]"]
["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
8
1
1,206
0
0.6
1
0.75
1
0.227667
80.958
7,290
swe_smith::train::18190
swe_smith
train
18,190
msiemens__tinydb.10644a0e.combine_file__icx378d4
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Document insertion fails with "already exists" error after first insert When inserting documents into TinyDB, I'm getting a `ValueError` saying the document already exists, even on the first insert operation. This seems to happen consistently across different operations. #### Steps/Code to Reproduce ```python from t...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..21306e6 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -164,15 +164,14 @@ class Table: # Now, we update the table and add the document def updater(table: dict): - if doc_id in table: - raise ValueError(f'D...
["tests/test_middlewares.py::test_caching_json_write", "tests/test_storages.py::test_json_kwargs", "tests/test_storages.py::test_json_readwrite", "tests/test_storages.py::test_json_read", "tests/test_storages.py::test_in_memory_close", "tests/test_storages.py::test_read_once", "tests/test_storages.py::test_yaml", "test...
["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
20
57
966
0
0.6
1
0.75
1
0.227667
80.958
7,291
swe_smith::train::44467
swe_smith
train
44,467
pydata__patsy.a5d16484.func_pm_remove_cond__zempo2fu
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
`_get_all_sorted_knots` fails with empty data when lower_bound is None #### Description When calling `_get_all_sorted_knots` with empty input data and `lower_bound=None`, the function raises a `TypeError` instead of the expected `ValueError`. This breaks spline functionality when working with empty datasets. #### St...
diff --git a/patsy/mgcv_cubic_splines.py b/patsy/mgcv_cubic_splines.py index 5f93680..8208e4c 100644 --- a/patsy/mgcv_cubic_splines.py +++ b/patsy/mgcv_cubic_splines.py @@ -414,13 +414,6 @@ def _get_all_sorted_knots( :raise ValueError: for various invalid parameters sets or if unable to compute ``n_inner_kno...
["patsy/mgcv_cubic_splines.py::test__get_all_sorted_knots", "patsy/mgcv_cubic_splines.py::test_crs_errors", "patsy/mgcv_cubic_splines.py::test_crs_compat", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_1smooth", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "...
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
16
7
1,045
0
0.6
1
0.75
1
0.2275
80.9575
7,292
swe_smith::train::26836
swe_smith
train
26,836
tkrajina__gpxpy.09fc46b3.func_basic__2bmv3bi7
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX extensions parsing returns None when no extensions found #### Description When parsing GPX files, the extensions field returns `None` instead of an empty list when no extensions are present. This breaks existing code that expects extensions to always be a list. #### Steps/Code to Reproduce ```python import gpxp...
diff --git a/gpxpy/gpxfield.py b/gpxpy/gpxfield.py index e253df3..7484aea 100644 --- a/gpxpy/gpxfield.py +++ b/gpxpy/gpxfield.py @@ -340,10 +340,10 @@ class GPXExtensionsField(AbstractGPXField): result: Any = [] extensions_node = node.find(self.tag) if extensions_node is None: - re...
["test.py::GPXTests::test_extension_without_namespaces", "test.py::GPXTests::test_gpx_11_fields", "test.py::GPXTests::test_read_extensions"]
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
6
3
1,245
0
0.6
1
0.75
1
0.2275
80.9575
7,293
swe_smith::train::47085
swe_smith
train
47,085
python-trio__trio.cfbbe2c1.func_pm_ctrl_invert_if__k8j7aa2s
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SSLStream raises AssertionError instead of ClosedResourceError when closed #### Description When attempting to use an SSLStream that has been closed, an AssertionError is raised instead of the expected ClosedResourceError. #### Steps/Code to Reproduce ```python import trio import ssl async def main(): # Create...
diff --git a/src/trio/_ssl.py b/src/trio/_ssl.py index 0a0419f..1328228 100644 --- a/src/trio/_ssl.py +++ b/src/trio/_ssl.py @@ -450,11 +450,10 @@ class SSLStream(Stream, Generic[T_Stream]): return elif self._state is _State.BROKEN: raise trio.BrokenResourceError - elif self._s...
["src/trio/_tests/test_ssl.py::test_SSLStream_generic[tls13-False]", "src/trio/_tests/test_ssl.py::test_SSLStream_generic[tls13-True]", "src/trio/_tests/test_ssl.py::test_closing_nice_case[tls13]", "src/trio/_tests/test_ssl.py::test_SSLStream_generic[tls12-False]", "src/trio/_tests/test_ssl.py::test_SSLStream_generic[t...
["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
7
6
1,225
0
0.6
1
0.75
1
0.2275
80.9575
7,294
swe_smith::train::20217
swe_smith
train
20,217
gruns__furl.da386f68.func_basic__4rjl7yoc
swesmith/gruns__furl.da386f68
gruns/furl
python
null
furl.load() returns None instead of self, breaking method chaining #### Description When calling `furl.load()`, the method now returns `None` instead of returning `self`, which breaks method chaining that was previously working. #### Steps/Code to Reproduce ```python import furl # This used to work but now fails f...
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..5fcc2bf 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -1393,27 +1393,25 @@ class furl(URLPathCompositionInterface, QueryCompositionInterface, Raises: ValueError on invalid URL, like a malformed IPv6 address or invalid port. """ - ...
["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestQuery::test_equality", "tests/test_furl.py::TestQuery::test_special_characters", "tests/test_furl.py::TestFra...
["tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_itruediv", "tests/test_furl.py::TestPath::test_leading_slash", "tests/test_furl.py::TestPath::test_load", "tests/test_furl.py::TestPath::test_none", "tests/test_furl.py::TestPath::test_no...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
24
30
885
0
0.6
1
0.75
1
0.2275
80.9575
7,295
swe_bench::test::1193
swe_bench
test
1,193
psf__requests-2873
psf/requests
psf/requests
python
4e89ba707714e3b58a46c2ed9e220cff8b7f1e6a
Post request hangs in certain cases when body is a StringIO This is related to a report for the [Dropbox Python SDK](https://github.com/dropbox/dropbox-sdk-python/issues/27). The following hangs: ``` from StringIO import StringIO s = StringIO() s.write('hello') # This is seeked to the end requests.post('http://www.g...
Thanks for this report. This comes because we calculate the length of the StringIO, but don't account for where it is seeked to. As I see it we have two options: we can either always `seek(0)` before sending a body, or we can use `tell()` to adjust the content length. On balance, I think the first is probably bette...
diff --git a/requests/utils.py b/requests/utils.py --- a/requests/utils.py +++ b/requests/utils.py @@ -48,19 +48,26 @@ def dict_to_sequence(d): def super_len(o): + total_length = 0 + current_position = 0 + if hasattr(o, '__len__'): - return len(o) + total_length = len(o) + + elif hasatt...
diff --git a/test_requests.py b/test_requests.py --- a/test_requests.py +++ b/test_requests.py @@ -1351,6 +1351,13 @@ def test_super_len_io_streams(self): assert super_len( cStringIO.StringIO('but some how, some way...')) == 25 + def test_super_len_correctly_calculates_len_of_partiall...
["test_requests.py::UtilsTestCase::test_super_len_correctly_calculates_len_of_partially_read_file"]
["test_requests.py::TestRequests::test_entry_points", "test_requests.py::TestRequests::test_invalid_url", "test_requests.py::TestRequests::test_basic_building", "test_requests.py::TestRequests::test_path_is_not_double_encoded", "test_requests.py::TestRequests::test_params_are_added_before_fragment", "test_requests.py::...
null
true
2015-11-11T03:22:53Z
1
24
1
684
0
0.8
1
0.55
1
0.194
80.957
7,296
swe_smith::train::27899
swe_smith
train
27,899
jsvine__pdfplumber.02ff4313.func_pm_ctrl_shuffle__s3znvkww
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
Serializer.serialize method broken after recent changes #### Description The `serialize` method in the `Serializer` class is throwing `UnboundLocalError` when trying to serialize objects. It looks like there's an issue with variable scoping where `fn` is being referenced before it's defined. #### Steps/Code to Repro...
diff --git a/pdfplumber/convert.py b/pdfplumber/convert.py index 9abfc87..29e7aa3 100644 --- a/pdfplumber/convert.py +++ b/pdfplumber/convert.py @@ -73,17 +73,6 @@ class Serializer: ) def serialize(self, obj: Any) -> Any: - if obj is None: - return None - - t = type(obj) - - ...
["tests/test_convert.py::Test::test_additional_attr_types", "tests/test_convert.py::Test::test_cli_csv", "tests/test_convert.py::Test::test_cli_csv_exclude", "tests/test_convert.py::Test::test_cli_csv_include", "tests/test_convert.py::Test::test_cli_json", "tests/test_convert.py::Test::test_csv", "tests/test_convert.py...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
21
12
944
0
0.6
1
0.75
1
0.227333
80.957
7,297
swe_smith::train::7794
swe_smith
train
7,794
cantools__cantools.0c6a7871.func_basic__w2ob49c2
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Messages dictionary assignment broken - keys and values swapped #### Description When assigning messages to the Messages dictionary in the tester module, the key-value assignment appears to be reversed, causing `TypeError: unhashable type: 'Message'` errors when trying to access messages by name. #### Steps/Code to ...
diff --git a/src/cantools/tester.py b/src/cantools/tester.py index c2ad9f2..eb282f0 100644 --- a/src/cantools/tester.py +++ b/src/cantools/tester.py @@ -23,10 +23,10 @@ class DecodedMessage: class Messages(UserDict): def __setitem__(self, message_name, value): - if getattr(self, '_frozen', False): - ...
["tests/test_tester.py::CanToolsTesterTest::test_bad_message_name", "tests/test_tester.py::CanToolsTesterTest::test_enable_disable", "tests/test_tester.py::CanToolsTesterTest::test_expect", "tests/test_tester.py::CanToolsTesterTest::test_flush_input", "tests/test_tester.py::CanToolsTesterTest::test_on_message", "tests/...
["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
6
9
1,244
0
0.6
1
0.75
1
0.227333
80.957
7,298
r2e_gym::train::444
r2e_gym
train
444
orange3__3617003b27d75572ebbb11a136b3c079829e9bb1
orange3
biolab/orange3
python
3617003b27d75572ebbb11a136b3c079829e9bb1
**Title:** Context Migration Fails Due to Missing `class_vars` Attribute **Description:** When attempting to migrate context for the `OWSilhouettePlot` widget, an error occurs if the `Context` object lacks the `class_vars` attribute. This issue arises during the migration process for contexts with version less than 2,...
diff --git a/Orange/widgets/visualize/owsilhouetteplot.py b/Orange/widgets/visualize/owsilhouetteplot.py --- a/Orange/widgets/visualize/owsilhouetteplot.py +++ b/Orange/widgets/visualize/owsilhouetteplot.py @@ -267,7 +267,7 @@ if var.is_string or var.is_discrete] self.annotation_var_model...
diff --git a/Orange/widgets/visualize/tests/test_owsilhouetteplot.py b/Orange/widgets/visualize/tests/test_owsilhouetteplot.py --- a/Orange/widgets/visualize/tests/test_owsilhouetteplot.py +++ b/Orange/widgets/visualize/tests/test_owsilhouetteplot.py @@ -259,10 +259,10 @@ def test_migration(self): enc_d...
null
null
namanjain12/orange3_final:3617003b27d75572ebbb11a136b3c079829e9bb1
true
null
1
29
null
1,496
0
0.75
1
0.6375
1
0.346
80.95675
7,299
swe_smith::train::24664
swe_smith
train
24,664
marshmallow-code__marshmallow.9716fc62.func_basic__9qtb0vsu
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Decimal field returns negative values and doesn't validate special values properly #### Description The Decimal field is behaving unexpectedly - it's returning negative values for positive inputs and not properly validating special numeric values like NaN and Infinity. #### Steps/Code to Reproduce ```python from ma...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..5d9d28a 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -1109,11 +1109,11 @@ class Decimal(Number): def _validated(self, value): try: num = super()._validated(value) - except dec...
["tests/test_deserialization.py::TestFieldDeserialization::test_decimal_field_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::test_decimal_field_with_places", "tests/test_deserialization.py::TestFieldDeserialization::test_decimal_field_with_places_and_rounding", "tests/test_deserialization.p...
["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
8
8
1,203
0
0.6
1
0.75
1
0.227167
80.9565