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,500
swe_smith::train::1010
swe_smith
train
1,010
pytest-dev__iniconfig.16793ead.func_basic__929wnmql
swesmith/pytest-dev__iniconfig.16793ead
pytest-dev/iniconfig
python
null
IniConfig fails to parse valid configuration files #### Description When parsing INI configuration files, IniConfig incorrectly raises ParseError exceptions for valid configuration syntax. The parser appears to have inverted logic that treats valid sections and key-value pairs as duplicates. #### Steps/Code to Repro...
diff --git a/src/iniconfig/__init__.py b/src/iniconfig/__init__.py index 3c40bc9..7674b17 100644 --- a/src/iniconfig/__init__.py +++ b/src/iniconfig/__init__.py @@ -128,15 +128,15 @@ class IniConfig: raise ParseError(self.path, lineno, "no section header defined") self._sources[section, na...
["testing/test_iniconfig.py::test_iniconfig_from_file", "testing/test_iniconfig.py::test_iniconfig_duplicate_key_fails", "testing/test_iniconfig.py::test_iniconfig_lineof", "testing/test_iniconfig.py::test_iniconfig_get_convert", "testing/test_iniconfig.py::test_iniconfig_get_missing", "testing/test_iniconfig.py::test_...
["testing/test_iniconfig.py::test_tokenize[comment]", "testing/test_iniconfig.py::test_tokenize[comment2]", "testing/test_iniconfig.py::test_tokenize[section]", "testing/test_iniconfig.py::test_tokenize[value]", "testing/test_iniconfig.py::test_parse_empty", "testing/test_iniconfig.py::test_ParseError", "testing/test_i...
jyangballin/swesmith.x86_64.pytest-dev_1776_iniconfig.16793ead
true
null
1
6
13
1,210
0
0.6
1
0.75
1
0.221667
80.94
7,501
swe_smith::train::7884
swe_smith
train
7,884
cantools__cantools.0c6a7871.func_pm_ctrl_invert_if__5dou9fga
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Profile5 CRC computation fails when passing Message object #### Description When calling `compute_profile5_crc` with a Message object, the function incorrectly treats the Message as a data_id integer, causing an AttributeError when trying to access the `autosar` attribute. #### Steps/Code to Reproduce ```python imp...
diff --git a/src/cantools/autosar/end_to_end.py b/src/cantools/autosar/end_to_end.py index 2ce4ae7..5e2aa84 100644 --- a/src/cantools/autosar/end_to_end.py +++ b/src/cantools/autosar/end_to_end.py @@ -109,6 +109,9 @@ def compute_profile5_crc(payload: bytes, data_id = None if isinstance(msg_or_data_id, Messa...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5"]
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommand...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
7
1
1,190
0
0.6
1
0.75
1
0.221667
80.94
7,502
swe_smith::train::33443
swe_smith
train
33,443
pallets__click.fde47b4b.func_basic__2bf5358c
swesmith/pallets__click.fde47b4b
pallets/click
python
null
Option parsing broken for arguments without equals sign #### Description Command line option parsing is failing when options don't contain an equals sign. The parser appears to be incorrectly trying to split arguments on "=" even when no equals sign is present, causing a ValueError. #### Steps/Code to Reproduce ```...
diff --git a/src/click/parser.py b/src/click/parser.py index a8b7d26..ac3acf8 100644 --- a/src/click/parser.py +++ b/src/click/parser.py @@ -468,32 +468,20 @@ class _OptionParser: def _process_opts(self, arg: str, state: _ParsingState) -> None: explicit_value = None - # Long option handling happe...
["tests/test_arguments.py::test_eat_options", "tests/test_arguments.py::test_subcommand_help", "tests/test_arguments.py::test_nested_subcommand_help", "tests/test_basic.py::test_basic_functionality", "tests/test_basic.py::test_basic_group", "tests/test_basic.py::test_string_option[args1-S:[42]]", "tests/test_basic.py::...
["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
20
130
930
0
0.6
1
0.75
1
0.221667
80.94
7,503
swe_smith::train::9506
swe_smith
train
9,506
marshmallow-code__webargs.dbde72fe.combine_file__p77yzx3e
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
BottleParser returns wrong request object and doesn't raise HTTP errors properly #### Description The BottleParser has issues with error handling and request object retrieval. When invalid JSON is encountered, it doesn't properly raise HTTP errors, and the `get_default_request()` method returns the wrong object. ###...
diff --git a/src/webargs/bottleparser.py b/src/webargs/bottleparser.py index a2bf7af..084ad03 100644 --- a/src/webargs/bottleparser.py +++ b/src/webargs/bottleparser.py @@ -27,9 +27,10 @@ class BottleParser(core.Parser[bottle.Request]): """Bottle.py request argument parser.""" def _handle_invalid_json_error...
["tests/test_bottleparser.py::TestBottleParser::test_parse_form", "tests/test_bottleparser.py::TestBottleParser::test_parse_json", "tests/test_bottleparser.py::TestBottleParser::test_parse_json_or_form", "tests/test_bottleparser.py::TestBottleParser::test_parse_json_with_charset", "tests/test_bottleparser.py::TestBottl...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
9
24
1,150
0
0.6
1
0.75
1
0.221667
80.94
7,504
swe_smith::train::5138
swe_smith
train
5,138
agronholm__exceptiongroup.0b4f4937.func_basic__pgf9j89u
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
Exception subclass matching broken for split() and subgroup() methods #### Description When using `split()` and `subgroup()` methods on ExceptionGroup instances, the exception type matching logic is incorrectly matching all exception types instead of only the specified ones. This causes methods to return the entire e...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..020a9af 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -17,11 +17,11 @@ _BaseExceptionGroupSelf = TypeVar("_BaseExceptionGroupSelf", bound="BaseExceptio def check_direct_subclass...
["tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_full_match", "tests/test_catch.py::test_catch_handler_raises", "tests/test_catch.py::test_bare_raise_in_handler", "tests/test_catch.py::test_catch_subcl...
["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
8
19
1,170
0
0.6
1
0.75
1
0.221667
80.94
7,505
swe_bench::test::1530
swe_bench
test
1,530
scikit-learn__scikit-learn-11235
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
90a2c57951a9ae32e80246b171e4b47a74252090
Consistency issue in StandardScaler There is an issue of consistency with `StandardScaler` with `with_mean=False` and `with_std=False` between the sparse and dense case. 1. Does it make sense to support this case. It will return the identity matrix which is not the use case for the `StandardScaler`. If we wish a trans...
See also #11181 where @amueller suggests deprecating with_mean I haven't understood the inconsistency here though. Please give an expected/actual > See also #11181 where @amueller suggests deprecating with_mean. So 2. will be better then. > I haven't understood the inconsistency here though. Please give an ex...
diff --git a/sklearn/preprocessing/data.py b/sklearn/preprocessing/data.py --- a/sklearn/preprocessing/data.py +++ b/sklearn/preprocessing/data.py @@ -652,6 +652,10 @@ def partial_fit(self, X, y=None): else: self.mean_ = None self.var_ = None + if not hasatt...
diff --git a/sklearn/preprocessing/tests/test_data.py b/sklearn/preprocessing/tests/test_data.py --- a/sklearn/preprocessing/tests/test_data.py +++ b/sklearn/preprocessing/tests/test_data.py @@ -7,6 +7,7 @@ import warnings import re +import itertools import numpy as np import numpy.linalg as la @@ -60,6 +61,7 @...
["sklearn/preprocessing/tests/test_data.py::test_scaler_return_identity"]
["sklearn/preprocessing/tests/test_data.py::test_polynomial_features", "sklearn/preprocessing/tests/test_data.py::test_polynomial_feature_names", "sklearn/preprocessing/tests/test_data.py::test_polynomial_features_sparse_X[1-True-False-int]", "sklearn/preprocessing/tests/test_data.py::test_polynomial_features_sparse_X[...
null
true
2018-06-11T12:45:38Z
1
15
1
830
0
0.8
1
0.55
1
0.188333
80.94
7,506
swe_smith::train::49397
swe_smith
train
49,397
mozilla__bleach.73871d76.func_pm_class_rm_funcs__a5w2gm5w
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parser fails with NameError when processing select elements #### Description When parsing HTML containing `<select>` elements, the parser raises a `NameError: name 'startTagOther' is not defined`. This appears to affect various HTML parsing operations including linkification and cleaning. #### Steps/Code to Rep...
diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py index 5427b7d..556ad79 100644 --- a/bleach/_vendor/html5lib/html5parser.py +++ b/bleach/_vendor/html5lib/html5parser.py @@ -2287,13 +2287,6 @@ def getPhases(debug): class InSelectPhase(Phase): __slots__ = tuple() ...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
12
185
1,090
0
0.6
1
0.75
1
0.221667
80.94
7,507
r2e_gym::train::257
r2e_gym
train
257
orange3__f4b939f1a6b6e24c01e6e8504fcf8f40d7c8db63
orange3
biolab/orange3
python
f4b939f1a6b6e24c01e6e8504fcf8f40d7c8db63
**Title:** Filtering Rows with Boolean Indices Causes Table Creation to Fail **Description:** When using boolean lists as `row_indices` with the `Table.from_table` method, the function fails to properly convert them into integer indices. This results in mismatched array shapes and causes assertions to fail during tabl...
diff --git a/Orange/data/table.py b/Orange/data/table.py --- a/Orange/data/table.py +++ b/Orange/data/table.py @@ -733,6 +733,9 @@ with table.unlocked_reference(): table = assure_domain_conversion_sparsity(table, source) return table + + # avoid boolean ...
diff --git a/Orange/tests/test_table.py b/Orange/tests/test_table.py --- a/Orange/tests/test_table.py +++ b/Orange/tests/test_table.py @@ -2083,7 +2083,6 @@ np.testing.assert_almost_equal(table.metas, self.table.metas[r, metas]) - def test_optimize...
null
null
namanjain12/orange3_final:f4b939f1a6b6e24c01e6e8504fcf8f40d7c8db63
true
null
1
43
null
1,182
0
0.75
1
0.6375
1
0.340333
80.93975
7,508
r2e_gym::train::6241
r2e_gym
train
6,241
pillow__c7efd0bf6d736844396ea519bbe31533b708286c
pillow
python-pillow/pillow
python
c7efd0bf6d736844396ea519bbe31533b708286c
**Title:** `alpha_composite` raises ValueError when using a 4-tuple for `source` **Description:** When using the `alpha_composite` method with a 4-tuple for the `source` parameter, a `ValueError` is raised. The method currently expects a 2-tuple for `source`, but in cases where specifying the bounds of the source rect...
diff --git a/PIL/Image.py b/PIL/Image.py --- a/PIL/Image.py +++ b/PIL/Image.py @@ -1373,45 +1373,51 @@ else: self.im.paste(im, box) - def alpha_composite(self, im, box=None, source=(0,0)): + def alpha_composite(self, im, dest=(0,0), source=(0,0)): """ 'In-place' analog of Image.al...
diff --git a/Tests/test_image.py b/Tests/test_image.py --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -225,7 +225,7 @@ # offset and crop box = src.copy() - box.alpha_composite(over, (64, 64, 96, 96)) + box.alpha_composite(over, (64, 64), (0, 0, 32, 32)) self.assert_ima...
null
null
namanjain12/pillow_final:c7efd0bf6d736844396ea519bbe31533b708286c
true
null
1
56
null
922
0
0.75
1
0.6375
1
0.340333
80.93975
7,509
swe_smith::train::23877
swe_smith
train
23,877
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__sgo1qeg6
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
FITS header conversion fails with "Illegal value" error for list-like values #### Description When converting headers to FITS format, the `header_to_fits` function incorrectly handles certain header values, causing them to be wrapped in lists and then rejected by astropy's FITS validation. #### Steps/Code to Reprodu...
diff --git a/sunpy/io/_fits.py b/sunpy/io/_fits.py index 5513abe..f337b9b 100644 --- a/sunpy/io/_fits.py +++ b/sunpy/io/_fits.py @@ -235,10 +235,10 @@ def header_to_fits(header): header_items = [] for k, v in header.items(): if k.upper() in ('COMMENT', 'HV_COMMENT', 'HISTORY'): + header_it...
["sunpy/io/tests/test_fits.py::test_simple_write", "sunpy/io/tests/test_fits.py::test_extra_comment_write", "sunpy/io/tests/test_fits.py::test_simple_write_compressed", "sunpy/io/tests/test_fits.py::test_simple_write_compressed_difftypeinst", "sunpy/io/tests/test_fits.py::test_simple_write_compressed_instance[kwargs0-F...
["sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-None-4]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-1-1]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
11
12
1,109
0
0.6
1
0.75
1
0.2215
80.9395
7,510
swe_smith::train::38424
swe_smith
train
38,424
dbader__schedule.82a43db1.func_basic__ypiaeyn8
swesmith/dbader__schedule.82a43db1
dbader/schedule
python
null
Weekly .friday() job scheduling broken #### Description When trying to schedule a weekly job for Friday, the scheduler is behaving incorrectly. Instead of scheduling for Friday, it appears to be scheduling for Saturday and with an incorrect interval. #### Steps/Code to Reproduce ```python import schedule def my_jo...
diff --git a/schedule/__init__.py b/schedule/__init__.py index 8e12eeb..c19a0c7 100644 --- a/schedule/__init__.py +++ b/schedule/__init__.py @@ -423,14 +423,14 @@ class Job: @property def friday(self): - if self.interval != 1: + if self.interval == 1: raise IntervalError( ...
["test_schedule.py::SchedulerTests::test_at_time", "test_schedule.py::SchedulerTests::test_next_run_time", "test_schedule.py::SchedulerTests::test_time_units"]
["test_schedule.py::SchedulerTests::test_align_utc_offset_after_fold_fixate", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_change", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold", "test_schedule.py::SchedulerT...
jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1
true
null
1
6
3
1,209
0
0.6
1
0.75
1
0.2215
80.9395
7,511
swe_smith::train::31346
swe_smith
train
31,346
benoitc__gunicorn.bacbf8aa.combine_file__18uz4fdc
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Statsd logger fails with TypeError when dogstatsd_tags is configured #### Description When using the Statsd logger with dogstatsd_tags configured, the logger fails with a TypeError about concatenating strings and lists. This appears to be related to how the dogstatsd_tags are being handled during initialization. ###...
diff --git a/gunicorn/instrument/statsd.py b/gunicorn/instrument/statsd.py index 7bc4e6f..0d21214 100644 --- a/gunicorn/instrument/statsd.py +++ b/gunicorn/instrument/statsd.py @@ -27,9 +27,9 @@ class Statsd(Logger): self.prefix = sub(r"^(.+[^.]+)\.*$", "\\g<1>.", cfg.statsd_prefix) if isinstance(cf...
["tests/test_statsd.py::test_statsd_fail", "tests/test_statsd.py::test_statsd_host_initialization", "tests/test_statsd.py::test_dogstatsd_tags", "tests/test_statsd.py::test_instrument", "tests/test_statsd.py::test_prefix", "tests/test_statsd.py::test_prefix_no_dot", "tests/test_statsd.py::test_prefix_multiple_dots", "t...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
10
8
1,129
0
0.6
1
0.75
1
0.2215
80.9395
7,512
swe_smith::train::10028
swe_smith
train
10,028
google__textfsm.c31b6007.lm_rewrite__h7th8usg
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
**Issue Text** Indentation error in _GetCh method causes Pager functionality to break I found a bug in the terminal.py file where the _GetCh method is incorrectly indented, causing it to be defined outside the Pager class instead of as a method within it. When trying to use the Pager functionality, I get an Attribut...
diff --git a/textfsm/terminal.py b/textfsm/terminal.py index 32252a4..7469828 100755 --- a/textfsm/terminal.py +++ b/textfsm/terminal.py @@ -412,25 +412,28 @@ class Pager(object): sys.stdout.flush() return ch - def _GetCh(self): +def _GetCh(self): """Read a single character from the user. Retur...
["tests/terminal_test.py::PagerTest::testPage", "tests/terminal_test.py::PagerTest::testPager"]
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.p...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
21
2
909
0
0.6
1
0.75
1
0.2215
80.9395
7,513
swe_smith::train::46666
swe_smith
train
46,666
python-trio__trio.cfbbe2c1.combine_file__rvj6mx6c
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
AsyncIOWrapper broken after recent changes #### Description The AsyncIOWrapper class seems to be completely broken. When trying to access any attributes or methods on an AsyncIOWrapper instance, it immediately raises AttributeError for everything, even basic properties that should be available. #### Steps/Code to Re...
diff --git a/src/trio/_file_io.py b/src/trio/_file_io.py index 5a612ff..3170c84 100644 --- a/src/trio/_file_io.py +++ b/src/trio/_file_io.py @@ -226,7 +226,7 @@ class AsyncIOWrapper(AsyncResource, Generic[FileT_co]): """ def __init__(self, file: FileT_co) -> None: - self._wrapped = file + self...
["src/trio/_tests/test_file_io.py::test_wrapped_property", "src/trio/_tests/test_file_io.py::test_dir_matches_wrapped", "src/trio/_tests/test_file_io.py::test_unsupported_not_forwarded", "src/trio/_tests/test_file_io.py::test_sync_attrs_match_wrapper", "src/trio/_tests/test_file_io.py::test_async_methods_signature", "s...
["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
9
13
1,149
0
0.6
1
0.75
1
0.2215
80.9395
7,514
swe_smith::train::42344
swe_smith
train
42,344
r1chardj0n3s__parse.30da9e4f.func_basic__3k5hi2zp
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
Format parsing broken for simple format specifiers #### Description Format parsing is completely broken when using basic format specifiers. Simple patterns like `{:d}`, `{:>}`, or `{:%Y/%j}` are causing IndexError exceptions. #### Steps/Code to Reproduce ```python import parse # This should work but raises IndexEr...
diff --git a/parse.py b/parse.py index 80242e1..ca1a411 100644 --- a/parse.py +++ b/parse.py @@ -351,46 +351,43 @@ ALLOWED_TYPES = set(list("nbox%fFegwWdDsSl") + ["t" + c for c in "ieahgcts"]) def extract_format(format, extra_types): """Pull apart the format [[fill]align][sign][0][width][.precision][type]""" ...
["README.rst::README.rst", "tests/test_bugs.py::test_dotted_type_conversion_pull_8", "tests/test_bugs.py::test_user_type_with_group_count_issue60", "tests/test_bugs.py::test_pickling_bug_110", "tests/test_bugs.py::test_unused_centered_alignment_bug", "tests/test_parse.py::test_hexadecimal", "tests/test_parse.py::test_l...
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "tests/test_bugs.py::test_named_date_issue7", "tests/test_bugs.py::test_pm_overflow_issue16", "tests/test_bugs.py::test_pm_handling_issue57", "tests/test_bugs.py::test_unmatched_brace_doesnt_match", "tests/test_bugs.py::test_unused_left_ali...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
23
51
868
0
0.6
1
0.75
1
0.221333
80.939
7,515
swe_smith::train::48630
swe_smith
train
48,630
mewwts__addict.75284f95.func_basic__nvasfe78
swesmith/mewwts__addict.75284f95
mewwts/addict
python
null
Dict object deletes attributes unexpectedly after assignment #### Description When setting values on a Dict object, the object unexpectedly deletes attributes instead of properly handling parent-child relationships. This causes AttributeError exceptions when trying to access previously set values. #### Steps/Code to...
diff --git a/addict/addict.py b/addict/addict.py index 55e02d1..d130edc 100644 --- a/addict/addict.py +++ b/addict/addict.py @@ -32,19 +32,19 @@ class Dict(dict): def __setitem__(self, name, value): isFrozen = (hasattr(self, '__frozen') and object.__getattribute__(self, '__frozen')) -...
["test_addict.py::DictTests::test_add_on_empty_dict", "test_addict.py::DictTests::test_add_on_non_empty_dict", "test_addict.py::DictTests::test_add_on_non_empty_value", "test_addict.py::DictTests::test_add_on_unsupported_type", "test_addict.py::DictTests::test_copy", "test_addict.py::DictTests::test_deepcopy", "test_ad...
["test_addict.py::DictTests::test_empty_getitem", "test_addict.py::DictTests::test_init_raises", "test_addict.py::DictTests::test_init_with_empty_stuff", "test_addict.py::DictTests::test_isinstance", "test_addict.py::DictTests::test_or_operator_type_error", "test_addict.py::DictTests::test_ror_operator_type_error", "te...
jyangballin/swesmith.x86_64.mewwts_1776_addict.75284f95
true
null
1
14
110
1,048
0
0.6
1
0.75
1
0.221333
80.939
7,516
swe_smith::train::3512
swe_smith
train
3,512
pygments__pygments.27649ebb.combine_file__tl4rd0oo
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
LatexFormatter crashes with UnboundLocalError on _get_ttype_name function #### Description The LatexFormatter is throwing an `UnboundLocalError` when trying to format code. The error occurs in the `_get_ttype_name` function where a variable is being referenced before assignment. #### Steps/Code to Reproduce ```pyth...
diff --git a/pygments/formatters/latex.py b/pygments/formatters/latex.py index 2f7971e..4c377af 100644 --- a/pygments/formatters/latex.py +++ b/pygments/formatters/latex.py @@ -133,16 +133,15 @@ STYLE_TEMPLATE = r''' def _get_ttype_name(ttype): - fname = STANDARD_TYPES.get(ttype) + return fname + aname ...
["tests/test_cmdline.py::test_outfile", "tests/test_basic_api.py::test_formatter_public_api[LatexFormatter]", "tests/test_basic_api.py::test_formatter_unicode_handling[LatexFormatter]", "tests/test_terminal_formatter.py::test_others_work", "tests/test_latex_formatter.py::test_embedded_lexer", "tests/test_latex_formatte...
["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
20
6
928
0
0.6
1
0.75
1
0.221333
80.939
7,517
swe_smith::train::22419
swe_smith
train
22,419
tweepy__tweepy.91a41c6e.func_basic__w70kypho
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### TypeError when calling API methods with payload decorators Hello! 👋 I've encountered an issue with the `payload` decorator in the `tweepy/api.py` file. After applying a recent change, several API methods are throwing a `TypeError`. It seems like the arguments are being swapped incorrectly within the decorator, w...
diff --git a/tweepy/api.py b/tweepy/api.py index 37caf07..6dbd54d 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -41,9 +41,9 @@ def payload(payload_type, **payload_kwargs): def decorator(method): @functools.wraps(method) def wrapper(*args, **kwargs): - kwargs['payload_list'] = paylo...
["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...
["tests/test_api.py::TweepyAPITests::testparserargumenthastobeaparserinstance", "tests/test_api.py::TweepyAPITests::testupdateprofilebannerimage", "tests/test_api.py::TweepyCacheTests::testfilecache", "tests/test_api.py::TweepyCacheTests::testmemorycache", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_bookma...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
6
61
1,208
0
0.6
1
0.75
1
0.221333
80.939
7,518
swe_smith::train::46524
swe_smith
train
46,524
conan-io__conan.86f29e13.pr_17658
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
Version.in_range() method is missing Description The `Version` class is missing the `in_range()` method which is needed to check if a version is within a specified version range. Consider the following code: ```python from conan.internal.model.version import Version v = Version('1.0') v.in_range('>=1.0 <2') # Thi...
diff --git a/conan/internal/model/version.py b/conan/internal/model/version.py index ab7518c..989443c 100644 --- a/conan/internal/model/version.py +++ b/conan/internal/model/version.py @@ -1,6 +1,4 @@ from functools import total_ordering -from typing import Optional - from conan.errors import ConanException @@ -1...
["test/unittests/model/version/test_version_comparison.py::test_version_in_range"]
["test/unittests/model/version/test_version_comparison.py::test_comparison[1-2]", "test/unittests/model/version/test_version_comparison.py::test_comparison[1.0-1.1]", "test/unittests/model/version/test_version_comparison.py::test_comparison[1.0.2-1.1.0]", "test/unittests/model/version/test_version_comparison.py::test_c...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
9
1
1,148
0
0.6
1
0.75
1
0.221333
80.939
7,519
swe_smith::train::27406
swe_smith
train
27,406
tkrajina__gpxpy.09fc46b3.func_pm_remove_loop__0h1unrru
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX add_missing_speeds method fails with TypeError #### Description When calling `add_missing_speeds()` on a GPX object with track points that have missing speed data, the method raises a TypeError about unsupported operand types. #### Steps/Code to Reproduce ```python import gpxpy import datetime gpx = gpxpy.GPX(...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..d4c1391 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -2594,13 +2594,6 @@ class GPX: ] times_dists.insert(0, time_dist_before) times_dists.append(time_dist_after) - - for i, point in enumerate(interval): - ...
["test.py::GPXTests::test_add_missing_speeds"]
["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
7
1
1,188
0
0.6
1
0.75
1
0.221333
80.939
7,520
swe_smith::train::3463
swe_smith
train
3,463
pygments__pygments.27649ebb.combine_file__p8iu0q46
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
XQueryLexer class inheritance broken #### Description The XQueryLexer class is missing its parent class inheritance, causing it to not inherit from ExtendedRegexLexer. This breaks basic lexer functionality and causes AttributeError when trying to use the lexer. #### Steps/Code to Reproduce ```python from pygments.l...
diff --git a/pygments/lexers/webmisc.py b/pygments/lexers/webmisc.py index 815c7a3..11c7442 100644 --- a/pygments/lexers/webmisc.py +++ b/pygments/lexers/webmisc.py @@ -54,7 +54,7 @@ class DuelLexer(RegexLexer): } -class XQueryLexer(ExtendedRegexLexer): +class XQueryLexer(): """ An XQuery lexer, pars...
["tests/test_cmdline.py::test_C_opt", "tests/test_cmdline.py::test_stdin", "tests/test_basic_api.py::test_lexer_classes[XQueryLexer]", "tests/test_basic_api.py::test_random_input[XQueryLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_lexer_options[XQueryLexer]", "tests/examplefiles/xq...
["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
21
20
908
0
0.6
1
0.75
1
0.221333
80.939
7,521
swe_smith::train::8118
swe_smith
train
8,118
cantools__cantools.0c6a7871.func_pm_remove_cond__8wwy5yt4
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
C source generation fails with NameError: name '_use_float' is not defined #### Description When generating C source code from CAN database files, the code generation process fails with a NameError indicating that the variable `_use_float` is not defined. #### Steps/Code to Reproduce ```python import cantools # Lo...
diff --git a/src/cantools/database/can/c_source.py b/src/cantools/database/can/c_source.py index cf3c40e..b0a9b9f 100644 --- a/src/cantools/database/can/c_source.py +++ b/src/cantools/database/can/c_source.py @@ -1506,14 +1506,6 @@ def _generate_definitions(database_name: str, signals_init_body = '' ...
["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_database_name", "tests/test_command_line.py::CanToolsCommandLineTest::tes...
["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,028
0
0.6
1
0.75
1
0.221333
80.939
7,522
swe_smith::train::46629
swe_smith
train
46,629
python-trio__trio.cfbbe2c1.combine_file__iqvb7ggb
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SSLStream attribute access causes infinite recursion #### Description When trying to access SSL object attributes through SSLStream, the code enters infinite recursion and crashes with `RecursionError: maximum recursion depth exceeded`. #### Steps/Code to Reproduce ```python import trio import ssl async def main()...
diff --git a/src/trio/_ssl.py b/src/trio/_ssl.py index 0a0419f..8c767a2 100644 --- a/src/trio/_ssl.py +++ b/src/trio/_ssl.py @@ -247,7 +247,7 @@ class _Once: @property def done(self) -> bool: - return bool(self._done.is_set()) + return not self._done.is_set() _State = _Enum("_State", ["OK...
["src/trio/_tests/test_highlevel_ssl_helpers.py::test_open_ssl_over_tcp_stream_and_everything_else[tls13]", "src/trio/_tests/test_highlevel_ssl_helpers.py::test_open_ssl_over_tcp_stream_and_everything_else[tls12]", "src/trio/_tests/test_socket.py::test_many_sockets", "src/trio/_tests/test_ssl.py::test_ssl_client_basics...
["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
8
64
1,167
0
0.6
1
0.75
1
0.221167
80.9385
7,523
swe_smith::train::11571
swe_smith
train
11,571
andialbrecht__sqlparse.e57923b3.combine_file__gclrk0qy
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
[Bug]: SQL reindent filter breaks formatting ### Description After recent changes to the reindent filter, SQL formatting is completely broken. The reindent functionality is not working properly and causes AttributeError exceptions. ### Reproduction ```python import sqlparse # Try to format a simple SQL query with ...
diff --git a/sqlparse/filters/reindent.py b/sqlparse/filters/reindent.py index 7dc2b82..0db0150 100644 --- a/sqlparse/filters/reindent.py +++ b/sqlparse/filters/reindent.py @@ -42,14 +42,13 @@ class ReindentFilter: def _get_offset(self, token): raw = ''.join(map(str, self._flatten_up_to_token(token))) -...
["tests/test_cli.py::test_valid_args", "tests/test_format.py::TestFormatReindent::test_stmts", "tests/test_format.py::TestFormatReindent::test_keywords", "tests/test_format.py::TestFormatReindent::test_keywords_between", "tests/test_format.py::TestFormatReindent::test_parenthesis", "tests/test_format.py::TestFormatRein...
["tests/test_cli.py::test_cli_main_empty", "tests/test_cli.py::test_parser_empty", "tests/test_cli.py::test_main_help", "tests/test_cli.py::test_invalid_choice", "tests/test_cli.py::test_invalid_args", "tests/test_cli.py::test_invalid_infile", "tests/test_cli.py::test_invalid_outfile", "tests/test_cli.py::test_stdout",...
jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3
true
null
1
15
37
1,027
0
0.6
1
0.75
1
0.221167
80.9385
7,524
swe_smith::train::39065
swe_smith
train
39,065
pallets__jinja.ada0a9a6.func_basic__hyvfc5ib
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Attribute access priority changed in template variable resolution #### Description When accessing variables in Jinja2 templates, the priority between attribute access and item access has been reversed. Previously, attribute access was tried first, then item access. Now item access is attempted before attribute access...
diff --git a/src/jinja2/environment.py b/src/jinja2/environment.py index 0b303d5..cf62558 100644 --- a/src/jinja2/environment.py +++ b/src/jinja2/environment.py @@ -485,13 +485,13 @@ class Environment: """Get an item or attribute of an object but prefer the attribute. Unlike :meth:`getitem` the attrib...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestUndefined::test_logging_undefined", "tests/test_api.py::TestUndefined::test_chainable_undefined"]
["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", "tests/test_api.py::TestExtendedAPI::test_eval_finalize", "tes...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
8
3
1,167
0
0.6
1
0.75
1
0.221167
80.9385
7,525
swe_smith::train::21894
swe_smith
train
21,894
life4__textdistance.c3aca916.func_basic__ge2wpwt6
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
MongeElkan constructor parameters swapped causing AttributeError #### Description The MongeElkan algorithm constructor appears to have its parameters mixed up, causing AttributeError when trying to use the algorithm. When creating a MongeElkan instance, the algorithm and symmetric parameters seem to be assigned incor...
diff --git a/textdistance/algorithms/token_based.py b/textdistance/algorithms/token_based.py index d499b84..d6fccb9 100644 --- a/textdistance/algorithms/token_based.py +++ b/textdistance/algorithms/token_based.py @@ -234,10 +234,10 @@ class MongeElkan(_BaseSimilarity): qval: int = 1, external: bool = ...
["tests/test_common.py::test_normalization_range[alg16]", "tests/test_common.py::test_normalization_by_one[alg16]", "tests/test_common.py::test_normalization_same[alg16]", "tests/test_common.py::test_normalization_monotonic[alg16]", "tests/test_common.py::test_no_common_chars[alg16]", "tests/test_common.py::test_empty[...
["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
8
9
1,167
0
0.6
1
0.75
1
0.221167
80.9385
7,526
swe_smith::train::10379
swe_smith
train
10,379
paramiko__paramiko.23f92003.func_basic__a3f46odg
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
ECDSA key loading fails with "Can't handle curve" error #### Description When loading ECDSA keys, the library incorrectly raises an SSHException with "Can't handle curve of type {curvename}" even for supported curves. This appears to affect all ECDSA key operations including client connections and key comparisons. #...
diff --git a/paramiko/ecdsakey.py b/paramiko/ecdsakey.py index 6fd95fa..d4934d9 100644 --- a/paramiko/ecdsakey.py +++ b/paramiko/ecdsakey.py @@ -114,7 +114,6 @@ class ECDSAKey(PKey): password=None, vals=None, file_obj=None, - # TODO 4.0: remove; it does nothing since porting to cryptog...
["tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[ecdsa-256]", "tests/agent.py::AgentKey_::fields::defers_to_inner_key_when_present[ecdsa-256]", "tests/agent.py::AgentKey_::get_bits::defers_to_inner_key_when_present[ecdsa-256]", "tests/agent.py::AgentKey_::asbytes::defers_to_inner_key_when_present[ecdsa...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
16
35
1,007
0
0.6
1
0.75
1
0.221167
80.9385
7,527
swe_smith::train::8042
swe_smith
train
8,042
cantools__cantools.0c6a7871.func_pm_remove_assign__ascamgbb
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
KCD signal parsing fails with UnboundLocalError for is_float variable #### Description When loading KCD files, the parser throws an `UnboundLocalError: local variable 'is_float' referenced before assignment` error. This affects all KCD file operations including loading databases, encoding/decoding messages, and dumpi...
diff --git a/src/cantools/database/can/formats/kcd.py b/src/cantools/database/can/formats/kcd.py index a54c86c..838b54e 100644 --- a/src/cantools/database/can/formats/kcd.py +++ b/src/cantools/database/can/formats/kcd.py @@ -49,19 +49,15 @@ def _load_signal_element(signal, nodes): # Default values. name = N...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_convert.py::CanToolsConvertFullTest::test_kcd_dump_default_sort_signals", "tests/test_convert.py::CanToolsConvertFullTest::test_kcd_dump_sort_signals_by_name", "tests/test_database.py::CanToolsDatabaseTest::test_as_kcd_string", "tests/tes...
["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
11
32
1,107
0
0.6
1
0.75
1
0.221167
80.9385
7,528
swe_smith::train::27854
swe_smith
train
27,854
jsvine__pdfplumber.02ff4313.func_pm_ctrl_invert_if__mlxcx5jt
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
# Drawing lines with objects fails when "pts" attribute is missing ### Description I've discovered an issue with the `draw_line` method in the `PageImage` class. When trying to draw lines using objects that don't have a "pts" attribute, the code fails with a KeyError. The problem seems to be in the logic that determ...
diff --git a/pdfplumber/display.py b/pdfplumber/display.py index de77f0c..d95a297 100644 --- a/pdfplumber/display.py +++ b/pdfplumber/display.py @@ -189,18 +189,16 @@ class PageImage: points = points_or_obj # Else, use the "pts" attribute if available elif isinstance(points_or_obj, dict) ...
["tests/test_display.py::Test::test_debug_tablefinder"]
["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
6
1
1,207
0
0.6
1
0.75
1
0.221167
80.9385
7,529
swe_smith::train::20618
swe_smith
train
20,618
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__ctmd9mfc
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
DuckDB date arithmetic operations fail with UnboundLocalError #### Description When using date arithmetic operations in DuckDB dialect, the code raises an `UnboundLocalError` due to variables being referenced before assignment in the `_date_delta_sql` function. #### Steps/Code to Reproduce ```python import sqlglot ...
diff --git a/sqlglot/dialects/duckdb.py b/sqlglot/dialects/duckdb.py index b362cfe..eb4ac88 100644 --- a/sqlglot/dialects/duckdb.py +++ b/sqlglot/dialects/duckdb.py @@ -57,15 +57,14 @@ WINDOW_FUNCS_WITH_IGNORE_NULLS = ( def _date_delta_sql(self: DuckDB.Generator, expression: DATETIME_DELTA) -> str: - this = exp...
["tests/dialects/test_duckdb.py::TestDuckDB::test_cast", "tests/dialects/test_duckdb.py::TestDuckDB::test_duckdb", "tests/dialects/test_duckdb.py::TestDuckDB::test_time"]
["tests/dialects/test_duckdb.py::TestDuckDB::test_analyze", "tests/dialects/test_duckdb.py::TestDuckDB::test_array", "tests/dialects/test_duckdb.py::TestDuckDB::test_array_index", "tests/dialects/test_duckdb.py::TestDuckDB::test_at_sign_to_abs", "tests/dialects/test_duckdb.py::TestDuckDB::test_attach_detach", "tests/di...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
13
3
1,067
0
0.6
1
0.75
1
0.221167
80.9385
7,530
swe_smith::train::7977
swe_smith
train
7,977
cantools__cantools.0c6a7871.func_pm_ctrl_shuffle__osdkgsqb
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML parser fails with UnboundLocalError when loading files #### Description When trying to load ARXML files, the parser crashes with `UnboundLocalError: local variable 'root' referenced before assignment`. This affects all ARXML file loading operations. #### Steps/Code to Reproduce ```python import cantools # Tr...
diff --git a/src/cantools/database/can/formats/arxml/__init__.py b/src/cantools/database/can/formats/arxml/__init__.py index 6171755..105e75d 100644 --- a/src/cantools/database/can/formats/arxml/__init__.py +++ b/src/cantools/database/can/formats/arxml/__init__.py @@ -41,23 +41,20 @@ def load_string(string:str, ...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_database.py::CanToolsDataba...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
22
25
887
0
0.6
1
0.75
1
0.221167
80.9385
7,531
swe_smith::train::43899
swe_smith
train
43,899
pydata__patsy.a5d16484.func_basic__45mvm3vn
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Formula parsing broken for simple expressions #### Description When parsing basic formulas, the parser is incorrectly wrapping expressions with "!" instead of "~" operators, causing formula evaluation to fail. #### Steps/Code to Reproduce ```python from patsy import dmatrix import numpy as np # Simple formula that...
diff --git a/patsy/parse_formula.py b/patsy/parse_formula.py index 1a324f7..2d20327 100644 --- a/patsy/parse_formula.py +++ b/patsy/parse_formula.py @@ -142,16 +142,16 @@ def parse_formula(code, extra_operators=[]): code = "~ 1" for op in extra_operators: - if op.precedence < 0: - rais...
["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
10
27
1,126
0
0.6
1
0.75
1
0.221
80.938
7,532
swe_smith::train::7798
swe_smith
train
7,798
cantools__cantools.0c6a7871.func_basic__wdaywdj0
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
DBC attribute definitions rel dumping produces malformed output #### Description When dumping DBC files with relational attribute definitions, the generated output contains syntax errors that prevent the file from being loaded back. #### Steps/Code to Reproduce ```python import cantools # Load a DBC file with rela...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..01c44ae 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -677,7 +677,7 @@ def _dump_attribute_definitions(database: InternalDatabase) -> list[str]: def ...
["tests/test_database.py::CanToolsDatabaseTest::test_relation_attributes", "tests/test_database.py::CanToolsDatabaseTest::test_relation_message_attributes"]
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
14
2
1,046
0
0.6
1
0.75
1
0.221
80.938
7,533
swe_smith::train::24902
swe_smith
train
24,902
marshmallow-code__marshmallow.9716fc62.func_pm_remove_cond__ihhp76sz
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
# Length validator ignores 'equal' parameter ## Description The `Length` validator in marshmallow has a bug where it completely ignores the `equal` parameter. This is a problem when you need to validate that a value has an exact length. For example, if you have a tuple field that requires exactly 2 elements, the val...
diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py index e4536d8..4dfbc75 100644 --- a/src/marshmallow/validate.py +++ b/src/marshmallow/validate.py @@ -407,11 +407,6 @@ class Length(Validator): def __call__(self, value: typing.Sized) -> typing.Sized: length = len(value) - if ...
["tests/test_deserialization.py::TestFieldDeserialization::test_tuple_field_deserialize_invalid_length", "tests/test_validate.py::test_length_equal", "tests/test_validate.py::test_length_custom_message"]
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
6
3
1,206
0
0.6
1
0.75
1
0.221
80.938
7,534
swe_smith::train::29550
swe_smith
train
29,550
django__channels.a144b4b8.combine_file__r7dki93q
swesmith/django__channels.a144b4b8
django/channels
python
null
AsyncConsumer.as_asgi() returns None instead of ASGI application #### Description When using `AsyncConsumer.as_asgi()` to create an ASGI application, the method returns `None` instead of the expected ASGI application function. This breaks consumer functionality and causes TypeErrors when the application is called. #...
diff --git a/channels/consumer.py b/channels/consumer.py index fc06543..a170716 100644 --- a/channels/consumer.py +++ b/channels/consumer.py @@ -91,15 +91,16 @@ class AsyncConsumer: """ async def app(scope, receive, send): - consumer = cls(**initkwargs) - return await consumer(...
["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_generic_websocket.py::test_websocket...
["tests/test_generic_websocket.py::test_accept_headers[True]", "tests/test_generic_websocket.py::test_close_reason[True]", "tests/security/test_auth.py::test_login_no_session_in_scope", "tests/security/test_auth.py::test_login_no_user_in_scope", "tests/security/test_auth.py::test_login_user_as_argument", "tests/securit...
jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8
true
null
1
18
21
966
0
0.6
1
0.75
1
0.221
80.938
7,535
swe_smith::train::48887
swe_smith
train
48,887
facebookresearch__hydra.0f03eb60.func_pm_remove_assign__opmo943l
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
ChoiceSweep and RangeSweep shuffle functionality broken #### Description When using shuffle with ChoiceSweep or RangeSweep, the shuffle operation fails because the list variable is not properly initialized before being shuffled. #### Steps/Code to Reproduce ```python from hydra.core.override_parser.overrides_parser...
diff --git a/hydra/core/override_parser/types.py b/hydra/core/override_parser/types.py index f020ccb..8c88da5 100644 --- a/hydra/core/override_parser/types.py +++ b/hydra/core/override_parser/types.py @@ -349,13 +349,11 @@ class Override: lst = self._value elif isinstance(self._value, ChoiceSweep)...
["tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_2_jobs[basic-overrides0]", "tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_2_optimizers[basic-overrides0]", "tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_over_unspecified_mandatory_default[basic-overrides0]", "tests/test_basic_lau...
["build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.py::test_find[...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
9
33
1,146
0
0.6
1
0.75
1
0.221
80.938
7,536
swe_smith::train::44392
swe_smith
train
44,392
pydata__patsy.a5d16484.func_pm_op_swap__rhuvjb3b
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
String formatting broken in mgcv_cubic_splines error messages #### Description Error messages in `_get_all_sorted_knots` function are not displaying properly due to incorrect string formatting syntax. #### Steps/Code to Reproduce ```python import numpy as np from patsy.mgcv_cubic_splines import _get_all_sorted_knot...
diff --git a/patsy/mgcv_cubic_splines.py b/patsy/mgcv_cubic_splines.py index 5f93680..7b3af7c 100644 --- a/patsy/mgcv_cubic_splines.py +++ b/patsy/mgcv_cubic_splines.py @@ -432,13 +432,13 @@ def _get_all_sorted_knots( if upper_bound < lower_bound: raise ValueError( - "lower_bound > upper_boun...
["patsy/mgcv_cubic_splines.py::test__get_all_sorted_knots"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
21
1
906
0
0.6
1
0.75
1
0.221
80.938
7,537
swe_smith::train::43418
swe_smith
train
43,418
theskumar__python-dotenv.2b8635b7.func_pm_remove_loop__c774yrzp
swesmith/theskumar__python-dotenv.2b8635b7
theskumar/python-dotenv
python
null
find_dotenv() function doesn't search for .env files anymore Description I've noticed that the `find_dotenv()` function is no longer working properly. It seems to be unable to locate .env files in the current directory or any parent directories. I have a simple project structure with a .env file in the root director...
diff --git a/src/dotenv/main.py b/src/dotenv/main.py index 052de05..9691456 100644 --- a/src/dotenv/main.py +++ b/src/dotenv/main.py @@ -307,17 +307,11 @@ def find_dotenv( frame_filename = frame.f_code.co_filename path = os.path.dirname(os.path.abspath(frame_filename)) - for dirname in _walk_to_r...
["tests/test_ipython.py::test_ipython_existing_variable_override", "tests/test_ipython.py::test_ipython_new_variable", "tests/test_main.py::test_find_dotenv_found", "tests/test_main.py::test_load_dotenv_in_current_dir", "tests/test_zip_imports.py::test_load_dotenv_outside_zip_file_when_called_in_zipfile"]
["tests/test_cli.py::test_list[shell-x='a\\nb\\nc'-x='a\\nb\\nc'\\n]", "tests/test_cli.py::test_list_non_existent_file", "tests/test_cli.py::test_list_not_a_file", "tests/test_cli.py::test_list_no_file", "tests/test_cli.py::test_get_existing_value", "tests/test_cli.py::test_get_non_existent_value", "tests/test_cli.py::...
jyangballin/swesmith.x86_64.theskumar_1776_python-dotenv.2b8635b7
true
null
1
6
5
1,206
0
0.6
1
0.75
1
0.221
80.938
7,538
swe_smith::train::18114
swe_smith
train
18,114
pndurette__gTTS.dbcda4f3.func_basic__2tnqehsy
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
gTTSError exception initialization broken When creating a gTTSError exception, the error message and exception behavior is completely broken. The constructor arguments are being assigned to wrong attributes and the exception message is not being set correctly. #### Steps/Code to Reproduce ```python from gtts import ...
diff --git a/gtts/tts.py b/gtts/tts.py index eae351f..ba643fb 100644 --- a/gtts/tts.py +++ b/gtts/tts.py @@ -341,15 +341,15 @@ class gTTSError(Exception): """Exception that uses context to present a meaningful error message""" def __init__(self, msg=None, **kwargs): - self.tts = kwargs.pop("tts", Non...
["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
14
77
1,045
0
0.6
1
0.75
1
0.220833
80.9375
7,539
swe_smith::train::41236
swe_smith
train
41,236
scanny__python-pptx.278b47b1.func_basic__k9le1xtt
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
RGBColor constructor swaps red and green values and rejects valid RGB values #### Description When creating an RGBColor instance, the red and green values are being swapped, and valid RGB values of 0 and 255 are incorrectly rejected. #### Steps/Code to Reproduce ```python from pptx.dml.color import RGBColor # This...
diff --git a/src/pptx/dml/color.py b/src/pptx/dml/color.py index 5415582..d7fbd51 100644 --- a/src/pptx/dml/color.py +++ b/src/pptx/dml/color.py @@ -279,10 +279,10 @@ class RGBColor(tuple): def __new__(cls, r, g, b): msg = "RGBColor() takes three integer values 0-255" - for val in (r, g, b): - ...
["tests/dml/test_color.py::DescribeColorFormat::it_can_set_itself_to_an_RGB_color[none]", "tests/dml/test_color.py::DescribeColorFormat::it_can_set_itself_to_an_RGB_color[hsl]", "tests/dml/test_color.py::DescribeColorFormat::it_can_set_itself_to_an_RGB_color[prst]", "tests/dml/test_color.py::DescribeColorFormat::it_can...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
6
8
1,205
0
0.6
1
0.75
1
0.220833
80.9375
7,540
swe_smith::train::1898
swe_smith
train
1,898
agronholm__typeguard.b6a7e438.func_pm_remove_assign__qcjm15h0
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
get_type_name function breaks with generic types when origin is undefined #### Description The `get_type_name` function in `_utils.py` fails with an `UnboundLocalError` when processing certain generic types. This happens when the function tries to access the `origin` variable that hasn't been defined in the current s...
diff --git a/src/typeguard/_utils.py b/src/typeguard/_utils.py index e8f9b03..2bb6ff7 100644 --- a/src/typeguard/_utils.py +++ b/src/typeguard/_utils.py @@ -66,10 +66,9 @@ def get_type_name(type_: Any) -> str: name = candidate break else: - origin = get_origin(type_) candi...
["tests/test_checkers.py::TestTypevar::test_collection_constraints_fail", "tests/test_checkers.py::TestRecursiveType::test_valid", "tests/test_checkers.py::TestRecursiveType::test_fail", "tests/test_instrumentation.py::test_pep_604_union_args[typechecked]", "tests/test_instrumentation.py::test_pep_604_union_args[import...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
6
5
1,205
0
0.6
1
0.75
1
0.220833
80.9375
7,541
swe_smith::train::29025
swe_smith
train
29,025
tox-dev__pipdeptree.c31b6418.combine_file__pbsjb4gg
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
Command line argument validation broken after recent changes #### Description The CLI argument parsing is failing with validation errors when using basic commands. The argument parser seems to have issues with default values and enum choices validation. #### Steps/Code to Reproduce ```python from pipdeptree._cli im...
diff --git a/src/pipdeptree/_cli.py b/src/pipdeptree/_cli.py index 46a984a..0e81c1c 100644 --- a/src/pipdeptree/_cli.py +++ b/src/pipdeptree/_cli.py @@ -159,12 +159,12 @@ def get_options(args: Sequence[str] | None) -> Options: parser = build_parser() parsed_args = parser.parse_args(args) - if parsed_args...
["tests/render/test_render.py::test_json_routing", "tests/render/test_render.py::test_json_tree_routing", "tests/render/test_render.py::test_mermaid_routing", "tests/render/test_render.py::test_grahpviz_routing", "tests/render/test_render.py::test_text_routing", "tests/test_cli.py::test_parser_default", "tests/test_cli...
["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack...
jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418
true
null
1
16
39
1,005
0
0.6
1
0.75
1
0.220833
80.9375
7,542
swe_smith::train::43639
swe_smith
train
43,639
cloudpipe__cloudpickle.6220b0ce.func_pm_ctrl_shuffle__rqjdy546
swesmith/cloudpipe__cloudpickle.6220b0ce
cloudpipe/cloudpickle
python
null
Code object pickling broken due to misplaced variable assignment #### Description When pickling functions or classes, cloudpickle fails with `UnboundLocalError` because a variable is being used before it's defined in the `_code_reduce` function. #### Steps/Code to Reproduce ```python import cloudpickle def simple_...
diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py index 8c50ba1..e3c014d 100644 --- a/cloudpickle/cloudpickle.py +++ b/cloudpickle/cloudpickle.py @@ -811,15 +811,7 @@ def _enum_getstate(obj): def _code_reduce(obj): - """code object reducer.""" - # If you are not sure about the order of arg...
["tests/cloudpickle_test.py::CloudPickleTest::test_NamedTuple", "tests/cloudpickle_test.py::CloudPickleTest::test_abc", "tests/cloudpickle_test.py::CloudPickleTest::test_abstracts", "tests/cloudpickle_test.py::CloudPickleTest::test_bound_classmethod", "tests/cloudpickle_test.py::CloudPickleTest::test_classmethod", "tes...
["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/c...
jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce
true
null
1
21
134
905
0
0.6
1
0.75
1
0.220833
80.9375
7,543
swe_smith::train::38431
swe_smith
train
38,431
dbader__schedule.82a43db1.func_pm_remove_cond__t9rkf3hs
swesmith/dbader__schedule.82a43db1
dbader/schedule
python
null
# [Bug]: Invalid time units not being validated ## Bug summary When using a job with an invalid time unit, the scheduler doesn't validate the unit properly, causing unexpected errors later in execution. ## Code for reproduction ```python import schedule # This should raise a ScheduleValueError but doesn't job = sc...
diff --git a/schedule/__init__.py b/schedule/__init__.py index 8e12eeb..b010150 100644 --- a/schedule/__init__.py +++ b/schedule/__init__.py @@ -701,11 +701,6 @@ class Job: """ Compute the instant when this job should run next. """ - if self.unit not in ("seconds", "minutes", "hours", ...
["test_schedule.py::SchedulerTests::test_at_time", "test_schedule.py::SchedulerTests::test_time_units"]
["test_schedule.py::SchedulerTests::test_align_utc_offset_after_fold_fixate", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_change", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold", "test_schedule.py::SchedulerT...
jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1
true
null
1
6
2
1,205
0
0.6
1
0.75
1
0.220833
80.9375
7,544
swe_smith::train::20107
swe_smith
train
20,107
kurtmckee__feedparser.cad965a3.func_pm_remove_cond__etiihsak
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
ISO8601 date parser crashes on certain date formats Description The ISO8601 date parser is throwing AttributeError when trying to parse certain date strings. This happens with dates like '031231', '03-12-31', '-03-12', '03335', and some others. Steps/Code to Reproduce ```python import feedparser from feedparser.dat...
diff --git a/feedparser/datetimes/iso8601.py b/feedparser/datetimes/iso8601.py index f8f6fe3..8d365a1 100644 --- a/feedparser/datetimes/iso8601.py +++ b/feedparser/datetimes/iso8601.py @@ -78,8 +78,6 @@ def _parse_date_iso8601(date_string): m = _iso8601_match(date_string) if m: break - ...
["tests/test_date_parsers.py::test_date_parser[_parse_date_iso8601-031231-expected_value6]", "tests/test_date_parsers.py::test_date_parser[_parse_date_iso8601--03-12-expected_value8]", "tests/test_date_parsers.py::test_date_parser[_parse_date_iso8601-03335-expected_value9]", "tests/test_date_parsers.py::test_date_parse...
["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
1
21
7
905
0
0.6
1
0.75
1
0.220833
80.9375
7,545
swe_smith::train::11005
swe_smith
train
11,005
rsalmei__alive-progress.35853799.combine_file__z8u6oqgp
swesmith/rsalmei__alive-progress.35853799
rsalmei/alive-progress
python
null
Progress bar breaks with TypeError when calling bar function #### Description When using alive_progress, the progress bar functionality is broken and raises a TypeError. The bar function seems to be receiving incorrect arguments. #### Steps/Code to Reproduce ```python from alive_progress import alive_bar # Simple ...
diff --git a/alive_progress/core/progress.py b/alive_progress/core/progress.py index a0e266a..ec171f7 100644 --- a/alive_progress/core/progress.py +++ b/alive_progress/core/progress.py @@ -386,7 +386,7 @@ class _Widget: # pragma: no cover self.f += ' ' # space separator for print_cells. def __call...
["tests/core/test_progress.py::test_progress_bar[True-True-True-True]", "tests/core/test_progress.py::test_progress_bar[True-True-True-False]", "tests/core/test_progress.py::test_progress_bar[True-True-False-True]", "tests/core/test_progress.py::test_progress_bar[True-True-False-False]", "tests/core/test_progress.py::t...
["tests/animations/test_bars.py::test_bar_tip_background[--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[_-=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[-0.0-Fa...
jyangballin/swesmith.x86_64.rsalmei_1776_alive-progress.35853799
true
null
1
15
25
1,025
0
0.6
1
0.75
1
0.220833
80.9375
7,546
swe_smith::train::22838
swe_smith
train
22,838
graphql-python__graphene.82903263.func_basic__bzp99qk2
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
DateTime scalar returns invalid string values instead of raising errors #### Description The DateTime scalar type is not properly validating input values and is returning invalid strings instead of raising GraphQLError when given malformed datetime strings. #### Steps/Code to Reproduce ```python import graphene fro...
diff --git a/graphene/types/datetime.py b/graphene/types/datetime.py index d8388f8..7afc2db 100644 --- a/graphene/types/datetime.py +++ b/graphene/types/datetime.py @@ -66,16 +66,16 @@ class DateTime(Scalar): @staticmethod def parse_value(value): - if isinstance(value, datetime.datetime): + if...
["graphene/types/tests/test_datetime.py::test_datetime_query", "graphene/types/tests/test_datetime.py::test_datetime_query_with_variables", "graphene/types/tests/test_datetime.py::test_bad_datetime_query", "graphene/types/tests/test_datetime.py::test_datetime_query_variable", "graphene/types/tests/test_datetime.py::tes...
["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i...
jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263
true
null
1
8
6
1,165
0
0.6
1
0.75
1
0.220833
80.9375
7,547
swe_smith::train::14152
swe_smith
train
14,152
python-openxml__python-docx.0cf6d71f.func_pm_class_rm_funcs__e60n26y1
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Missing main_document_part and part_related_by methods break document functionality #### Description After recent changes, accessing the main document part or finding parts by relationship type fails with AttributeError. This affects basic document operations like iterating through content. #### Steps/Code to Reprod...
diff --git a/src/docx/opc/package.py b/src/docx/opc/package.py index 3b1eef2..9a0e657 100644 --- a/src/docx/opc/package.py +++ b/src/docx/opc/package.py @@ -97,16 +97,6 @@ class OpcPackage: """ return self.rels.add_relationship(reltype, target, rId, is_external) - @property - def main_document...
["tests/opc/test_package.py::DescribeOpcPackage::it_can_find_a_part_related_by_reltype", "tests/parts/test_story.py::DescribeStoryPart::it_knows_the_main_document_part_to_help", "tests/test_blkcntnr.py::DescribeBlockItemContainer::it_can_iterate_its_inner_content", "tests/test_section.py::DescribeSection::it_can_iterat...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
19
4
945
0
0.6
1
0.75
1
0.220833
80.9375
7,548
swe_smith::train::48211
swe_smith
train
48,211
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__d5qn7dsl
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Linter parse_string method broken after code reorganization #### Description The `parse_string` method in the Linter class appears to have broken control flow after some code reorganization. When trying to parse SQL strings, the method fails with `UnboundLocalError` for the `rendered` variable. #### Steps/Code to Re...
diff --git a/src/sqlfluff/core/linter/linter.py b/src/sqlfluff/core/linter/linter.py index 5e5474f..8ee3049 100644 --- a/src/sqlfluff/core/linter/linter.py +++ b/src/sqlfluff/core/linter/linter.py @@ -896,27 +896,26 @@ class Linter: encoding: str = "utf-8", parse_statistics: bool = False, ) -> Pa...
["test/core/linter/linter_test.py::test__linter__skip_large_bytes[0-False]", "test/core/linter/linter_test.py::test__linter__skip_large_bytes[2000-False]", "test/core/linter/linter_test.py::test__linter__lint_string_vs_file[test/fixtures/linter/indentation_errors.sql]", "test/core/linter/linter_test.py::test__linter__l...
["test/core/linter/linter_test.py::test__linter__skip_large_bytes[5-True]", "test/core/linter/linter_test.py::test__linter__linting_result__sum_dicts", "test/core/linter/linter_test.py::test__linter__linting_result__combine_dicts", "test/core/linter/linter_test.py::test__linter__linting_result_check_tuples", "test/core...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
21
11
905
0
0.6
1
0.75
1
0.220833
80.9375
7,549
r2e_gym::train::462
r2e_gym
train
462
orange3__993d59c3c97cd86256753c69389caf64323ce407
orange3
biolab/orange3
python
993d59c3c97cd86256753c69389caf64323ce407
**Title:** `cant_stratify` Warning Missing, Causing Errors in OWTestAndScore Widget **Description:** When using the `OWTestAndScore` widget with stratified K-Fold cross-validation, if the dataset contains a class with fewer instances than the number of folds, the widget should display a warning indicating that stratif...
diff --git a/Orange/widgets/evaluate/owtestandscore.py b/Orange/widgets/evaluate/owtestandscore.py --- a/Orange/widgets/evaluate/owtestandscore.py +++ b/Orange/widgets/evaluate/owtestandscore.py @@ -207,12 +207,16 @@ scores_not_computed = Msg("Some scores could not be computed.") test_data_unused = Ms...
diff --git a/Orange/widgets/evaluate/tests/test_owtestandscore.py b/Orange/widgets/evaluate/tests/test_owtestandscore.py --- a/Orange/widgets/evaluate/tests/test_owtestandscore.py +++ b/Orange/widgets/evaluate/tests/test_owtestandscore.py @@ -422,6 +422,52 @@ OWTestAndScore.KFold, 0), ...
null
null
namanjain12/orange3_final:993d59c3c97cd86256753c69389caf64323ce407
true
null
1
35
null
1,337
0
0.75
1
0.6375
1
0.3395
80.93725
7,550
swe_bench::test::986
swe_bench
test
986
matplotlib__matplotlib-21617
matplotlib/matplotlib
matplotlib/matplotlib
python
f93c0a3dcb82feed0262d758626c90d4002685f3
[Bug]: Text sometimes is missing when figure saved to EPS ### Bug summary I'm using cartopy to render data in polar projection. After an update I noticed that labels and title is not anymore rendered in saved eps file, though it was rendered in Jupyter notebook. I managed to simplify the code and found that matplotlib...
I can't easily test with cartopy 0.18.0 right now, but at least with 0.20, I cannot repro the issue. Unfortunately also reproduces with cartopy 0.20.0 on my machine Perhaps try attaching the eps file, so that we can check whether it's a problem on the viewer side? The `mpl_3.4.3_bad.eps` is the only one without text re...
diff --git a/lib/matplotlib/backends/backend_ps.py b/lib/matplotlib/backends/backend_ps.py --- a/lib/matplotlib/backends/backend_ps.py +++ b/lib/matplotlib/backends/backend_ps.py @@ -429,7 +429,7 @@ def _get_clip_cmd(self, gc): key = (path, id(trf)) custom_clip_cmd = self._clip_paths.get(key) ...
diff --git a/lib/matplotlib/tests/test_backend_ps.py b/lib/matplotlib/tests/test_backend_ps.py --- a/lib/matplotlib/tests/test_backend_ps.py +++ b/lib/matplotlib/tests/test_backend_ps.py @@ -1,16 +1,17 @@ -import io +from collections import Counter from pathlib import Path +import io import re import tempfile imp...
["lib/matplotlib/tests/test_backend_ps.py::test_no_duplicate_definition"]
["lib/matplotlib/tests/test_backend_ps.py::test_savefig_to_stringio[ps-portrait]", "lib/matplotlib/tests/test_backend_ps.py::test_savefig_to_stringio[ps-landscape]", "lib/matplotlib/tests/test_backend_ps.py::test_savefig_to_stringio[ps", "lib/matplotlib/tests/test_backend_ps.py::test_savefig_to_stringio[eps-portrait]",...
null
true
2021-11-12T23:45:40Z
1
4
1
1,994
0
0.8
1
0.7
0.8
0.345667
80.937
7,551
swe_smith::train::44462
swe_smith
train
44,462
pydata__patsy.a5d16484.func_pm_remove_cond__w2mafz7s
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
DesignMatrix construction fails with TypeError when num_rows is None #### Description When building design matrices, the code fails with a `TypeError: 'NoneType' object cannot be interpreted as an integer` error. This happens when `num_rows` is not properly initialized before being used to create the matrix shape. #...
diff --git a/patsy/build.py b/patsy/build.py index cbe2524..32b6bf2 100644 --- a/patsy/build.py +++ b/patsy/build.py @@ -809,15 +809,6 @@ def _build_design_matrix(design_info, factor_info_to_values, dtype): if design_info.factor_infos.get(factor_info.factor) is not factor_info: continue f...
["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
10
32
1,124
0
0.6
1
0.75
1
0.220667
80.937
7,552
swe_smith::train::46969
swe_smith
train
46,969
python-trio__trio.cfbbe2c1.func_basic__ofux08f7
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
MemorySendChannel.close() doesn't properly close channel #### Description When calling `close()` on a `MemorySendChannel`, the channel doesn't get properly closed and continues to behave as if it's still open. This causes unexpected behavior where operations that should fail with `ClosedResourceError` instead succeed...
diff --git a/src/trio/_channel.py b/src/trio/_channel.py index 6410d91..6dbf59f 100644 --- a/src/trio/_channel.py +++ b/src/trio/_channel.py @@ -267,18 +267,20 @@ class MemorySendChannel(SendChannel[SendType], metaclass=NoPublicConstructor): """ if self._closed: return - self._clos...
["src/trio/_tests/test_channel.py::test_channel", "src/trio/_tests/test_channel.py::test_close_basics", "src/trio/_tests/test_channel.py::test_close_sync", "src/trio/_tests/test_dtls.py::test_swap_client_server"]
["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
8
4
1,164
0
0.6
1
0.75
1
0.220667
80.937
7,553
swe_smith::train::39191
swe_smith
train
39,191
pallets__jinja.ada0a9a6.func_basic__qgz1jomi
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Node.iter_child_nodes() returns nodes in wrong order after parameter swap #### Description The `iter_child_nodes()` method in `jinja2.nodes.Node` is returning child nodes in the wrong order. This affects template compilation and causes various template features to break, particularly loop variables and context handli...
diff --git a/src/jinja2/nodes.py b/src/jinja2/nodes.py index 2f93b90..f063925 100644 --- a/src/jinja2/nodes.py +++ b/src/jinja2/nodes.py @@ -175,13 +175,13 @@ class Node(metaclass=NodeType): over all fields and yields the values of they are nodes. If the value of a field is a list all the nodes in th...
["tests/test_api.py::TestStreaming::test_basic_streaming", "tests/test_api.py::TestStreaming::test_buffered_streaming", "tests/test_async.py::test_async_iteration_in_templates_extended", "tests/test_async.py::TestAsyncForLoop::test_context_vars[<lambda>0]", "tests/test_async.py::TestAsyncForLoop::test_context_vars[iter...
["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
34
1,164
0
0.6
1
0.75
1
0.220667
80.937
7,554
swe_smith::train::24317
swe_smith
train
24,317
sunpy__sunpy.f8edfd5c.func_pm_remove_cond__ihtqpi5y
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
VSOClient.fetch() fails when passed QueryResponseRow #### Description When calling `VSOClient.fetch()` with a `QueryResponseRow` object, the method fails with an `AttributeError: 'bool' object has no attribute 'get_type'`. #### Steps/Code to Reproduce ```python from sunpy.net import vso # Create a VSO client clien...
diff --git a/sunpy/net/vso/vso.py b/sunpy/net/vso/vso.py index 8a0b1ef..01fed56 100644 --- a/sunpy/net/vso/vso.py +++ b/sunpy/net/vso/vso.py @@ -390,24 +390,14 @@ class VSOClient(BaseClient): path = path.expanduser() dl_set = True - if not downloader: - dl_set = False - ...
["sunpy/net/vso/tests/test_vso.py::test_row_to_table"]
["sunpy/net/vso/tests/test_vso.py::test_str", "sunpy/net/vso/tests/test_vso.py::test_repr", "sunpy/net/vso/tests/test_vso.py::test_show", "sunpy/net/vso/tests/test_vso.py::test_non_str_instrument", "sunpy/net/vso/tests/test_vso.py::test_iter_sort_response", "sunpy/net/vso/tests/test_vso.py::test_from_zeep_response", "s...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
14
1
1,044
0
0.6
1
0.75
1
0.220667
80.937
7,555
swe_smith::train::52513
swe_smith
train
52,513
pydicom__pydicom.7d361b3d.func_pm_remove_assign__pf2gd587
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
NameError: name 'collisions' is not defined in FileSet write operations #### Description When performing FileSet write operations, a `NameError` is raised because the variable `collisions` is referenced but not defined. This affects various FileSet operations including adding instances, removing instances, and writin...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..8526bdf 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -2081,7 +2081,7 @@ class FileSet: ) if not use_existing: - major_change |= self._stage["~"] + pass # Worst case...
["tests/test_fileset.py::TestRecordNode::test_file_id_singleton", "tests/test_fileset.py::TestFileInstance::test_path", "tests/test_fileset.py::TestFileInstance::test_load", "tests/test_fileset.py::TestFileInstance::test_for_moving", "tests/test_fileset.py::TestFileInstance::test_fileid", "tests/test_fileset.py::TestFi...
["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
7
37
1,184
0
0.6
1
0.75
1
0.220667
80.937
7,556
swe_smith::train::38340
swe_smith
train
38,340
burnash__gspread.a8be3b96.func_pm_remove_cond__sm4tcf8v
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
get_all_records() doesn't validate duplicate headers anymore #### Description When calling `get_all_records()` on a worksheet with duplicate column headers, the method no longer raises a `GSpreadException` as expected. This allows duplicate headers to pass through silently, which can lead to unexpected behavior when ...
diff --git a/gspread/worksheet.py b/gspread/worksheet.py index 883e3a2..de8ea42 100644 --- a/gspread/worksheet.py +++ b/gspread/worksheet.py @@ -562,10 +562,6 @@ class Worksheet: value_render_option=value_render_option, pad_values=True, ) - if entire_sheet == [[]]: - ...
["tests/worksheet_test.py::WorksheetTest::test_get_all_records_duplicate_keys"]
["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
7
1
1,184
0
0.6
1
0.75
1
0.220667
80.937
7,557
swe_smith::train::45786
swe_smith
train
45,786
conan-io__conan.86f29e13.func_pm_remove_assign__leq9zkie
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
Invalid Package Name Handling in RecipeReference It seems there's an issue with the validation of package names in the `RecipeReference` class. When creating a package with a name that includes uppercase letters, the validation does not raise an exception as expected. This behavior is inconsistent with the intended de...
diff --git a/conan/api/model/refs.py b/conan/api/model/refs.py index 1eff39b..4dfcb0e 100644 --- a/conan/api/model/refs.py +++ b/conan/api/model/refs.py @@ -124,7 +124,6 @@ class RecipeReference: that could contain version ranges """ from conan.api.output import ConanOutput - self_str ...
["test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming_complete", "test/unittests/model/other_settings_test.py::SettingsTest::test_invalid_settings4", "test/unittests/model/other_settings_test.py::SettingsTest::test_settings_as_a_dict_conanfile", "test/unittests/model/other_settings_test.py::Set...
["test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_new_print", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_new_print_save", "test/unittests/model/info_test.py::test_false_values_affect_none", ...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
6
8
1,204
0
0.6
1
0.75
1
0.220667
80.937
7,558
swe_smith::train::43735
swe_smith
train
43,735
sloria__environs.73c372df.pr_364
swesmith/sloria__environs.73c372df
sloria/environs
python
null
read_env() method no longer supports returning the path of the loaded .env file Description I noticed that in the latest version, the `read_env()` method no longer supports the `return_path` parameter. This parameter was previously used to get the path of the loaded .env file instead of a boolean indicating if the fi...
diff --git a/src/environs/__init__.py b/src/environs/__init__.py index 00f6072..76e7d82 100644 --- a/src/environs/__init__.py +++ b/src/environs/__init__.py @@ -492,8 +492,7 @@ class Env: recurse: _BoolType = True, verbose: _BoolType = False, override: _BoolType = False, - return_path:...
["tests/test_environs.py::TestEnvFileReading::test_read_env_return_path", "tests/test_environs.py::TestEnvFileReading::test_read_env_return_path_with_dotenv_in_working_dir", "tests/test_environs.py::TestEnvFileReading::test_read_env_return_path_if_env_not_found"]
["tests/test_environs.py::TestCasting::test_call", "tests/test_environs.py::TestCasting::test_call_with_default", "tests/test_environs.py::TestCasting::test_basic", "tests/test_environs.py::TestCasting::test_empty_str", "tests/test_environs.py::TestCasting::test_int_cast", "tests/test_environs.py::TestCasting::test_inv...
jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df
true
null
1
23
3
863
0
0.6
1
0.75
1
0.2205
80.9365
7,559
swe_smith::train::24204
swe_smith
train
24,204
sunpy__sunpy.f8edfd5c.func_pm_remove_assign__7fiw45c3
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
XRSTimeSeries fails to parse FITS files due to undefined variables #### Description When loading GOES XRS data from FITS files, the `XRSTimeSeries` class fails with an `UnboundLocalError` for variables `xrsa`, `header`, and `data`. This appears to affect the `_parse_fits` method when processing FITS files with 4 HDUs...
diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py index 08e2a6a..f555ea7 100644 --- a/sunpy/timeseries/sources/goes.py +++ b/sunpy/timeseries/sources/goes.py @@ -168,7 +168,6 @@ class XRSTimeSeries(GenericTimeSeries): hdulist : `astropy.io.fits.HDUList` A HDU list. ...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/go1520120601.fits.gz-GOES-15]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno_missin...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g15_d20131028_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.p...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
6
4
1,203
0
0.6
1
0.75
1
0.2205
80.9365
7,560
swe_smith::train::22475
swe_smith
train
22,475
tweepy__tweepy.91a41c6e.func_pm_ctrl_shuffle__9dqesbxh
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Issue: UnboundLocalError in `get_friendship` Method Hey team, I've encountered an issue with the `get_friendship` method in the Tweepy API. When attempting to retrieve the friendship details between two users, an `UnboundLocalError` is raised. This seems to occur when trying to access the `source` and `target` va...
diff --git a/tweepy/models.py b/tweepy/models.py index f29361e..2affb7e 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -144,23 +144,22 @@ class Friendship(Model): @classmethod def parse(cls, api, json): - relationship = json['relationship'] - # parse source - source = cls(api...
["tests/test_api.py::TweepyAPITests::testgetfriendship"]
["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
17
1
983
0
0.6
1
0.75
1
0.2205
80.9365
7,561
swe_smith::train::27401
swe_smith
train
27,401
tkrajina__gpxpy.09fc46b3.func_pm_remove_cond__w8yko2yd
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
LocationDelta equality comparison fails with AttributeError #### Description When comparing LocationDelta objects created with angle/distance parameters, the equality comparison raises an AttributeError because it tries to access `latitude_diff` and `longitude_diff` attributes that don't exist on angle/distance-based...
diff --git a/gpxpy/geo.py b/gpxpy/geo.py index 00fa3bb..cbeb2bf 100644 --- a/gpxpy/geo.py +++ b/gpxpy/geo.py @@ -518,12 +518,4 @@ class LocationDelta: f'longitude_diff={self.longitude_diff})' def __eq__(self, other: object) -> bool: - if not isinstance(other, self.__class__): - ...
["test.py::GPXTests::test_location_delta_equality"]
["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
10
1
1,122
0
0.6
1
0.75
1
0.220333
80.936
7,562
swe_smith::train::31480
swe_smith
train
31,480
benoitc__gunicorn.bacbf8aa.func_basic__4pqkvfky
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Response object initialization breaks HTTP header handling #### Description The Response class initialization in `gunicorn/http/wsgi.py` has incorrect default values that cause HTTP header encoding and response handling to fail. The `req` attribute is being set to `None` instead of the actual request object, and othe...
diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 419ac50..ecf6848 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -200,15 +200,15 @@ def create(req, sock, client, server, cfg): class Response: def __init__(self, req, sock, cfg): - self.req = req + self.req = None ...
["tests/test_http.py::test_http_header_encoding", "tests/test_http.py::test_http_invalid_response_header"]
["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
8
2
1,162
0
0.6
1
0.75
1
0.220333
80.936
7,563
swe_smith::train::32942
swe_smith
train
32,942
pydantic__pydantic.acb0f10f.pr_6456
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# PyObject import fails after being moved from MOVED_IN_V2 to REMOVED_IN_V2 #### Description I noticed that importing PyObject from pydantic or pydantic.types is failing after a recent change. It seems that PyObject was moved from the MOVED_IN_V2 dictionary to the REMOVED_IN_V2 set, but this breaks backward compatibil...
diff --git a/pydantic/_migration.py b/pydantic/_migration.py index 980dfd2..0f5da11 100644 --- a/pydantic/_migration.py +++ b/pydantic/_migration.py @@ -8,8 +8,6 @@ MOVED_IN_V2 = { 'pydantic.error_wrappers:ValidationError': 'pydantic:ValidationError', 'pydantic.utils:to_camel': 'pydantic.alias_generators:to_p...
["tests/test_migration.py::test_moved_on_v2[pydantic:PyObject]", "tests/test_migration.py::test_moved_on_v2[pydantic.types:PyObject]"]
["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
6
2
1,202
0
0.6
1
0.75
1
0.220333
80.936
7,564
swe_smith::train::51508
swe_smith
train
51,508
pydicom__pydicom.7d361b3d.combine_file__hw0804tp
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Basic Offset Table parsing fails with unexpected tag error #### Description When parsing encapsulated pixel data with a Basic Offset Table, the `parse_basic_offsets` function incorrectly raises a ValueError claiming it found an unexpected tag instead of the expected (FFFE,E000) tag, even when the correct tag is prese...
diff --git a/src/pydicom/encaps.py b/src/pydicom/encaps.py index 3493808..9362d65 100644 --- a/src/pydicom/encaps.py +++ b/src/pydicom/encaps.py @@ -49,7 +49,7 @@ def parse_basic_offsets( buffer = BytesIO(buffer) group, elem = unpack(f"{endianness}HH", buffer.read(4)) - if group << 16 | elem != 0xFFF...
["tests/pixels/test_decoder_base.py::TestDecoder::test_buffer", "tests/pixels/test_encoder_pydicom.py::TestEncodeSegment::test_cycle", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jpg_no_app", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jpg_app", "tests/pixels/test_utils.py::TestGetJpgParameters:...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
12
88
1,081
0
0.6
1
0.75
1
0.220167
80.9355
7,565
swe_smith::train::19380
swe_smith
train
19,380
seperman__deepdiff.ed252022.func_pm_remove_cond__ubakmgeq
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
stringify_element function returns None for strings with quotes #### Description The `stringify_element` function in `deepdiff/path.py` is returning `None` instead of properly formatted strings when the input contains quotes or double quotes. This causes `UnboundLocalError` exceptions throughout the codebase when the...
diff --git a/deepdiff/path.py b/deepdiff/path.py index ee63b5b..b8efe32 100644 --- a/deepdiff/path.py +++ b/deepdiff/path.py @@ -278,15 +278,8 @@ def stringify_element(param, quote_str=None): new_param.append('𝆺𝅥𝅯') new_param.append(char) result = '"' + ''.join(new_param) + '"' - ...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_command.py::TestCommands::test_diff_command[t1.toml-t2.toml-10.0.0.2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-ar...
["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
7
191
1,181
0
0.6
1
0.75
1
0.220167
80.9355
7,566
swe_smith::train::22010
swe_smith
train
22,010
life4__textdistance.c3aca916.func_pm_op_change__h74tu8oi
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
LCSSeq algorithm produces IndexError with numpy backend #### Description The LCSSeq (Longest Common Subsequence) algorithm crashes with an IndexError when using the numpy backend. This affects both the distance and similarity calculations. #### Steps/Code to Reproduce ```python import textdistance # This will cras...
diff --git a/textdistance/algorithms/sequence_based.py b/textdistance/algorithms/sequence_based.py index b1fd7af..216cf61 100644 --- a/textdistance/algorithms/sequence_based.py +++ b/textdistance/algorithms/sequence_based.py @@ -49,7 +49,7 @@ class LCSSeq(_BaseSimilarity): """ lengths: Any if...
["tests/test_common.py::test_normalization_range[alg7]", "tests/test_common.py::test_normalization_by_one[alg7]", "tests/test_common.py::test_normalization_same[alg7]", "tests/test_common.py::test_normalization_monotonic[alg7]", "tests/test_common.py::test_no_common_chars[alg7]", "tests/test_common.py::test_empty[alg7]...
["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
11
14
1,101
0
0.6
1
0.75
1
0.220167
80.9355
7,567
swe_smith::train::11883
swe_smith
train
11,883
andialbrecht__sqlparse.e57923b3.func_pm_ctrl_shuffle__se8tgali
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
get_alias() method returns UnboundLocalError due to variable scope issue #### Description The `get_alias()` method in the `NameAliasMixin` class is throwing an `UnboundLocalError` when trying to access local variables. This affects SQL parsing when extracting alias information from identifiers. #### Steps/Code to Re...
diff --git a/sqlparse/sql.py b/sqlparse/sql.py index 1037375..f0fe937 100644 --- a/sqlparse/sql.py +++ b/sqlparse/sql.py @@ -24,18 +24,17 @@ class NameAliasMixin: return self._get_first_name(dot_idx, real_name=True) def get_alias(self): - """Returns the alias for this identifier or ``None``.""" +...
["tests/test_grouping.py::test_grouping_identifiers", "tests/test_grouping.py::test_grouping_identifier_name_wildcard", "tests/test_grouping.py::test_grouping_alias", "tests/test_grouping.py::test_grouping_alias_case", "tests/test_grouping.py::test_grouping_alias_ctas", "tests/test_grouping.py::test_grouping_alias_retu...
["tests/test_cli.py::test_cli_main_empty", "tests/test_cli.py::test_parser_empty", "tests/test_cli.py::test_main_help", "tests/test_cli.py::test_valid_args", "tests/test_cli.py::test_invalid_choice", "tests/test_cli.py::test_invalid_args", "tests/test_cli.py::test_invalid_infile", "tests/test_cli.py::test_invalid_outfi...
jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3
true
null
1
11
19
1,101
0
0.6
1
0.75
1
0.220167
80.9355
7,568
swe_smith::train::42741
swe_smith
train
42,741
python-jsonschema__jsonschema.93e0caa5.func_pm_ctrl_shuffle__xshnis2j
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
Validator.evolve() method raises UnboundLocalError when called on subclassed validators #### Description When calling the `evolve()` method on a subclassed validator, an `UnboundLocalError` is raised for the `schema` variable. This affects all validator types (Draft3, Draft4, Draft6, Draft7, Draft201909, Draft202012)...
diff --git a/jsonschema/validators.py b/jsonschema/validators.py index b8ca3bd..aba8f0d 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -264,9 +264,6 @@ def create( ) def evolve(self, **changes): - cls = self.__class__ - schema = changes....
["jsonschema/tests/test_validators.py::TestDraft3Validator::test_evolve_with_subclass", "jsonschema/tests/test_validators.py::TestDraft4Validator::test_evolve_with_subclass", "jsonschema/tests/test_validators.py::TestDraft6Validator::test_evolve_with_subclass", "jsonschema/tests/test_validators.py::TestDraft7Validator:...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
7
6
1,181
0
0.6
1
0.75
1
0.220167
80.9355
7,569
swe_smith::train::31768
swe_smith
train
31,768
davidhalter__parso.338a5760.combine_file__7je0pl5r
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Grammar normalizer issues method returns incorrect results #### Description When calling `_get_normalizer_issues` on a grammar object, the method is not working correctly and returns unexpected results or errors. The normalizer functionality appears to be broken. #### Steps/Code to Reproduce ```python import parso ...
diff --git a/parso/grammar.py b/parso/grammar.py index 85c65db..d70d6be 100644 --- a/parso/grammar.py +++ b/parso/grammar.py @@ -175,15 +175,15 @@ class Grammar(Generic[_NodeT]): a list of syntax/indentation errors. """ if self._error_normalizer_config is None: - raise ValueError("...
["parso/__init__.py::parso", "test/test_file_python_errors.py::test_on_itself[3.6]", "test/test_file_python_errors.py::test_on_itself[3.7]", "test/test_file_python_errors.py::test_on_itself[3.8]", "test/test_file_python_errors.py::test_on_itself[3.9]", "test/test_file_python_errors.py::test_on_itself[3.10]", "test/test...
["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_used_update[False-False]", "...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
12
122
1,080
0
0.6
1
0.75
1
0.22
80.935
7,570
swe_smith::train::46966
swe_smith
train
46,966
python-trio__trio.cfbbe2c1.func_basic__o9c1xs82
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Semaphore release() method behaves incorrectly #### Description The Semaphore's release() method is not working as expected. When calling release() on a bounded semaphore that's already at its maximum value, it should raise a ValueError but doesn't. Additionally, the semaphore value decreases instead of increasing wh...
diff --git a/src/trio/_sync.py b/src/trio/_sync.py index ca37392..edbe43c 100644 --- a/src/trio/_sync.py +++ b/src/trio/_sync.py @@ -507,12 +507,12 @@ class Semaphore(AsyncContextManagerMixin): """ if self._lot: - assert self._value == 0 + assert self._value > 0 # Subtle bug: ...
["src/trio/_tests/test_sync.py::test_Semaphore", "src/trio/_tests/test_sync.py::test_Semaphore_bounded", "src/trio/_tests/test_sync.py::test_generic_lock_exclusion[Semaphore(1)]", "src/trio/_tests/test_sync.py::test_generic_lock_fifo_fairness[Semaphore(1)]", "src/trio/_tests/test_sync.py::test_generic_lock_acquire_nowa...
["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
8
5
1,160
0
0.6
1
0.75
1
0.22
80.935
7,571
swe_smith::train::39307
swe_smith
train
39,307
pallets__jinja.ada0a9a6.func_basic__ymtiku79
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Macro compilation broken - AttributeError: 'Macro' object has no attribute '__call__' When trying to use macros in templates, I'm getting an AttributeError saying that Macro objects don't have a `__call__` attribute. This seems to affect all macro functionality. #### Steps/Code to Reproduce ```python from jinja2 imp...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..6e9d168 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1334,14 +1334,14 @@ class CodeGenerator(NodeVisitor): self.outdent() def visit_Macro(self, node: nodes.Macro, frame: Frame) -> None: - macro...
["tests/test_api.py::TestMeta::test_find_undeclared_variables", "tests/test_async.py::test_await_and_macros[asyncio]", "tests/test_async.py::test_await_and_macros[trio]", "tests/test_async.py::TestAsyncImports::test_context_imports", "tests/test_async.py::TestAsyncImports::test_exports[asyncio]", "tests/test_async.py::...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
10
57
1,120
0
0.6
1
0.75
1
0.22
80.935
7,572
swe_smith::train::9711
swe_smith
train
9,711
marshmallow-code__webargs.dbde72fe.func_basic__xtv793jc
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
Parser decorators return wrong argument order #### Description When using `@parser.use_args` and `@parser.use_kwargs` decorators, the arguments and keyword arguments are being passed to the decorated function in the wrong order, causing `TypeError` exceptions. #### Steps/Code to Reproduce ```python from webargs imp...
diff --git a/src/webargs/core.py b/src/webargs/core.py index 44294e9..6693212 100644 --- a/src/webargs/core.py +++ b/src/webargs/core.py @@ -528,17 +528,17 @@ class Parser(typing.Generic[Request]): arg_name: str | None, ) -> tuple[tuple, dict[str, typing.Any]]: """Update args or kwargs with parse...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_use_args_decorator", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_use_args_with_path_param", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_use_args_with_validation", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_use_kwargs_decorator", "test...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
8
74
1,160
0
0.6
1
0.75
1
0.22
80.935
7,573
swe_smith::train::31319
swe_smith
train
31,319
scrapy__scrapy.35212ec5.lm_rewrite__v1fq87jd
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
# Item initialization fails when passing multiple dictionaries as arguments When initializing a Scrapy Item with multiple dictionaries as arguments, the initialization fails. The Item constructor doesn't properly handle multiple dictionary arguments. ## Reproduce: ```python from scrapy.item import Item, Field class...
diff --git a/scrapy/item.py b/scrapy/item.py index 1cc0ae5..e072be2 100644 --- a/scrapy/item.py +++ b/scrapy/item.py @@ -83,11 +83,22 @@ class Item(MutableMapping[str, Any], object_ref, metaclass=ItemMeta): fields: dict[str, Field] def __init__(self, *args: Any, **kwargs: Any): - self._values: dict[s...
["tests/test_item.py::ItemTest::test_copy", "tests/test_item.py::ItemTest::test_init"]
["tests/test_item.py::ItemTest::test_custom_methods", "tests/test_item.py::ItemTest::test_deepcopy", "tests/test_item.py::ItemTest::test_invalid_field", "tests/test_item.py::ItemTest::test_metaclass", "tests/test_item.py::ItemTest::test_metaclass_inheritance", "tests/test_item.py::ItemTest::test_metaclass_multiple_inhe...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
1
21
2
900
0
0.6
1
0.75
1
0.22
80.935
7,574
swe_smith::train::38495
swe_smith
train
38,495
amueller__word_cloud.ec24191c.func_pm_class_rm_funcs__kalziion
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
CLI fails with "FileType('r') is not callable" error #### Description The wordcloud CLI is broken and throws a `ValueError: FileType('r') is not callable` error when trying to parse command line arguments. This affects all file-related arguments and makes the CLI completely unusable. #### Steps/Code to Reproduce ``...
diff --git a/wordcloud/wordcloud_cli.py b/wordcloud/wordcloud_cli.py index 4ddd3db..b986ddb 100644 --- a/wordcloud/wordcloud_cli.py +++ b/wordcloud/wordcloud_cli.py @@ -48,31 +48,11 @@ class FileType(object): self._mode = mode self._bufsize = bufsize - def __call__(self, string): - # the s...
["test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option0]", "test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option1]", "test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option2]", "test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option3]", "test/test_wordcloud_cli.py...
["test/test_wordcloud.py::test_collocations", "test/test_wordcloud.py::test_collocation_stopwords", "test/test_wordcloud.py::test_collocation_stopwords_uppercase", "test/test_wordcloud.py::test_plurals_numbers", "test/test_wordcloud.py::test_multiple_s", "test/test_wordcloud.py::test_empty_text", "test/test_wordcloud.p...
jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c
true
null
1
20
33
920
0
0.6
1
0.75
1
0.22
80.935
7,575
swe_smith::train::43687
swe_smith
train
43,687
sloria__environs.73c372df.func_basic__48gtzg50
swesmith/sloria__environs.73c372df
sloria/environs
python
null
Env instance behaves incorrectly after initialization #### Description When creating an Env instance, the environment variable parsing logic appears to be inverted. The instance incorrectly raises `EnvSealedError` immediately upon trying to parse any environment variable, even though it should only be sealed after ca...
diff --git a/src/environs/__init__.py b/src/environs/__init__.py index 00f6072..513cf34 100644 --- a/src/environs/__init__.py +++ b/src/environs/__init__.py @@ -109,7 +109,6 @@ def _field2method( default: typing.Any = ma.missing, subcast: Subcast[_T] | None = None, *, - # Subset of rel...
["tests/test_environs.py::TestCasting::test_call", "tests/test_environs.py::TestCasting::test_call_with_default", "tests/test_environs.py::TestCasting::test_basic", "tests/test_environs.py::TestCasting::test_empty_str", "tests/test_environs.py::TestCasting::test_int_cast", "tests/test_environs.py::TestCasting::test_inv...
["tests/test_environs.py::TestCasting::test_enum_cast", "tests/test_environs.py::TestCasting::test_enum_cast_ignore_case", "tests/test_environs.py::TestCasting::test_invalid_enum", "tests/test_environs.py::TestCasting::test_invalid_enum_ignore_case", "tests/test_environs.py::TestCasting::test_enum_default", "tests/test...
jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df
true
null
1
9
76
1,140
0
0.6
1
0.75
1
0.22
80.935
7,576
swe_smith::train::12114
swe_smith
train
12,114
lepture__mistune.bf54ef67.combine_file__s0ox1fcw
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
MarkdownRenderer broken after recent changes #### Description The MarkdownRenderer is completely broken and throws UnboundLocalError when trying to render any markdown content. The renderer fails on basic operations like rendering headings, lists, and reference links. #### Steps/Code to Reproduce ```python import m...
diff --git a/src/mistune/renderers/markdown.py b/src/mistune/renderers/markdown.py index b49081a..f1cff1b 100644 --- a/src/mistune/renderers/markdown.py +++ b/src/mistune/renderers/markdown.py @@ -20,7 +20,6 @@ class MarkdownRenderer(BaseRenderer): return strip_end(out) def render_referrences(self, stat...
["tests/test_renderers.py::TestRendererMarkdown::test_code_001", "tests/test_renderers.py::TestRendererMarkdown::test_code_002", "tests/test_renderers.py::TestRendererMarkdown::test_code_003", "tests/test_renderers.py::TestRendererMarkdown::test_code_004", "tests/test_renderers.py::TestRendererMarkdown::test_code_005",...
["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
9
22
1,140
0
0.6
1
0.75
1
0.22
80.935
7,577
swe_smith::train::31533
swe_smith
train
31,533
benoitc__gunicorn.bacbf8aa.func_basic__jh1bcodb
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Pre-fork hook causes AttributeError when accessing worker attributes When using a custom pre_fork hook, the worker object passed to the hook doesn't have the expected attributes, causing AttributeError when trying to access worker properties. #### Steps/Code to Reproduce ```python import gunicorn.config def custom_...
diff --git a/gunicorn/config.py b/gunicorn/config.py index 402a26b..a662de8 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -1809,7 +1809,11 @@ class Prefork(Setting): type = callable def pre_fork(server, worker): - pass + worker.ready = False + if server.active_workers > 0:...
["tests/test_arbiter.py::test_arbiter_calls_worker_exit"]
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
6
1
1,200
0
0.6
1
0.75
1
0.22
80.935
7,578
swe_smith::train::49221
swe_smith
train
49,221
mozilla__bleach.73871d76.combine_module__znlxl641
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
TreeBuilder case sensitivity breaks functionality #### Description The `getTreeBuilder` function is not working correctly due to case sensitivity issues. When trying to use standard tree builder types like "etree" or "dom", the function fails to recognize them. #### Steps/Code to Reproduce ```python import bleach f...
diff --git a/bleach/_vendor/html5lib/treebuilders/__init__.py b/bleach/_vendor/html5lib/treebuilders/__init__.py index d44447e..923507a 100644 --- a/bleach/_vendor/html5lib/treebuilders/__init__.py +++ b/bleach/_vendor/html5lib/treebuilders/__init__.py @@ -64,16 +64,14 @@ def getTreeBuilder(treeType, implementation=Non...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
2
17
185
980
0
0.6
1
0.75
1
0.22
80.935
7,579
swe_smith::train::3352
swe_smith
train
3,352
pygments__pygments.27649ebb.combine_file__amlxjkvu
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
LiterateLexer initialization broken after recent changes #### Description The LiterateLexer and its subclasses (LiterateHaskellLexer, LiterateAgdaLexer, LiterateIdrisLexer, LiterateCryptolLexer) are failing to initialize properly. When trying to create instances of these lexers, they raise a TypeError about the `__in...
diff --git a/pygments/lexers/haskell.py b/pygments/lexers/haskell.py index 2ad18ed..920babf 100644 --- a/pygments/lexers/haskell.py +++ b/pygments/lexers/haskell.py @@ -510,18 +510,14 @@ class LiterateLexer(Lexer): bird_re = re.compile(r'(>[ \t]*)(.*\n)') - def __init__(self, baselexer, **options): - ...
["tests/test_basic_api.py::test_random_input[LiterateAgdaLexer]", "tests/test_basic_api.py::test_lexer_options[LiterateIdrisLexer]", "tests/test_basic_api.py::test_random_input[LiterateHaskellLexer]", "tests/test_basic_api.py::test_lexer_options[LiterateCryptolLexer]", "tests/test_basic_api.py::test_get_lexers", "tests...
["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
12
960
0
0.6
1
0.75
1
0.22
80.935
7,580
swe_smith::train::51623
swe_smith
train
51,623
pydicom__pydicom.7d361b3d.combine_module__knswxec9
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Config directory creation fails when directory already exists #### Description The `get_config_dir()` function fails to create the configuration directory when it already exists, causing various operations to fail unexpectedly. #### Steps/Code to Reproduce ```python import pydicom.data.download as download # First...
diff --git a/src/pydicom/data/data_manager.py b/src/pydicom/data/data_manager.py index 91f2e23..1240c8a 100644 --- a/src/pydicom/data/data_manager.py +++ b/src/pydicom/data/data_manager.py @@ -148,9 +148,9 @@ def online_test_file_dummy_paths() -> dict[str, str]: dict A dict of dummy paths to the test file...
["tests/pixels/test_common.py::TestRunnerBase::test_set_options_ds", "tests/pixels/test_decoder_base.py::TestDecoder::test_buffer", "tests/pixels/test_encoder_pydicom.py::TestEncodeSegment::test_cycle", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jls_ilv0", "tests/pixels/test_utils.py::TestGetJpgParameters:...
["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
2
12
61
1,080
0
0.6
1
0.75
1
0.22
80.935
7,581
swe_smith::train::43025
swe_smith
train
43,025
gawel__pyquery.811cd048.func_basic__45er41cc
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
PyQuery methods returning None instead of PyQuery objects When using PyQuery selectors and methods, many operations are unexpectedly returning `None` instead of PyQuery objects, breaking method chaining and normal functionality. #### Steps/Code to Reproduce ```python from pyquery import PyQuery as pq # Basic select...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..a030146 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -263,16 +263,16 @@ class PyQuery(list): """return a new PyQuery instance """ length = len(args) - if length == 0: + if length == 0 or args[0] i...
["README.rst::README.rst", "docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/manipulating.rst::manipulating.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/tips.rst::tips.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselectpatch.JQueryTranslator.xpath...
["docs/scrap.rst::scrap.rst", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.__html__", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.__str__", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.add_class", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.children", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.contents", "pyquery/p...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
10
106
1,119
0
0.6
1
0.75
1
0.219833
80.9345
7,582
swe_smith::train::24209
swe_smith
train
24,209
sunpy__sunpy.f8edfd5c.func_pm_remove_assign__9ihe6yto
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
NameError in XRSTimeSeries._get_satellite_number method #### Description When trying to parse GOES satellite data files, the `_get_satellite_number` method in `XRSTimeSeries` class raises a `NameError` because some pattern variables are referenced but not defined. #### Steps/Code to Reproduce ```python from sunpy.t...
diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py index 08e2a6a..b114bda 100644 --- a/sunpy/timeseries/sources/goes.py +++ b/sunpy/timeseries/sources/goes.py @@ -111,9 +111,7 @@ class XRSTimeSeries(GenericTimeSeries): """ # Various pattern matches for the meta fields. ...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/go1520120601.fits.gz-GOES-15]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc-GOES-13]", "sunpy/timeseries/sources/tests/test_go...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/t...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
7
12
1,179
0
0.6
1
0.75
1
0.219833
80.9345
7,583
swe_smith::train::52607
swe_smith
train
52,607
pydicom__pydicom.7d361b3d.func_pm_remove_cond__tr8cbrit
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
format_number_as_ds accepts non-finite floats without validation #### Description The `format_number_as_ds` function now accepts non-finite float values (NaN, inf, -inf) without proper validation, which can lead to invalid DICOM decimal string representations. #### Steps/Code to Reproduce ```python from pydicom.val...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..cc3f1e3 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -952,18 +952,9 @@ def format_number_as_ds(val: float | Decimal) -> str: """ if not isinstance(val, float | Decimal): raise TypeError("'val' must ...
["tests/test_valuerep.py::TestTruncateFloatForDS::test_auto_format[1.0-1.0]", "tests/test_valuerep.py::TestTruncateFloatForDS::test_auto_format[0.0-0.0]", "tests/test_valuerep.py::TestTruncateFloatForDS::test_auto_format[-0.0--0.0]", "tests/test_valuerep.py::TestTruncateFloatForDS::test_auto_format[0.123-0.123]", "test...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
10
10
1,119
0
0.6
1
0.75
1
0.219833
80.9345
7,584
swe_smith::train::631
swe_smith
train
631
oauthlib__oauthlib.1fd52536.func_basic__u45u1zuk
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RequestValidator.validate_user method no longer raises NotImplementedError #### Description The `validate_user` method in `RequestValidator` class has been changed to return a boolean value instead of raising `NotImplementedError`. This breaks the expected contract for subclasses that rely on the method raising an ex...
diff --git a/oauthlib/oauth2/rfc6749/request_validator.py b/oauthlib/oauth2/rfc6749/request_validator.py index 6d6ebaa..7b1cf5a 100644 --- a/oauthlib/oauth2/rfc6749/request_validator.py +++ b/oauthlib/oauth2/rfc6749/request_validator.py @@ -576,7 +576,12 @@ class RequestValidator: Method is used by: ...
["tests/oauth2/rfc6749/test_request_validator.py::RequestValidatorTest::test_method_contracts"]
["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
1
1,179
0
0.6
1
0.75
1
0.219833
80.9345
7,585
swe_smith::train::49315
swe_smith
train
49,315
mozilla__bleach.73871d76.func_basic__jksjqe4w
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
Module factory cache broken after recent changes #### Description The module factory caching mechanism is completely broken and causing widespread failures. When trying to use any functionality that relies on the module factory, it throws `TypeError: list indices must be integers or slices, not str` errors. #### Ste...
diff --git a/bleach/_vendor/html5lib/_utils.py b/bleach/_vendor/html5lib/_utils.py index 635bb02..749250f 100644 --- a/bleach/_vendor/html5lib/_utils.py +++ b/bleach/_vendor/html5lib/_utils.py @@ -127,7 +127,7 @@ def moduleFactoryFactory(factory): else: name = b"_%s_factory" % baseModule.__name__ ...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
16
185
999
0
0.6
1
0.75
1
0.219833
80.9345
7,586
swe_smith::train::27623
swe_smith
train
27,623
arrow-py__arrow.1d70d009.func_basic__tb6dz59a
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
Arrow.utcfromtimestamp creates invalid dates with swapped day/second values #### Description When using `Arrow.utcfromtimestamp()`, the resulting Arrow object has incorrect day and second values. The day field contains the seconds value and the second field contains the day value, leading to invalid dates. #### Step...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..0868c6e 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -288,13 +288,13 @@ class Arrow: return cls( dt.year, dt.month, - dt.day, + dt.second, # Incorrectly using dt.second instead of dt.day ...
["tests/test_arrow.py::TestTestArrowFactory::test_utcfromtimestamp", "tests/test_factory.py::TestGet::test_struct_time"]
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
6
2
1,198
0
0.6
1
0.75
1
0.219667
80.934
7,587
swe_smith::train::10494
swe_smith
train
10,494
paramiko__paramiko.23f92003.func_basic__k7j4djdb
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
PKey.algorithm_name returns incorrect values for key types #### Description The `algorithm_name` property on PKey instances is returning unexpected values. For RSA, DSS, and Ed25519 keys, it's throwing an IndexError, and for ECDSA keys it's returning lowercase values instead of the expected uppercase format. #### St...
diff --git a/paramiko/pkey.py b/paramiko/pkey.py index f0b2d6d..7be3b58 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -316,17 +316,13 @@ class PKey: Similar to `get_name`, but aimed at pure algorithm name instead of SSH protocol field value. """ - # Nuke the leading 'ssh-' - ...
["tests/agent.py::AgentKey_::str_is_repr", "tests/pkey.py::PKey_::algorithm_name[rsa]", "tests/pkey.py::PKey_::algorithm_name[dss]", "tests/pkey.py::PKey_::algorithm_name[ed25519]", "tests/pkey.py::PKey_::algorithm_name[ecdsa-256]", "tests/auth.py::AuthSource_::InMemoryPrivateKey_::repr_shows_pkey_repr", "tests/auth.py...
["tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::AgentKey_::fields::defers_to_inner_key_when_...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
12
7
1,078
0
0.6
1
0.75
1
0.219667
80.934
7,588
swe_smith::train::653
swe_smith
train
653
oauthlib__oauthlib.1fd52536.func_basic__wq1hprwz
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RequestValidator.get_original_scopes method no longer raises NotImplementedError #### Description The `get_original_scopes` method in `RequestValidator` class has been changed to return a default implementation instead of raising `NotImplementedError`. This breaks the expected contract for subclasses that rely on the...
diff --git a/oauthlib/oauth2/rfc6749/request_validator.py b/oauthlib/oauth2/rfc6749/request_validator.py index 6d6ebaa..ce1d10e 100644 --- a/oauthlib/oauth2/rfc6749/request_validator.py +++ b/oauthlib/oauth2/rfc6749/request_validator.py @@ -159,7 +159,13 @@ class RequestValidator: Method is used by: ...
["tests/oauth2/rfc6749/test_request_validator.py::RequestValidatorTest::test_method_contracts"]
["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
8
1
1,158
0
0.6
1
0.75
1
0.219667
80.934
7,589
swe_smith::train::37833
swe_smith
train
37,833
kayak__pypika.1c9646f0.func_basic__vug1bc7x
swesmith/kayak__pypika.1c9646f0
kayak/pypika
python
null
Set operations (UNION, INTERSECT, MINUS, EXCEPT) broken after recent changes #### Description Set operations like UNION, INTERSECT, MINUS, and EXCEPT are not working properly. When trying to use these operations, I'm getting AttributeError exceptions. #### Steps/Code to Reproduce ```python from pypika import Query,...
diff --git a/pypika/queries.py b/pypika/queries.py index 42c7c45..fdf8c13 100644 --- a/pypika/queries.py +++ b/pypika/queries.py @@ -556,14 +556,14 @@ class _SetOperation(Selectable, Term): wrapper_cls: Type[ValueWrapper] = ValueWrapper, ): super().__init__(alias) - self.base_query = base_...
["pypika/tests/test_joins.py::JoinBehaviorTests::test_join_query_with_setoperation", "pypika/tests/test_joins.py::UnionTests::test_mysql_query_wraps_unioned_queries", "pypika/tests/test_joins.py::UnionTests::test_require_equal_number_of_fields", "pypika/tests/test_joins.py::UnionTests::test_union", "pypika/tests/test_j...
["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
12
37
1,078
0
0.6
1
0.75
1
0.219667
80.934
7,590
swe_smith::train::35726
swe_smith
train
35,726
stanfordnlp__dspy.651a4c71.func_pm_remove_assign__tx66aykw
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Bug in majority function in aggregation.py I found an issue with the `majority` function in the aggregation module. When trying to use it with completions, it fails with an `UnboundLocalError`. ## Description The `majority` function doesn't properly handle the case when `prediction_or_completions` is not a `Predic...
diff --git a/dspy/predict/aggregation.py b/dspy/predict/aggregation.py index c65badd..9c971b7 100644 --- a/dspy/predict/aggregation.py +++ b/dspy/predict/aggregation.py @@ -19,7 +19,7 @@ def majority(prediction_or_completions, normalize=default_normalize, field=None) if isinstance(prediction_or_completions, Predic...
["tests/predict/test_aggregation.py::test_majority_with_prediction", "tests/predict/test_aggregation.py::test_majority_with_completions", "tests/predict/test_aggregation.py::test_majority_with_list", "tests/predict/test_aggregation.py::test_majority_with_normalize", "tests/predict/test_aggregation.py::test_majority_wit...
["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
8
6
1,158
0
0.6
1
0.75
1
0.219667
80.934
7,591
r2e_gym::train::4622
r2e_gym
train
4,622
numpy__af8dda19fad8cf736bd042ed7aae65d1e8c8553e
numpy
numpy/numpy
python
af8dda19fad8cf736bd042ed7aae65d1e8c8553e
**Title:** Incorrect Formatting of `help()` Output for Deprecated Functions **Description:** When using the `help()` function on deprecated functions, the formatting of the docstrings is inconsistent. Specifically, the indentation and handling of leading blank lines cause the help output to differ from the original do...
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -105,6 +105,20 @@ if doc is None: doc = depdoc else: + lines = doc.expandtabs().split('\n') + indent = _get_indent(lines[1:]) + if lines[0].lstrip(): ...
diff --git a/numpy/lib/tests/test_utils.py b/numpy/lib/tests/test_utils.py --- a/numpy/lib/tests/test_utils.py +++ b/numpy/lib/tests/test_utils.py @@ -1,5 +1,6 @@ from __future__ import division, absolute_import, print_function +import inspect import sys import pytest @@ -38,6 +39,32 @@ new_func3 = deprecate(ol...
null
null
namanjain12/numpy_final:af8dda19fad8cf736bd042ed7aae65d1e8c8553e
true
null
1
29
null
1,450
0
0.75
1
0.6375
1
0.338333
80.93375
7,592
swe_smith::train::10406
swe_smith
train
10,406
paramiko__paramiko.23f92003.func_basic__bo1msbkg
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH connection fails with ValueError when using certain cipher configurations #### Description When establishing SSH connections with specific cipher configurations (like aes256-cbc), the transport layer throws a ValueError during the handshake process. This appears to be related to how cipher parameters are being pa...
diff --git a/paramiko/transport.py b/paramiko/transport.py index f0fcb97..526cb23 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -2050,19 +2050,15 @@ class Transport(threading.Thread, ClosingContextManager): if name not in self._cipher_info: raise SSHException("Unknown cipher " ...
["tests/test_transport.py::TransportTest::test_special", "tests/test_transport.py::ServiceRequestingTransportTest::test_special"]
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
10
2
1,117
0
0.6
1
0.75
1
0.2195
80.9335
7,593
swe_smith::train::46779
swe_smith
train
46,779
python-trio__trio.cfbbe2c1.func_basic__158aks7r
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
ParkingLot.repark() silently accepts invalid arguments and corrupts task state #### Description The `ParkingLot.repark()` method is not properly validating its `new_lot` parameter, which can lead to silent failures and corrupted task state when invalid arguments are passed. #### Steps/Code to Reproduce ```python im...
diff --git a/src/trio/_core/_parking_lot.py b/src/trio/_core/_parking_lot.py index af6ff61..dc56242 100644 --- a/src/trio/_core/_parking_lot.py +++ b/src/trio/_core/_parking_lot.py @@ -262,10 +262,10 @@ class ParkingLot: """ if not isinstance(new_lot, ParkingLot): - raise TypeError("new_l...
["src/trio/_core/_tests/test_parking_lot.py::test_parking_lot_repark", "src/trio/_core/_tests/test_parking_lot.py::test_parking_lot_repark_with_count", "src/trio/_tests/test_sync.py::test_Condition"]
["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
8
3
1,157
0
0.6
1
0.75
1
0.2195
80.9335
7,594
swe_smith::train::39507
swe_smith
train
39,507
pallets__jinja.ada0a9a6.func_pm_remove_assign__x5erdq5x
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Trans block with context parameter raises UnboundLocalError #### Description When using the `{% trans %}` block with a context parameter, Jinja2 raises an `UnboundLocalError: local variable 'context' referenced before assignment`. This affects both basic trans blocks and those with trimmed content. #### Steps/Code t...
diff --git a/src/jinja2/ext.py b/src/jinja2/ext.py index 9fad0aa..a3f28e7 100644 --- a/src/jinja2/ext.py +++ b/src/jinja2/ext.py @@ -344,14 +344,13 @@ class InternationalizationExtension(Extension): context_token = parser.stream.next_if("string") if context_token is not None: - context = ...
["tests/test_ext.py::TestInternationalization::test_trans", "tests/test_ext.py::TestInternationalization::test_trans_plural_with_functions", "tests/test_ext.py::TestInternationalization::test_trimmed", "tests/test_ext.py::TestInternationalization::test_trimmed_policy", "tests/test_ext.py::TestInternationalization::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
16
1,177
0
0.6
1
0.75
1
0.2195
80.9335
7,595
swe_smith::train::26506
swe_smith
train
26,506
pylint-dev__astroid.b114f6b5.func_pm_remove_wrapper__nrglkq03
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
get_module_part function always returns full dotted name instead of module part #### Description The `get_module_part` function in `astroid.modutils` is not working correctly - it always returns the full dotted name instead of finding the actual importable module part. #### Steps/Code to Reproduce ```python from as...
diff --git a/astroid/modutils.py b/astroid/modutils.py index 29d09f8..2aeb857 100644 --- a/astroid/modutils.py +++ b/astroid/modutils.py @@ -428,17 +428,9 @@ def get_module_part(dotted_name: str, context_file: str | None = None) -> str: ), "explicit relative import, but no context_file?" context_file ...
["tests/test_modutils.py::GetModulePartTest::test_get_module_part_exception", "tests/test_modutils.py::GetModulePartTest::test_known_values_get_builtin_module_part", "tests/test_modutils.py::GetModulePartTest::test_known_values_get_compiled_module_part", "tests/test_modutils.py::GetModulePartTest::test_known_values_get...
["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
10
5
1,117
0
0.6
1
0.75
1
0.2195
80.9335
7,596
swe_smith::train::39904
swe_smith
train
39,904
tornadoweb__tornado.d5ac65c1.func_pm_remove_cond__qr8w5ojx
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
HTTPResponse no longer raises HTTPError for non-2xx status codes #### Description HTTPResponse objects are not automatically creating HTTPError instances for HTTP status codes outside the 200-299 range. This breaks expected behavior where HTTP error responses should raise HTTPError exceptions. #### Steps/Code to Rep...
diff --git a/tornado/httpclient.py b/tornado/httpclient.py index 3a45ffd..1497913 100644 --- a/tornado/httpclient.py +++ b/tornado/httpclient.py @@ -657,17 +657,12 @@ class HTTPResponse: self.effective_url = effective_url self._error_is_response_code = False if error is None: - ...
["test_twitter_show_user_error (tornado.test.auth_test.AuthTest)", "test_error_after_cancel (tornado.test.httpclient_test.HTTPClientCommonTestCase)", "test_future_http_error (tornado.test.httpclient_test.HTTPClientCommonTestCase)", "test_error_with_response (tornado.test.httpclient_test.HTTPErrorTestCase)", "test_sync_...
["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
7
12
1,177
0
0.6
1
0.75
1
0.2195
80.9335
7,597
swe_smith::train::47081
swe_smith
train
47,081
python-trio__trio.cfbbe2c1.func_pm_ctrl_invert_if__i2tj9hqz
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Cancel scope misnesting detection broken #### Description The cancel scope misnesting detection logic appears to be broken. When attempting to exit a cancel scope from an unrelated task, the error detection and handling is not working correctly. #### Steps/Code to Reproduce ```python import trio async def main(): ...
diff --git a/src/trio/_core/_run.py b/src/trio/_core/_run.py index bfb38f4..b3f4a0b 100644 --- a/src/trio/_core/_run.py +++ b/src/trio/_core/_run.py @@ -605,16 +605,6 @@ class CancelScope: # one; it would just confuse the traceback. pass elif not self._cancel_status.enclos...
["src/trio/_core/_tests/test_run.py::test_cancel_scope_misnesting"]
["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
21
1
897
0
0.6
1
0.75
1
0.2195
80.9335
7,598
swe_smith::train::24869
swe_smith
train
24,869
marshmallow-code__marshmallow.9716fc62.func_pm_ctrl_shuffle__qs5aykah
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
URL validator raises UnboundLocalError for invalid URLs #### Description The URL validator is throwing `UnboundLocalError: local variable 'message' referenced before assignment` when validating invalid URLs instead of the expected `ValidationError`. #### Steps/Code to Reproduce ```python from marshmallow import val...
diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py index e4536d8..3644055 100644 --- a/src/marshmallow/validate.py +++ b/src/marshmallow/validate.py @@ -202,8 +202,10 @@ class URL(Validator): return self.error.format(input=value) def __call__(self, value: str) -> str: - messag...
["tests/test_deserialization.py::TestFieldDeserialization::test_url_field_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::test_url_field_schemes_argument", "tests/test_deserialization.py::TestSchemaDeserialization::test_multiple_errors_can_be_stored_for_a_url_field", "tests/test_schema.py::t...
["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
15
66
1,017
0
0.6
1
0.75
1
0.2195
80.9335
7,599
swe_smith::train::27779
swe_smith
train
27,779
arrow-py__arrow.1d70d009.func_pm_remove_cond__godxfeht
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
Slovak locale _format_timeframe method broken for non-zero deltas #### Description The Slovak locale's `_format_timeframe` method is throwing an `UnboundLocalError` when trying to format time differences that are not zero. The error occurs because the `key` variable is referenced before being assigned in certain code...
diff --git a/arrow/locales.py b/arrow/locales.py index 63b2d48..32a8348 100644 --- a/arrow/locales.py +++ b/arrow/locales.py @@ -3433,22 +3433,10 @@ class SlovakLocale(Locale): if delta == 0: key = "zero" # And *never* use 0 in the singular! - elif delta < 0: - key = "past" - ...
["tests/test_arrow.py::TestArrowDehumanize::test_seconds", "tests/test_arrow.py::TestArrowDehumanize::test_minute", "tests/test_arrow.py::TestArrowDehumanize::test_minutes", "tests/test_arrow.py::TestArrowDehumanize::test_hour", "tests/test_arrow.py::TestArrowDehumanize::test_hours", "tests/test_arrow.py::TestArrowDehu...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
12
17
1,077
0
0.6
1
0.75
1
0.2195
80.9335