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
5,400
swe_smith::train::47245
swe_smith
train
47,245
python-trio__trio.cfbbe2c1.lm_rewrite__4kmvte63
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
#### Description There seems to be an issue with the `AsyncIOWrapper` class where async methods are not being generated correctly. This is causing unexpected behavior when attempting to access certain attributes or methods. #### Steps/Code to Reproduce ```python from trio._file_io import AsyncIOWrapper import mock ...
diff --git a/src/trio/_file_io.py b/src/trio/_file_io.py index 5a612ff..caaa935 100644 --- a/src/trio/_file_io.py +++ b/src/trio/_file_io.py @@ -237,25 +237,27 @@ class AsyncIOWrapper(AsyncResource, Generic[FileT_co]): if not TYPE_CHECKING: def __getattr__(self, name: str) -> object: + """Ret...
["src/trio/_tests/test_file_io.py::test_async_methods_generated_once", "src/trio/_tests/test_file_io.py::test_async_methods_signature", "src/trio/_tests/test_file_io.py::test_async_methods_wrap", "src/trio/_tests/test_file_io.py::test_async_iter", "src/trio/_tests/test_file_io.py::test_aclose_cancelled", "src/trio/_tes...
["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
38
6
1,070
0
0.6
1
0.75
1
0.305
81.19
5,401
swe_smith::train::2080
swe_smith
train
2,080
pdfminer__pdfminer.six.1a8bd2f7.func_basic__7e5acwnd
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
pdf2txt.py command line tool fails with AttributeError when no files provided #### Description The pdf2txt.py tool crashes with an AttributeError when run without providing any PDF files as arguments. This happens because the argument parser was changed to accept zero or more files (`nargs="*"`) instead of one or mor...
diff --git a/tools/pdf2txt.py b/tools/pdf2txt.py index 3341690..1474093 100755 --- a/tools/pdf2txt.py +++ b/tools/pdf2txt.py @@ -72,7 +72,7 @@ def create_parser() -> argparse.ArgumentParser: "files", type=str, default=None, - nargs="+", + nargs="*", help="One or more pa...
["tests/test_tools_pdf2txt.py::TestPdf2Txt::test_nonfree_dmca", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_nonfree_kampo", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_nlp2004slides", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_contrib_2b", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_contrib_issue_350",...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
38
7
1,070
0
0.6
1
0.75
1
0.305
81.19
5,402
swe_smith::train::21814
swe_smith
train
21,814
life4__textdistance.c3aca916.combine_file__ttb5f5k1
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
Sorensen and Tversky similarity calculations produce incorrect results #### Description The Sorensen and Tversky similarity algorithms are returning incorrect values, causing division by zero errors and failing to match expected similarity scores. #### Steps/Code to Reproduce ```python import textdistance # Sorens...
diff --git a/textdistance/algorithms/token_based.py b/textdistance/algorithms/token_based.py index d499b84..b269dae 100644 --- a/textdistance/algorithms/token_based.py +++ b/textdistance/algorithms/token_based.py @@ -81,11 +81,11 @@ class Sorensen(_BaseSimilarity): if result is not None: return re...
["tests/test_common.py::test_normalization_range[alg12]", "tests/test_common.py::test_normalization_by_one[alg12]", "tests/test_common.py::test_normalization_monotonic[alg12]", "tests/test_common.py::test_no_common_chars[alg12]", "tests/test_token/test_jaccard.py::test_compare_with_tversky", "tests/test_token/test_jacc...
["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
30
9
1,230
0
0.6
1
0.75
1
0.305
81.19
5,403
swe_smith::train::45283
swe_smith
train
45,283
dask__dask.5f61e423.func_pm_ctrl_shuffle__3a0ceq4q
swesmith/dask__dask.5f61e423
dask/dask
python
null
# [Bug]: topk method in Bag class fails with UnboundLocalError ## Description The `topk` method in the `Bag` class is failing with an `UnboundLocalError`. When trying to get the top k elements from a bag, the method raises an error indicating that the local variable 'func' is referenced before assignment. ## How to ...
diff --git a/dask/bag/core.py b/dask/bag/core.py index 4e9278a..6f6de7f 100644 --- a/dask/bag/core.py +++ b/dask/bag/core.py @@ -949,6 +949,19 @@ class Bag(DaskMethodsMixin): return result def topk(self, k, key=None, split_every=None): + return self.reduction( + func, + comp...
["dask/bag/tests/test_bag.py::test_topk", "dask/bag/tests/test_bag.py::test_topk_with_non_callable_key[1]", "dask/bag/tests/test_bag.py::test_topk_with_non_callable_key[2]", "dask/bag/tests/test_bag.py::test_topk_with_multiarg_lambda"]
["dask/bag/tests/test_bag.py::test_Bag", "dask/bag/tests/test_bag.py::test_keys", "dask/bag/tests/test_bag.py::test_bag_groupby_pure_hash", "dask/bag/tests/test_bag.py::test_bag_groupby_normal_hash", "dask/bag/tests/test_bag.py::test_bag_groupby_none[synchronous-disk]", "dask/bag/tests/test_bag.py::test_bag_groupby_non...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
27
4
1,290
0
0.6
1
0.75
1
0.305
81.19
5,404
swe_smith::train::24491
swe_smith
train
24,491
sunpy__sunpy.f8edfd5c.combine_module__c0m5g0wz
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Incorrect units for XRSA and plotting issues with TimeSeries I found two issues in the current implementation: 1. The units for XRSA in the GOES XRSTimeSeries are incorrect. Currently, they are set to `u.W/2` instead of the expected `u.W/u.m**2`. This causes unit validation to fail. ```python >>> import sunpy.time...
diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py index 08e2a6a..e70c177 100644 --- a/sunpy/timeseries/sources/goes.py +++ b/sunpy/timeseries/sources/goes.py @@ -267,7 +267,7 @@ class XRSTimeSeries(GenericTimeSeries): data = DataFrame({"xrsa": xrsa, "xrsb": xrsb, "xrsa_quality": ...
["sunpy/timeseries/sources/tests/test_goes.py::test_columns_units[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_columns_units[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g15_d20131028_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.p...
["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
2
20
8
1,429
0
0.6
1
0.75
1
0.304833
81.1895
5,405
swe_smith::train::49007
swe_smith
train
49,007
facebookresearch__hydra.0f03eb60.lm_rewrite__ppy63qqj
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
### Issue with Legacy Override in Hydra Version Base 1.2 #### Description I've encountered an issue when attempting to use legacy overrides with Hydra version base 1.2. It seems like the system is not handling multiple values for `hydra/help` correctly, and it's causing a `ConfigCompositionException`. This behavior i...
diff --git a/hydra/_internal/defaults_list.py b/hydra/_internal/defaults_list.py index d3bcb51..d44aadd 100644 --- a/hydra/_internal/defaults_list.py +++ b/hydra/_internal/defaults_list.py @@ -175,23 +175,20 @@ class Overrides: raise ConfigCompositionException(msg) def set_known_choice(self, def...
["tests/defaults_list/test_defaults_list.py::test_legacy_override_hydra_version_base_1_2[1.2-override_hydra]", "tests/defaults_list/test_defaults_list.py::test_legacy_override_hydra_version_base_1_2[None-override_hydra]"]
["tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[empty]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[one_item]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[self_leading]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[se...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
21
2
1,409
0
0.6
1
0.75
1
0.304833
81.1895
5,406
swe_smith::train::31193
swe_smith
train
31,193
scrapy__scrapy.35212ec5.combine_module__s93pcl8g
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
`scrapy startproject` and `scrapy genspider` commands broken after recent changes #### Description The `scrapy startproject` and `scrapy genspider` commands are failing with `NameError: name 'find_spec' is not defined` when trying to create new projects or spiders. #### Steps/Code to Reproduce ```python import subp...
diff --git a/scrapy/commands/genspider.py b/scrapy/commands/genspider.py index 6d4aec3..181eb5a 100644 --- a/scrapy/commands/genspider.py +++ b/scrapy/commands/genspider.py @@ -173,46 +173,6 @@ class Command(ScrapyCommand): print('Use "scrapy genspider --list" to see all available templates.') return ...
["tests/test_commands.py::StartprojectTest::test_existing_project_dir", "tests/test_commands.py::StartprojectTest::test_startproject", "tests/test_commands.py::StartprojectTest::test_startproject_with_project_dir", "tests/test_commands.py::StartprojectTemplatesTest::test_startproject_permissions_from_read_only", "tests...
["tests/test_commands.py::CommandSettings::test_help_formatter", "tests/test_commands.py::CommandSettings::test_settings_json_string", "tests/test_commands.py::MiscCommandsTest::test_command_not_found", "tests/test_commands.py::ViewCommandTest::test_methods", "tests/test_commands.py::PopCommandNameTest::test_no_command...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
2
45
55
929
0
0.6
1
0.75
1
0.304833
81.1895
5,407
r2e_gym::train::4677
r2e_gym
train
4,677
numpy__9ae4a0d1ebc52a556ed13248172e8280ad9fc6bd
numpy
numpy/numpy
python
9ae4a0d1ebc52a556ed13248172e8280ad9fc6bd
**Analysis:** - **Key Parts:** - **Commit Message:** Forbid passing non-integral index arrays to `insert` and `delete`. - **Test Results:** Previously, passing non-integer index arrays to `numpy.insert` and `numpy.delete` resulted in `DeprecationWarning` and silent conversion. After the commit, these operations ra...
diff --git a/doc/release/upcoming_changes/15805.expired.rst b/doc/release/upcoming_changes/15805.expired.rst --- a/doc/release/upcoming_changes/15805.expired.rst +++ b/doc/release/upcoming_changes/15805.expired.rst @@ -0,0 +1,6 @@ +`numpy.insert` and `numpy.delete` no longer accept non-integral indices +---------------...
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -543,6 +543,12 @@ val = [(4, 'd')] * 2 b = np.insert(a, [0, 2], val) assert_array_equal(b[[0, 3]], np.array(val...
null
null
namanjain12/numpy_final:9ae4a0d1ebc52a556ed13248172e8280ad9fc6bd
true
null
2
21
null
2,120
0
0.75
1
0.6375
1
0.423333
81.18875
5,408
swe_smith::train::8174
swe_smith
train
8,174
cantools__cantools.0c6a7871.func_pm_remove_cond__uq0iz8ah
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
# Minimum value check not working for signals ## Bug description The minimum value check for signals is not working properly. When encoding a message with a signal value that is below the minimum allowed value, the encoder should raise an `EncodeError`, but it's not happening. ## Steps to reproduce Create a message...
diff --git a/src/cantools/database/can/message.py b/src/cantools/database/can/message.py index 942b2cc..52a19fd 100644 --- a/src/cantools/database/can/message.py +++ b/src/cantools/database/can/message.py @@ -760,16 +760,8 @@ class Message: ) raw_value = signal_value - if ...
["tests/test_database.py::CanToolsDatabaseTest::test_encode_signal_strict", "tests/test_database.py::CanToolsDatabaseTest::test_encode_signal_strict_negative_scaling_05", "tests/test_database.py::CanToolsDatabaseTest::test_encode_signal_strict_negative_scaling_09", "tests/test_database.py::CanToolsDatabaseTest::test_en...
["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
4
1,607
0
0.6
1
0.75
1
0.3045
81.1885
5,409
swe_smith::train::24371
swe_smith
train
24,371
sunpy__sunpy.f8edfd5c.func_pm_remove_loop__pstfovr1
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Attr registration loop removed breaking dynamic attribute creation #### Description When trying to access dynamically registered attributes on Attr classes, they are no longer available. The attributes that should be created during client registration are missing from the class. #### Steps/Code to Reproduce ```pyth...
diff --git a/sunpy/net/attr.py b/sunpy/net/attr.py index 3fc4f23..c743173 100644 --- a/sunpy/net/attr.py +++ b/sunpy/net/attr.py @@ -229,46 +229,6 @@ class Attr(metaclass=AttrMeta): attr_tuple = cls._attr_registry[attr] - for pair in attr_values: - if len(pair) > 2...
["sunpy/net/tests/test_attr.py::test_attr_metamagic", "sunpy/net/tests/test_attr.py::test_attr_dynamic", "sunpy/net/tests/test_attr.py::test_attr_dir", "sunpy/net/tests/test_attr.py::test_attr_sanity", "sunpy/net/tests/test_attr.py::test_attr_keyword", "sunpy/net/tests/test_attr.py::test_attr_num", "sunpy/net/tests/tes...
["sunpy/net/tests/test_attr.py::test_empty", "sunpy/net/tests/test_attr.py::test_empty_type[int]", "sunpy/net/tests/test_attr.py::test_empty_type[str]", "sunpy/net/tests/test_attr.py::test_empty_type[float]", "sunpy/net/tests/test_attr.py::test_empty_type[list]", "sunpy/net/tests/test_attr.py::test_empty_type[set]", "s...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
40
14
1,027
0
0.6
1
0.75
1
0.3045
81.1885
5,410
swe_smith::train::8424
swe_smith
train
8,424
pyupio__safety.7654596b.combine_file__sbf8hcsg
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
# get_command_for() returns wrong command object causing CLI commands to fail ## Description When using the CLI, several commands are failing because the `get_command_for()` function is returning the wrong command object. Example: ```python # Using the generate command safety generate policy_file # Expected output...
diff --git a/safety/cli_util.py b/safety/cli_util.py index 3579dbc..34e3e3f 100644 --- a/safety/cli_util.py +++ b/safety/cli_util.py @@ -104,23 +104,21 @@ def get_command_for(name: str, typer_instance: typer.Typer) -> click.Command: single_command = next( (command for command in typer_instance.r...
["tests/test_cli.py::TestSafetyCLI::test_check_with_fix", "tests/test_cli.py::TestSafetyCLI::test_check_with_fix_only_works_with_files", "tests/test_cli.py::TestSafetyCLI::test_command_line_interface", "tests/test_cli.py::TestSafetyCLI::test_debug_flag", "tests/test_cli.py::TestSafetyCLI::test_generate_pass", "tests/te...
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
53
13
767
0
0.6
1
0.75
1
0.3045
81.1885
5,411
r2e_gym::train::4181
r2e_gym
train
4,181
numpy__e908bfa9977a45b311ef09f03551aa1780686739
numpy
numpy/numpy
python
e908bfa9977a45b311ef09f03551aa1780686739
**Analysis:** - **Key Parts from Commit Details and Test Results:** - **Commit Message:** Indicates a bug fix where `ediff1d` should return subclasses. - **Test Results:** Previously, the test `TestSetOps.test_ediff1d` failed with a `ValueError` when using `np.matrix` as input. After the commit, all tests, includi...
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -81,28 +81,31 @@ # force a 1d array ary = np.asanyarray(ary).ravel() - # get the length of the diff'd values - l = len(ary) - 1 - if l < 0: - # force length to be...
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py --- a/numpy/lib/tests/test_arraysetops.py +++ b/numpy/lib/tests/test_arraysetops.py @@ -175,6 +175,8 @@ assert_array_equal([1,7,8], ediff1d(two_elem, to_end=[7,8])) assert_array_equal([7,1], ediff1d(two_elem, to_beg...
null
null
namanjain12/numpy_final:e908bfa9977a45b311ef09f03551aa1780686739
true
null
1
27
null
1,999
0
0.75
1
0.6375
1
0.423167
81.18825
5,412
swe_smith::train::18513
swe_smith
train
18,513
HIPS__autograd.ac044f0d.lm_rewrite__3xecezi8
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
## Issue `const_graph` function raises an `AttributeError` when used with certain arguments. ## Description When using the `const_graph` function, an `AttributeError` is encountered. This seems to occur when the function is called with specific arguments, leading to unexpected behavior. ## Code to Reproduce ```python...
diff --git a/autograd/misc/tracers.py b/autograd/misc/tracers.py index 20dd555..8900a31 100644 --- a/autograd/misc/tracers.py +++ b/autograd/misc/tracers.py @@ -23,26 +23,40 @@ class ConstGraphNode(Node): def const_graph_unary(fun): - graph = [] - _fun = [fun] # Allow fun to be freed, since it may have boun...
["tests/test_misc.py::test_const_graph", "tests/test_misc.py::test_const_graph_args"]
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
52
2
786
0
0.6
1
0.75
1
0.304333
81.188
5,413
swe_smith::train::25183
swe_smith
train
25,183
pylint-dev__astroid.b114f6b5.combine_module__h6g3m9fi
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Class attribute lookup broken for metaclass attributes and special attributes #### Description Class attribute lookup is not working correctly when accessing attributes from metaclasses or special class attributes like `__bases__` and `__mro__`. The lookup appears to be returning incorrect results or raising Attribut...
diff --git a/astroid/nodes/_base_nodes.py b/astroid/nodes/_base_nodes.py index 65b703d..78868d7 100644 --- a/astroid/nodes/_base_nodes.py +++ b/astroid/nodes/_base_nodes.py @@ -433,13 +433,13 @@ class OperatorNode(NodeNG): reverse: bool = False, ) -> partial[Generator[InferenceResult]]: """Get an...
["tests/brain/numpy/test_core_numerictypes.py::NumpyBrainCoreNumericTypesTest::test_generic_types_are_subscriptables", "tests/brain/numpy/test_core_numerictypes.py::NumpyBrainCoreNumericTypesTest::test_generic_types_have_attributes", "tests/brain/numpy/test_core_numerictypes.py::NumpyBrainCoreNumericTypesTest::test_num...
["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
2
18
52
1,465
0
0.6
1
0.75
1
0.304167
81.1875
5,414
swe_smith::train::36608
swe_smith
train
36,608
lincolnloop__python-qrcode.456b01d4.func_basic__fjxmlslh
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
<START WRITING> QR code rendering fails with certain module drawers #### Description When trying to generate QR codes with certain module drawers, the code fails to render properly. Specifically, the following module drawers are affected: - HorizontalBarsDrawer - RoundedModuleDrawer - VerticalBarsDrawer #### MCVE Co...
diff --git a/qrcode/image/base.py b/qrcode/image/base.py index 4e8468b..792fca9 100644 --- a/qrcode/image/base.py +++ b/qrcode/image/base.py @@ -153,12 +153,12 @@ class BaseImageWithDrawer(BaseImage): return super().init_new_image() def drawrect_context(self, row: int, col: int, qr: "QRCode"): - ...
["qrcode/tests/test_qrcode_pil.py::test_render_styled_with_drawer[HorizontalBarsDrawer]", "qrcode/tests/test_qrcode_pil.py::test_render_styled_with_drawer[RoundedModuleDrawer]", "qrcode/tests/test_qrcode_pil.py::test_render_styled_with_drawer[VerticalBarsDrawer]"]
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
10
3
1,625
0
0.6
1
0.75
1
0.304167
81.1875
5,415
swe_smith::train::2035
swe_smith
train
2,035
pdfminer__pdfminer.six.1a8bd2f7.func_basic__24mjvr2i
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
name2unicode function returns empty string instead of raising KeyError for invalid glyph names #### Description The `name2unicode` function in `encodingdb.py` is returning an empty string for invalid glyph names instead of raising a `KeyError` as expected. This affects glyph names that don't match any known patterns ...
diff --git a/pdfminer/encodingdb.py b/pdfminer/encodingdb.py index 7a3baf1..2058b2d 100644 --- a/pdfminer/encodingdb.py +++ b/pdfminer/encodingdb.py @@ -32,16 +32,13 @@ def name2unicode(name: str) -> str: "it should be of type str but is of type %s" % (name, type(name)), ) - name = name.split...
["tests/test_encodingdb.py::test_name2unicode_multiple_components", "tests/test_encodingdb.py::test_name2unicode_multiple_components_lowercase", "tests/test_encodingdb.py::test_name2unicode_foo", "tests/test_encodingdb.py::test_name2unicode_notdef", "tests/test_encodingdb.py::test_name2unicode_overflow_error"]
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
15
5
1,525
0
0.6
1
0.75
1
0.304167
81.1875
5,416
swe_smith::train::9795
swe_smith
train
9,795
keleshev__schema.24a30457.func_basic__68s1ceaj
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
Schema validation broken for basic types and dictionaries #### Description Schema validation is failing for basic data types and dictionary structures. When validating simple schemas like `Schema({'key': 5})` or type checks like `Schema(int)`, the validation incorrectly raises `SchemaError` or `SchemaUnexpectedTypeEr...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..222b218 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -438,20 +438,18 @@ class Schema(object): if flavor == ITERABLE: data = Schema(type(s), error=e).validate(data, **kwargs) o: Or = Or(*s, error=e, sche...
["test_schema.py::test_schema", "test_schema.py::test_or_only_one", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema.py::test_dict", "test_schema.py::test_dict_keys", "test_schema.py::test_ignore_extra_keys", "test_schema.py::test_ignore_e...
["test_schema.py::test_validate_file", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_test", "test_schema.py::test_strictly", "test_schema.py::test_use_error_handling", "test_schema.py::test_or_error_handling", "test_schema.py::test_and_error_handling", "test_schema.py::test_schema_error_h...
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
21
34
1,404
0
0.6
1
0.75
1
0.304
81.187
5,417
swe_smith::train::46129
swe_smith
train
46,129
conan-io__conan.86f29e13.pr_13581
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### Issue: `cache clean` Command Requires At Least One Argument #### Description After the recent changes, the `cache clean` command now requires at least one of the `--source`, `--build`, or `--download` arguments to be specified. This is a change from previous behavior where the command could be run without any arg...
diff --git a/conan/api/subapi/cache.py b/conan/api/subapi/cache.py index b427150..3399065 100644 --- a/conan/api/subapi/cache.py +++ b/conan/api/subapi/cache.py @@ -267,4 +267,4 @@ def _resolve_latest_pref(cache, pref): def _check_folder_existence(ref, folder_name, folder_path): if not os.path.exists(folder_path)...
["test/integration/command/cache/test_cache_clean.py::test_cache_clean", "test/integration/command/cache/test_cache_clean.py::test_cache_clean_all", "test/integration/command/cache/test_cache_clean.py::test_cache_multiple_builds_same_prev_clean", "test/integration/command/cache/test_cache_clean.py::test_cache_multiple_...
[]
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
3
28
5
1,263
0
0.6
1
0.75
1
0.303833
81.1865
5,418
swe_smith::train::29653
swe_smith
train
29,653
cookiecutter__cookiecutter.b4451231.func_pm_remove_assign__u2kljodk
swesmith/cookiecutter__cookiecutter.b4451231
cookiecutter/cookiecutter
python
null
# UnboundLocalError when cloning repositories with non-existent directories ## Description When trying to clone a repository using the `clone()` function, an `UnboundLocalError` occurs if the repository directory doesn't exist yet. This happens because the `clone` variable is referenced before it's assigned a value. ...
diff --git a/cookiecutter/vcs.py b/cookiecutter/vcs.py index 1ae5b12..ec4a0a1 100644 --- a/cookiecutter/vcs.py +++ b/cookiecutter/vcs.py @@ -76,8 +76,6 @@ def clone( cached resources. :returns: str with path to the new directory of the repository. """ - # Ensure that clone_to_dir exists - clone...
["tests/vcs/test_clone.py::test_clone_should_rstrip_trailing_slash_in_repo_url", "tests/vcs/test_clone.py::test_clone_should_invoke_vcs_command[git-https://github.com/hello/world.git-world]", "tests/vcs/test_clone.py::test_clone_should_invoke_vcs_command[hg-https://bitbucket.org/foo/bar-bar]", "tests/vcs/test_clone.py:...
["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl...
jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231
true
null
1
7
7
1,683
0
0.6
1
0.75
1
0.303833
81.1865
5,419
swe_smith::train::51815
swe_smith
train
51,815
pydicom__pydicom.7d361b3d.func_basic__85meiyue
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
FileSet loading fails with TypeError when passing Dataset instance #### Description When creating a FileSet by passing a Dataset instance directly, the code incorrectly tries to call `dcmread()` on the Dataset object instead of using it directly. This causes a TypeError since `dcmread()` expects a file path, not a Da...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..1b5f5ac 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -1615,9 +1615,9 @@ class FileSet: are found in the File-set (default ``False``). """ if isinstance(ds_or_path, Dataset): - ds ...
["tests/test_fileset.py::TestRecordNode::test_root", "tests/test_fileset.py::TestRecordNode::test_leaf", "tests/test_fileset.py::TestRecordNode::test_add", "tests/test_fileset.py::TestRecordNode::test_key", "tests/test_fileset.py::TestRecordNode::test_bad_record", "tests/test_fileset.py::TestRecordNode::test_bad_record...
["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
33
109
1,163
0
0.6
1
0.75
1
0.303833
81.1865
5,420
swe_smith::train::9483
swe_smith
train
9,483
marshmallow-code__webargs.dbde72fe.combine_file__bww8q2d7
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
MultiDictProxy constructor arguments swapped causing AttributeError #### Description When using webargs parsers, I'm getting AttributeError exceptions when trying to parse request data. It seems like the MultiDictProxy class is not being initialized correctly. #### Steps/Code to Reproduce ```python from webargs imp...
diff --git a/src/webargs/multidictproxy.py b/src/webargs/multidictproxy.py index de9b82b..5ccec42 100644 --- a/src/webargs/multidictproxy.py +++ b/src/webargs/multidictproxy.py @@ -25,18 +25,17 @@ class MultiDictProxy(MutableMapping): ma.fields.Tuple, ), ): - self.data = multidict - ...
["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_or_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_default", "tests/test_aioh...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_with_charset", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_with_vendor_media_type", "tests/...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
35
172
1,122
0
0.6
1
0.75
1
0.303667
81.186
5,421
swe_smith::train::1682
swe_smith
train
1,682
agronholm__typeguard.b6a7e438.combine_file__y7fbfgvb
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking logic inverted causing incorrect validation behavior #### Description Type checking is behaving incorrectly - it's rejecting valid types and accepting invalid ones. The validation logic appears to be inverted in several places. #### Steps/Code to Reproduce ```python from typeguard import check_type fr...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..dbbff1c 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -859,14 +859,14 @@ def check_self( memo: TypeCheckMemo, ) -> None: if memo.self_type is None: - raise TypeCheckError("cannot be checke...
["tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_fail", "tests/test_checkers.py::TestFloat::test_bad_type", "tests/test_checkers.py::TestComplexNumber::test_bad_type", "tests/test_checkers.py::TestCallable::test_bad_type", "tests/test_checkers.py::TestCallable::test_too...
["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::TestBytesLike::test_valid[bytes]", "tests/test_checkers.py::TestBytesLike:...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
26
185
1,302
0
0.6
1
0.75
1
0.303667
81.186
5,422
swe_smith::train::48974
swe_smith
train
48,974
facebookresearch__hydra.0f03eb60.lm_rewrite__bgv1x29g
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
# Duplicate configs not detected when using same config path with different packages I'm trying to use Hydra with multiple configs that have the same path but different packages, and I'm running into an issue where duplicates aren't being detected properly. For example, when I have a config like this: ```yaml # prim...
diff --git a/hydra/_internal/defaults_list.py b/hydra/_internal/defaults_list.py index d3bcb51..72ce807 100644 --- a/hydra/_internal/defaults_list.py +++ b/hydra/_internal/defaults_list.py @@ -691,17 +691,18 @@ def _create_root(config_name: Optional[str], with_hydra: bool) -> DefaultsTreeNo def ensure_no_duplicate...
["tests/defaults_list/test_defaults_list.py::test_primary_cfg_pkg_header_foo[primary_pkg_header_foo0]", "tests/defaults_list/test_defaults_list.py::test_duplicate_items[error_duplicate_group]", "tests/defaults_list/test_defaults_list.py::test_duplicate_items[error_duplicate_group_nested]"]
["tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[empty]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[one_item]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[self_leading]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[se...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
21
3
1,402
0
0.6
1
0.75
1
0.303667
81.186
5,423
swe_smith::train::39954
swe_smith
train
39,954
scanny__python-pptx.278b47b1.combine_file__0w8lgmen
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
GraphicFrame properties missing after refactoring Description After some recent changes, several properties on GraphicFrame objects are no longer working. When trying to access chart, has_table, or shadow properties, the code either raises AttributeError or behaves unexpectedly. Steps/Code to Reproduce ```python fr...
diff --git a/src/pptx/shapes/graphfrm.py b/src/pptx/shapes/graphfrm.py index c0ed2bb..89fb3c6 100644 --- a/src/pptx/shapes/graphfrm.py +++ b/src/pptx/shapes/graphfrm.py @@ -38,16 +38,6 @@ class GraphicFrame(BaseShape): super().__init__(graphicFrame, parent) self._graphicFrame = graphicFrame - @pr...
["tests/shapes/test_graphfrm.py::DescribeGraphicFrame::it_provides_access_to_the_chart_it_contains", "tests/shapes/test_graphfrm.py::DescribeGraphicFrame::but_it_raises_on_chart_if_there_isnt_one", "tests/shapes/test_graphfrm.py::DescribeGraphicFrame::it_knows_whether_it_contains_a_table[http://schemas.openxmlformats.o...
["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
25
7
1,321
0
0.6
1
0.75
1
0.3035
81.1855
5,424
swe_smith::train::5001
swe_smith
train
5,001
bottlepy__bottle.a8dfef30.func_pm_remove_cond__006p3gwx
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
# ResourceManager lookup method not checking cache properly I've found a bug in the ResourceManager class where the lookup method is not properly checking the cache or searching through the path list. ## Description When trying to look up a resource using the ResourceManager, it's directly returning from the cache w...
diff --git a/bottle.py b/bottle.py index 286b5bc..764095f 100755 --- a/bottle.py +++ b/bottle.py @@ -2701,17 +2701,7 @@ class ResourceManager(object): The :attr:`path` list is searched in order. The first match is returned. Symlinks are followed. The result is cached to speed up f...
["test/test_resources.py::TestResourceManager::test_get", "test/test_resources.py::TestResourceManager::test_open"]
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
10
2
1,621
0
0.6
1
0.75
1
0.3035
81.1855
5,425
swe_smith::train::8992
swe_smith
train
8,992
pyupio__safety.7654596b.func_pm_remove_cond__uc4kxh2m
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
HTTP status code validation removed from fetch_database_url function Description The `fetch_database_url` function no longer properly handles HTTP error status codes. When the server returns error responses like 403 (Invalid Credentials), 429 (Too Many Requests), or other non-200 status codes, the function continues ...
diff --git a/safety/safety.py b/safety/safety.py index 7bb6ad7..86d5c94 100644 --- a/safety/safety.py +++ b/safety/safety.py @@ -186,15 +186,6 @@ def fetch_database_url( except requests.exceptions.RequestException: raise DatabaseFetchError() - if r.status_code == 403: - raise InvalidCredential...
["tests/test_safety.py::TestSafety::test_get_packages_licenses_db_fetch_error", "tests/test_safety.py::TestSafety::test_get_packages_licenses_very_often", "tests/test_safety.py::TestSafety::test_get_packages_licenses_with_invalid_api_key", "tests/test_safety.py::TestSafety::test_get_packages_licenses_without_api_key"]
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
10
4
1,621
0
0.6
1
0.75
1
0.3035
81.1855
5,426
swe_smith::train::10210
swe_smith
train
10,210
paramiko__paramiko.23f92003.combine_file__wkfe02w0
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH key exchange fails with AttributeError during client mode initialization #### Description When attempting to establish an SSH connection in client mode, the key exchange process fails with an AttributeError. The error occurs during the initial key exchange phase where the client is trying to compute the ephemeral...
diff --git a/paramiko/kex_group1.py b/paramiko/kex_group1.py index f074256..35fe20d 100644 --- a/paramiko/kex_group1.py +++ b/paramiko/kex_group1.py @@ -54,13 +54,13 @@ class KexGroup1: def start_kex(self): self._generate_x() - if self.transport.server_mode: + if not self.transport.server_...
["tests/test_kex.py::KexTest::test_group1_client", "tests/test_kex.py::KexTest::test_group1_server", "tests/test_kex.py::KexTest::test_kex_group14_sha256_client", "tests/test_kex.py::KexTest::test_kex_group14_sha256_server", "tests/test_kex.py::KexTest::test_kex_group16_sha512_client", "tests/test_kex.py::KexTest::test...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
29
6
1,240
0
0.6
1
0.75
1
0.303333
81.185
5,427
swe_smith::train::20023
swe_smith
train
20,023
kurtmckee__feedparser.cad965a3.func_pm_ctrl_shuffle__8m3autcj
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
AttributeError when parsing feeds with HTTP conditions #### Description When parsing feeds using HTTP URLs, feedparser raises an AttributeError related to missing attributes during initialization. This affects the ability to parse feeds from HTTP sources. #### Steps/Code to Reproduce ```python import feedparser # ...
diff --git a/feedparser/mixin.py b/feedparser/mixin.py index 0e8380d..5018155 100644 --- a/feedparser/mixin.py +++ b/feedparser/mixin.py @@ -170,42 +170,39 @@ class XMLParserMixin( } def __init__(self): + self.title_depth = -1 + self.contentparams = FeedParserDict() + if self.lang: + ...
["tests/test_well_formed.py::test_http_conditions[info11]", "tests/test_well_formed.py::test_http_conditions[info10]", "tests/test_well_formed.py::test_http_conditions[info12]", "tests/test_well_formed.py::test_http_conditions[info9]", "tests/test_well_formed.py::test_http_conditions[info13]"]
["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
47
5
880
0
0.6
1
0.75
1
0.303333
81.185
5,428
swe_smith::train::31259
swe_smith
train
31,259
scrapy__scrapy.35212ec5.func_pm_ctrl_shuffle__fitumlqy
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
# Incorrect order of operations in ResponseTypes.from_body() ## Description Scrapy 2.11.0 I found an issue with the `from_body` method in `scrapy/responsetypes.py`. The method is supposed to guess the appropriate response type based on the body content, but it seems to have a problem with the order of operations. H...
diff --git a/scrapy/responsetypes.py b/scrapy/responsetypes.py index 3f6f030..7eba706 100644 --- a/scrapy/responsetypes.py +++ b/scrapy/responsetypes.py @@ -104,23 +104,22 @@ class ResponseTypes: return Response def from_body(self, body: bytes) -> type[Response]: - """Try to guess the appropriate...
["tests/test_responsetypes.py::ResponseTypesTest::test_from_body"]
["tests/test_responsetypes.py::ResponseTypesTest::test_custom_mime_types_loaded", "tests/test_responsetypes.py::ResponseTypesTest::test_from_args", "tests/test_responsetypes.py::ResponseTypesTest::test_from_content_disposition", "tests/test_responsetypes.py::ResponseTypesTest::test_from_content_type", "tests/test_respo...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
1
21
1
1,400
0
0.6
1
0.75
1
0.303333
81.185
5,429
swe_smith::train::5874
swe_smith
train
5,874
mahmoud__boltons.3bfcfdd0.combine_file__mn4lzmb4
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
Function wrapping and argument handling broken in funcutils.py Description I've found a bug in the `funcutils.py` module that breaks function wrapping and argument handling. The issue appears when using the `wraps` decorator with the `expected` parameter. Consider the following example: ```python def expect_string(...
diff --git a/boltons/funcutils.py b/boltons/funcutils.py index 0bdc28e..6274374 100644 --- a/boltons/funcutils.py +++ b/boltons/funcutils.py @@ -618,10 +618,6 @@ def update_wrapper(wrapper, func, injected=None, expected=None, build_from=None, def _parse_wraps_expected(expected): - # expected takes a pretty powe...
["tests/test_funcutils_fb.py::test_wraps_expected", "tests/test_funcutils_fb.py::test_get_arg_names", "tests/test_funcutils_fb_py3.py::test_get_arg_names"]
["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac...
jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0
true
null
1
18
3
1,458
0
0.6
1
0.75
1
0.303
81.184
5,430
swe_smith::train::33083
swe_smith
train
33,083
django-money__django-money.835c1ab8.combine_module__1l5j0jxl
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
MoneyField attribute access broken after model instantiation #### Description After creating a model instance with a MoneyField, accessing the money field attribute raises an AttributeError. This appears to be related to the field proxy not properly handling attribute access. #### Steps/Code to Reproduce ```python ...
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index dc5f6ad..6467386 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -95,16 +95,6 @@ class MoneyFieldProxy: raise TypeError("Currency code can't be None") return Money(amount=amount, currency=currency, decim...
["tests/test_form.py::test_save", "tests/test_form.py::test_fields_default_amount_becomes_forms_initial", "tests/test_form.py::TestValidation::test_valid[value0]", "tests/test_form.py::TestValidation::test_valid[value1]", "tests/test_form.py::TestValidation::test_valid[value2]", "tests/test_form.py::TestValidation::tes...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
2
40
143
1,018
0
0.6
1
0.75
1
0.303
81.184
5,431
swe_smith::train::2947
swe_smith
train
2,947
madzak__python-json-logger.5f85723f.func_pm_ctrl_shuffle__4yuom8ha
swesmith/madzak__python-json-logger.5f85723f
madzak/python-json-logger
python
null
# Bug: JSON Encoder fails to properly handle datetime objects ## Description When using the JsonFormatter, datetime objects are not being properly serialized to JSON. This issue occurs when trying to log messages containing datetime objects, which should be converted to ISO format strings. ## Steps to Reproduce ```p...
diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py index 519a64d..e3b2d49 100644 --- a/src/pythonjsonlogger/jsonlogger.py +++ b/src/pythonjsonlogger/jsonlogger.py @@ -76,14 +76,6 @@ class JsonEncoder(json.JSONEncoder): """ def default(self, obj): - if isinstance(obj,...
["tests/test_jsonlogger.py::TestJsonLogger::test_json_default_encoder", "tests/test_jsonlogger.py::TestJsonLogger::test_json_default_encoder_with_timestamp"]
["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg...
jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f
true
null
1
15
2
1,516
0
0.6
1
0.75
1
0.302667
81.183
5,432
swe_smith::train::1017
swe_smith
train
1,017
pytest-dev__iniconfig.16793ead.func_basic__k5vhxdal
swesmith/pytest-dev__iniconfig.16793ead
pytest-dev/iniconfig
python
null
# INI file parsing issues with value continuation and section handling I've found several issues with the INI file parser in iniconfig. The parser doesn't correctly handle value continuations and has problems with sections. ## Issue 1: Value continuations are reversed When parsing a value with continuation lines, th...
diff --git a/src/iniconfig/_parse.py b/src/iniconfig/_parse.py index 2d03437..c4fa87d 100644 --- a/src/iniconfig/_parse.py +++ b/src/iniconfig/_parse.py @@ -16,28 +16,22 @@ class _ParsedLine(NamedTuple): def parse_lines(path: str, line_iter: list[str]) -> list[_ParsedLine]: result: list[_ParsedLine] = [] - s...
["testing/test_iniconfig.py::test_tokenize[value]", "testing/test_iniconfig.py::test_continuation_needs_perceeding_token", "testing/test_iniconfig.py::test_continuation_cant_be_after_section", "testing/test_iniconfig.py::test_iniconfig_section_first", "testing/test_iniconfig.py::test_example_pypirc"]
["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_parse_empty", "testing/test_iniconfig.py::test_ParseError", "testing/test_iniconfig.py::test_section_cant_be_empty", "testing/...
jyangballin/swesmith.x86_64.pytest-dev_1776_iniconfig.16793ead
true
null
1
16
5
1,496
0
0.6
1
0.75
1
0.302667
81.183
5,433
swe_smith::train::3448
swe_smith
train
3,448
pygments__pygments.27649ebb.combine_file__o3ptb7it
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
PhpLexer missing required attributes after initialization #### Description The PhpLexer class is missing several required attributes that are expected to be set during initialization, causing AttributeError when trying to use the lexer. #### Steps/Code to Reproduce ```python from pygments.lexers import PhpLexer # ...
diff --git a/pygments/lexers/php.py b/pygments/lexers/php.py index 4f00c6f..3c28f03 100644 --- a/pygments/lexers/php.py +++ b/pygments/lexers/php.py @@ -103,7 +103,7 @@ class PsyshConsoleLexer(Lexer): version_added = '2.7' def __init__(self, **options): - options['startinline'] = True + option...
["tests/test_basic_api.py::test_lexer_options[HtmlPhpLexer]", "tests/test_basic_api.py::test_lexer_options[JavascriptPhpLexer]", "tests/test_basic_api.py::test_lexer_options[XmlPhpLexer]", "tests/test_basic_api.py::test_random_input[JavascriptPhpLexer]", "tests/test_basic_api.py::test_random_input[HtmlPhpLexer]", "test...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
41
22
996
0
0.6
1
0.75
1
0.302667
81.183
5,434
swe_smith::train::20268
swe_smith
train
20,268
gruns__furl.da386f68.func_basic__j78hdqob
swesmith/gruns__furl.da386f68
gruns/furl
python
null
# furl.add() method broken - returns None and swaps parameters I discovered a serious issue with the `add()` method in the `furl` class. The method is completely broken in several ways: 1. The method returns `None` instead of returning `self` for method chaining 2. The parameters for `args` and `query_params` are swa...
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..31af702 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -1607,18 +1607,19 @@ class furl(URLPathCompositionInterface, QueryCompositionInterface, '<args> is a shortcut for <query_params>, not to be used ' 'with <query_params>. See...
["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestFurl::test_add", "tests/test_furl.py::TestFurl::test_path_itruediv", "tests/test_furl.py::TestFurl::test_path_truediv", "tests/test_furl.py::TestFurl::test_set"]
["tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_itruediv", "tests/test_furl.py::TestPath::te...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
13
5
1,555
0
0.6
1
0.75
1
0.3025
81.1825
5,435
swe_smith::train::29654
swe_smith
train
29,654
cookiecutter__cookiecutter.b4451231.func_pm_remove_assign__u7yr7kjf
swesmith/cookiecutter__cookiecutter.b4451231
cookiecutter/cookiecutter
python
null
## Project generation fails with undefined variables after recent changes I'm encountering issues when trying to generate projects from cookiecutter templates. The generation process is failing with various errors related to undefined variables and missing loaders. #### Steps to Reproduce ```python from cookiecutter...
diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py index cd59933..9081515 100644 --- a/cookiecutter/generate.py +++ b/cookiecutter/generate.py @@ -362,15 +362,6 @@ def generate_files( except UndefinedError as err: msg = f"Unable to create project directory '{unrendered_dir}'" raise ...
["tests/test_abort_generate_on_hook_error.py::test_hooks_raises_errors[post_gen_hook_raises_error]", "tests/test_cli.py::test_cli", "tests/test_cli.py::test_cli_verbose", "tests/test_cli.py::test_cli_replay_generated", "tests/test_cli.py::test_cli_overwrite_if_exists_when_output_dir_does_not_exist[-f]", "tests/test_cli...
["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl...
jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231
true
null
1
20
58
1,415
0
0.6
1
0.75
1
0.3025
81.1825
5,436
swe_smith::train::24984
swe_smith
train
24,984
pylint-dev__astroid.b114f6b5.combine_file__53u5xyv3
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
functools.lru_cache and functools.partial not properly detected #### Description When using functools decorators and functions, astroid fails to properly identify them, causing inference issues. The brain module for functools appears to have inverted logic that prevents proper detection of functools members. #### St...
diff --git a/astroid/brain/brain_functools.py b/astroid/brain/brain_functools.py index c11b856..7830184 100644 --- a/astroid/brain/brain_functools.py +++ b/astroid/brain/brain_functools.py @@ -51,9 +51,10 @@ class LruWrappedModel(objectmodel.FunctionModel): caller: SuccessfulInferenceResult | None, ...
["tests/brain/test_brain.py::TypingBrain::test_namedtuple_base", "tests/brain/test_brain.py::TypingBrain::test_namedtuple_few_args", "tests/brain/test_brain.py::TypingBrain::test_namedtuple_few_fields", "tests/brain/test_brain.py::TypingBrain::test_namedtuple_inference", "tests/brain/test_brain.py::TypingBrain::test_na...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
17
148
1,474
0
0.6
1
0.75
1
0.302333
81.182
5,437
swe_smith::train::43240
swe_smith
train
43,240
gawel__pyquery.811cd048.lm_rewrite__tacpywrz
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
# Map function doesn't return PyQuery object anymore I noticed that the `map` function in PyQuery is not returning a PyQuery object anymore, which breaks existing code. ## Description I was using the `map` function to transform elements in a PyQuery object, but after updating to the latest version, my code stopped w...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..58bd227 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -722,22 +722,23 @@ class PyQuery(list): ['Hi', 'there', 'Bye'] """ - items = [] + result = [] + args = getargspec(func) try: ...
["pyquery/pyquery.py::pyquery.pyquery.PyQuery.Fn", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.map", "tests/test_pyquery.py::TestCallback::test_S_this_inside_callback", "tests/test_pyquery.py::TestCallback::test_parameterless_callback", "tests/test_pyquery.py::TestHook::test_fn"]
["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/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselec...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
19
5
1,434
0
0.6
1
0.75
1
0.302333
81.182
5,438
swe_smith::train::19121
swe_smith
train
19,121
seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__m74x6p8n
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepDiff crashes with UnboundLocalError when using ignore_order #### Description When using DeepDiff with `ignore_order=True`, the comparison fails with an `UnboundLocalError: local variable 'other' referenced before assignment`. This appears to affect various scenarios involving list comparisons with ignore_order en...
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..88da507 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -1302,16 +1302,7 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): pairs = dict_() def get_other_pair(hash_value, in_t1=True): - """ - ...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_do_not_overlap", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_overlap", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_comm...
["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_command.py::TestCommands::test...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
23
88
1,353
0
0.6
1
0.75
1
0.302167
81.1815
5,439
swe_smith::train::28438
swe_smith
train
28,438
encode__starlette.db5063c2.combine_module__k6vg0pao
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
ServerErrorMiddleware returns wrong status code and content type #### Description When using ServerErrorMiddleware with debug=True, the error response returns a 404 status code with "Not Found" message instead of the expected 500 status code with proper error handling. #### Steps/Code to Reproduce ```python from st...
diff --git a/starlette/middleware/__init__.py b/starlette/middleware/__init__.py index 5164e49..6c419f7 100644 --- a/starlette/middleware/__init__.py +++ b/starlette/middleware/__init__.py @@ -34,8 +34,8 @@ class Middleware: def __repr__(self) -> str: class_name = self.__class__.__name__ - args_s...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
["tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTTPMiddleware]", "tests/middleware/test_base.py::test_contextvars[trio-CustomMiddlewareWithoutBaseHTTPMiddleware]", "tests/middleware/test_cors.py::test_cors_allow_all[asyncio]", "tests/middleware/test_cors.py::test_cors_allow_all_exc...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
3
37
58
1,073
0
0.6
1
0.75
1
0.302167
81.1815
5,440
swe_smith::train::45043
swe_smith
train
45,043
mahmoud__glom.fb3c4e76.lm_rewrite__0rjpj611
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
### Issue: Path.startswith() TypeError #### Description Encountered a `TypeError` when using the `startswith()` method on a `Path` object. The method seems to be expecting an iterable, but it doesn't handle non-iterable inputs gracefully. This results in an error when passing certain types of arguments. #### Steps t...
diff --git a/glom/core.py b/glom/core.py index cee71a3..9a8b166 100644 --- a/glom/core.py +++ b/glom/core.py @@ -707,15 +707,23 @@ class Path: return tuple(zip(cur_t_path[1::2], cur_t_path[2::2])) def startswith(self, other): - if isinstance(other, basestring): - other = Path(other) - ...
["glom/test/test_error.py::test_all_public_errors", "glom/test/test_mutation.py::test_assign", "glom/test/test_mutation.py::test_assign_recursive", "glom/test/test_mutation.py::test_assign_spec_val", "glom/test/test_mutation.py::test_unregistered_assign", "glom/test/test_mutation.py::test_bad_assign_target", "glom/test...
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
26
19
1,293
0
0.6
1
0.75
1
0.302167
81.1815
5,441
swe_smith::train::28915
swe_smith
train
28,915
encode__starlette.db5063c2.lm_rewrite__lax89jze
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Jinja2Templates initialization logic is incorrect The current implementation of Jinja2Templates in starlette.templating.py has incorrect initialization logic when handling the `directory` and `env` parameters. When trying to initialize Jinja2Templates with both `directory` and `env` parameters, the error message is n...
diff --git a/starlette/templating.py b/starlette/templating.py index 17e7fa4..b3a16ab 100644 --- a/starlette/templating.py +++ b/starlette/templating.py @@ -80,29 +80,27 @@ class Jinja2Templates: context_processors: list[typing.Callable[[Request], dict[str, typing.Any]]] | None = None, ) -> None: ... - ...
["tests/test_templates.py::test_templates_require_directory_or_environment", "tests/test_templates.py::test_templates_require_directory_or_enviroment_not_both", "tests/test_templates.py::test_templates_with_environment_options_emit_warning"]
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
36
3
1,093
0
0.6
1
0.75
1
0.302167
81.1815
5,442
swe_smith::train::47391
swe_smith
train
47,391
sqlfluff__sqlfluff.50a1c4b6.combine_file__c6b6hxwj
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
LintResult.to_linting_error() returns error when anchor is None #### Description When a LintResult has no anchor (anchor is None), the `to_linting_error()` method incorrectly returns a SQLLintError instead of None. This causes issues with rule evaluation and error handling. #### Steps/Code to Reproduce ```python fr...
diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py index 1f00fb3..f47a392 100644 --- a/src/sqlfluff/core/rules/base.py +++ b/src/sqlfluff/core/rules/base.py @@ -138,9 +138,9 @@ class LintResult: def to_linting_error(self, rule: "BaseRule") -> Optional[SQLLintError]: """Conver...
["test/core/rules/docstring_test.py::test_backtick_replace", "test/core/rules/noqa_test.py::test__linter__raises_malformed_noqa", "test/core/rules/noqa_test.py::test_linter_noqa", "test/core/rules/noqa_test.py::test_linter_noqa_tmp", "test/core/rules/noqa_test.py::test_linter_noqa_disable", "test/core/rules/noqa_test.p...
["test/core/rules/docstring_test.py::test_content_count[\\\\*\\\\*Anti-pattern\\\\*\\\\*-1]", "test/core/rules/docstring_test.py::test_keyword_anti_before_best", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input0-True]", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
35
9
1,113
0
0.6
1
0.75
1
0.302167
81.1815
5,443
swe_smith::train::8963
swe_smith
train
8,963
pyupio__safety.7654596b.func_pm_remove_assign__yy7b6m7o
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
NameError in get_report_brief_info function when generating reports #### Description When running safety check commands, the application crashes with a NameError due to undefined variables in the `get_report_brief_info` function. Several variables that are referenced in the function are not properly defined, causing ...
diff --git a/safety/output_utils.py b/safety/output_utils.py index 0ebb928..f909bc4 100644 --- a/safety/output_utils.py +++ b/safety/output_utils.py @@ -890,8 +890,6 @@ def get_report_brief_info(as_dict: bool = False, report_type: int = 1, **kwargs: context = SafetyContext() packages = [pkg for pkg in conte...
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_unpinned_requirements", "tests/test_cli.py::TestSafetyCLI::test_check_vulnerabilities_found_default", "tests/test_cli.py::TestSafet...
["tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::test_check_with_fix_does_verify_api_key", "tests/test_cli.py::TestSafetyCLI::test_check_with_fix_only_works_with_files", "tests/test_cli...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
36
9
1,093
0
0.6
1
0.75
1
0.302167
81.1815
5,444
swe_smith::train::8929
swe_smith
train
8,929
pyupio__safety.7654596b.func_pm_remove_assign__j1xg22qj
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
SafetyPolicyFile validation fails with NameError on undefined variables #### Description When using a safety policy file, the validation process crashes with NameError exceptions due to undefined variables that were removed during code cleanup. #### Steps/Code to Reproduce Create a basic safety policy file `.safety...
diff --git a/safety/util.py b/safety/util.py index 420eb13..238f0e3 100644 --- a/safety/util.py +++ b/safety/util.py @@ -869,22 +869,18 @@ class SafetyPolicyFile(click.ParamType): try: # Read the content of the file raw = f.read() - yaml = YAML(typ='safe', p...
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t...
["tests/test_cli.py::TestSafetyCLI::test_command_line_interface", "tests/test_cli.py::TestSafetyCLI::test_debug_flag", "tests/test_cli.py::TestSafetyCLI::test_debug_flag_with_value_1", "tests/test_cli.py::TestSafetyCLI::test_debug_flag_with_value_true", "tests/test_cli.py::TestSafetyCLI::test_generate_pass", "tests/tes...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
18
19
1,452
0
0.6
1
0.75
1
0.302
81.181
5,445
swe_smith::train::18335
swe_smith
train
18,335
msiemens__tinydb.10644a0e.func_pm_class_rm_funcs__p569izqy
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Query equality operator returns boolean instead of QueryInstance #### Description When using the equality operator (`==`) on Query objects, it returns a boolean value instead of a QueryInstance, breaking query functionality. #### Steps/Code to Reproduce ```python from tinydb import TinyDB, Query, where from tinydb....
diff --git a/tinydb/queries.py b/tinydb/queries.py index 0ef6a69..7fa74ee 100644 --- a/tinydb/queries.py +++ b/tinydb/queries.py @@ -240,19 +240,6 @@ class Query(QueryInstance): (hashval if self.is_cacheable() else None) ) - def __eq__(self, rhs: Any): - """ - Test a dict value ...
["tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_delete[json]", "tests/test_operations.py::test_add_int[memory]", "tests/test_operations.py::test_add_int[json]", "tests/test_operations.py::test_add_str[memory]", "tests/test_operations.py::test_add_str[json]", "tests/test_operations.py::...
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
31
92
1,192
0
0.6
1
0.75
1
0.302
81.181
5,446
swe_smith::train::30765
swe_smith
train
30,765
mido__mido.a0158ff9.combine_module__ntzhkjm8
swesmith/mido__mido.a0158ff9
mido/mido
python
null
# Bug: MIDI port meta message with length 0 causes IndexError ### Describe the bug When reading a MIDI file that contains a port meta message with length 0, an IndexError is raised. This used to work in previous versions but now fails. ### How to Reproduce Create a MIDI file with a port meta message that has a leng...
diff --git a/mido/midifiles/meta.py b/mido/midifiles/meta.py index 0a7e2ba..5bfa6d5 100644 --- a/mido/midifiles/meta.py +++ b/mido/midifiles/meta.py @@ -271,13 +271,7 @@ class MetaSpec_midi_port(MetaSpec): defaults = [0] def decode(self, message, data): - if len(data) == 0: - # Message wit...
["../dev/tests/midifiles/test_midifiles.py::test_meta_messages_with_length_0", "../dev/tests/midifiles/test_units.py::test_second2tick"]
["../dev/tests/test_frozen.py::test_hashability", "../dev/tests/test_frozen.py::test_freeze_and_thaw", "../dev/tests/test_frozen.py::test_thawed_message_is_copy", "../dev/tests/test_frozen.py::test_is_frozen", "../dev/tests/test_frozen.py::test_frozen_repr", "../dev/tests/test_frozen.py::test_frozen_meta_repr", "../dev...
jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9
true
null
2
12
2
1,571
0
0.6
1
0.75
1
0.301833
81.1805
5,447
swe_smith::train::24590
swe_smith
train
24,590
marshmallow-code__marshmallow.9716fc62.combine_module__efby7rke
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Schema validation decorators not working correctly after recent changes #### Description The schema validation decorators seem to have broken functionality. When using `@validates_schema` and other validation decorators, they're not being called properly during schema validation and loading operations. #### Steps/Co...
diff --git a/src/marshmallow/decorators.py b/src/marshmallow/decorators.py index 965edb6..05f8fc4 100644 --- a/src/marshmallow/decorators.py +++ b/src/marshmallow/decorators.py @@ -119,9 +119,9 @@ def validates_schema( return set_hook( fn, VALIDATES_SCHEMA, - many=pass_many, - pass_...
["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...
["tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_invalid_data", "tests/test_decorators.py::test_decorator_post_dump_with_nested_original_and_pass_many[data0-expected_data0-expected_original_data0]", "tests/test_decorators.py::test_decorator_post_load_with_nested_original_and_pass_man...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
2
13
45
1,550
0
0.6
1
0.75
1
0.301667
81.18
5,448
swe_smith::train::42806
swe_smith
train
42,806
python-jsonschema__jsonschema.93e0caa5.lm_rewrite__2g5lcijq
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
# oneOf validation error message shows indices instead of schema values ## Description I've noticed an issue with the error message when validating against a `oneOf` schema where multiple schemas match. The error message is showing the indices of the valid schemas instead of the actual schema values. ## Steps to rep...
diff --git a/jsonschema/_keywords.py b/jsonschema/_keywords.py index f30f954..503a1e6 100644 --- a/jsonschema/_keywords.py +++ b/jsonschema/_keywords.py @@ -349,29 +349,28 @@ def anyOf(validator, anyOf, instance, schema): def oneOf(validator, oneOf, instance, schema): - subschemas = enumerate(oneOf) + """TOD...
["jsonschema/tests/test_validators.py::TestValidationErrorMessages::test_oneOf_matches_too_many"]
["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
31
1
1,190
0
0.6
1
0.75
1
0.301667
81.18
5,449
swe_smith::train::24828
swe_smith
train
24,828
marshmallow-code__marshmallow.9716fc62.func_pm_class_rm_funcs__tgxahkop
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Nested field validation not working for non-collection inputs when many=True #### Description When using a Nested field with `many=True`, invalid input types (like strings, numbers, or objects) are no longer being validated and rejected. The field should raise a ValidationError with "Invalid type." message when non-c...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..2f866b3 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -648,11 +648,6 @@ class Nested(Field): many = schema.many or self.many return schema.dump(nested_obj, many=many) - def _test_collecti...
["tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_invalid_data", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_schema_error", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_field_error", "tests/test_decorators....
["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
18
46
1,450
0
0.6
1
0.75
1
0.301667
81.18
5,450
swe_smith::train::45212
swe_smith
train
45,212
dask__dask.5f61e423.combine_module__0uztx055
swesmith/dask__dask.5f61e423
dask/dask
python
null
FromPandas missing PartitionsFiltered inheritance breaks partition filtering #### Description After recent changes, `FromPandas` no longer inherits from `PartitionsFiltered`, which breaks partition filtering functionality. This causes operations that rely on partition filtering to fail with `TypeError: 'NoneType' obj...
diff --git a/dask/dataframe/dask_expr/io/io.py b/dask/dataframe/dask_expr/io/io.py index ab41615..8062168 100644 --- a/dask/dataframe/dask_expr/io/io.py +++ b/dask/dataframe/dask_expr/io/io.py @@ -394,7 +394,7 @@ class FromMapProjectable(FromMap): return tsk -class FromPandas(PartitionsFiltered, BlockwiseI...
["dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>1]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>2]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>3]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-...
["dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>0]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_io_fusion[parquet]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_io_fusion[csv]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_csv_integer_usecols", "dask/dataframe/dask...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
2
42
57
970
0
0.6
1
0.75
1
0.301667
81.18
5,451
swe_smith::train::24375
swe_smith
train
24,375
sunpy__sunpy.f8edfd5c.func_pm_remove_loop__v8deenqa
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
VSOQueryResponseTable missing columns for nested attributes #### Description When building a VSOQueryResponseTable from a zeep response, nested attributes like time and extent information are not being properly processed into table columns. This causes KeyError exceptions when trying to access expected columns like '...
diff --git a/sunpy/net/vso/table_response.py b/sunpy/net/vso/table_response.py index 8a70523..0367325 100644 --- a/sunpy/net/vso/table_response.py +++ b/sunpy/net/vso/table_response.py @@ -89,12 +89,6 @@ class VSOQueryResponseTable(QueryResponseTable): unit=waveunit) ...
["sunpy/net/vso/tests/test_vso.py::test_QueryResponse_build_table_with_extent_type", "sunpy/net/vso/tests/test_vso.py::test_QueryResponse_build_table_with_no_start_time", "sunpy/net/vso/tests/test_vso.py::test_QueryResponse_build_table_with_no_end_time"]
["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
7
3
1,670
0
0.6
1
0.75
1
0.301667
81.18
5,452
swe_smith::train::35507
swe_smith
train
35,507
stanfordnlp__dspy.651a4c71.func_pm_ctrl_shuffle__13oo7trf
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# locate_answers function in dspy/dsp/utils/dpr.py fails with NameError ## Description I encountered an issue with the `locate_answers` function in the `dspy/dsp/utils/dpr.py` file. The function is failing because it tries to use variables that are defined after they are referenced. ## Steps to reproduce: 1. Create...
diff --git a/dspy/dsp/utils/dpr.py b/dspy/dsp/utils/dpr.py index 3f95315..2ddf6ec 100644 --- a/dspy/dsp/utils/dpr.py +++ b/dspy/dsp/utils/dpr.py @@ -197,14 +197,12 @@ def has_answer(tokenized_answers, text): def locate_answers(tokenized_answers, text): + tokenized_text = DPR_tokenize(text) + answers_words = ...
["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"]
["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
11
4
1,590
0
0.6
1
0.75
1
0.301667
81.18
5,453
swe_smith::train::51912
swe_smith
train
51,912
pydicom__pydicom.7d361b3d.func_basic__c9duzgts
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
CoderBase validation logic inverted causing wrong exception types and empty plugin returns #### Description The plugin validation logic in `CoderBase` appears to be inverted, causing several issues: 1. When no plugins are available, `_validate_plugins()` returns an empty dict instead of raising appropriate exception...
diff --git a/src/pydicom/pixels/common.py b/src/pydicom/pixels/common.py index 10a4a93..efedd1f 100644 --- a/src/pydicom/pixels/common.py +++ b/src/pydicom/pixels/common.py @@ -215,20 +215,20 @@ class CoderBase: A dict of available {plugin name: decode/encode function} that can be used to deco...
["tests/pixels/test_common.py::TestCoderBase::test_init", "tests/pixels/test_common.py::TestCoderBase::test_validate_plugins", "tests/pixels/test_decoder_base.py::TestDecoder::test_init", "tests/pixels/test_decoder_base.py::TestDecoder::test_buffer", "tests/pixels/test_decoder_base.py::TestDecoder::test_validate_plugin...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
24
12
1,330
0
0.6
1
0.75
1
0.301667
81.18
5,454
r2e_gym::train::5088
r2e_gym
train
5,088
pyramid__ec1ec3f781409f6b0832c0ef11965484220b2c12
pyramid
pylons/pyramid
python
ec1ec3f781409f6b0832c0ef11965484220b2c12
**Title:** `temporary_response` fails to restore `request.response` after exceptions and when original response is `None` **Description:** The `temporary_response` context manager is intended to temporarily remove `request.response` during its block and restore it afterward. However, when an exception is raised withi...
diff --git a/pyramid/renderers.py b/pyramid/renderers.py --- a/pyramid/renderers.py +++ b/pyramid/renderers.py @@ -142,25 +142,22 @@ return result +_marker = object() + @contextlib.contextmanager def temporary_response(request): """ Temporarily delete request.response and restore it afterward. ...
diff --git a/pyramid/tests/test_renderers.py b/pyramid/tests/test_renderers.py --- a/pyramid/tests/test_renderers.py +++ b/pyramid/tests/test_renderers.py @@ -592,6 +592,48 @@ self.assertEqual(result.body, b'{"a": 1}') self.assertFalse('response' in request.__dict__) +class Test_temporary_response(u...
null
null
namanjain12/pyramid_final:ec1ec3f781409f6b0832c0ef11965484220b2c12
true
null
1
23
null
2,062
0
0.75
1
0.6375
1
0.420333
81.17975
5,455
swe_smith::train::21774
swe_smith
train
21,774
life4__textdistance.c3aca916.combine_file__135h75f4
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
External library integration broken - cannot import modules #### Description When trying to use external libraries for text distance calculations, all external library imports are failing with "cannot import" errors. This affects all external library integrations including jellyfish, python-Levenshtein, and others. ...
diff --git a/textdistance/libraries.py b/textdistance/libraries.py index fa24ea6..bd64524 100644 --- a/textdistance/libraries.py +++ b/textdistance/libraries.py @@ -71,11 +71,11 @@ class LibraryBase: attr: str | None = None, conditions: dict[str, bool] | None = None, ) -> None: - self.modu...
["tests/test_external.py::test_compare[DamerauLevenshtein]", "tests/test_external.py::test_compare[Hamming]", "tests/test_external.py::test_compare[Jaro]", "tests/test_external.py::test_compare[JaroWinkler]", "tests/test_external.py::test_compare[Levenshtein]", "tests/test_external.py::test_qval[None-DamerauLevenshtein...
["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
36
30
1,089
0
0.6
1
0.75
1
0.3015
81.1795
5,456
swe_smith::train::11980
swe_smith
train
11,980
andialbrecht__sqlparse.e57923b3.lm_rewrite__scnjth44
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
# SQL parsing fails for certain identifier patterns with periods I'm encountering an issue with SQL parsing when using certain identifier patterns with periods. ``` In [1]: import sqlparse In [2]: sqlparse.parse("SELECT a.b->c FROM table")[0].tokens -------------------------------------------------------------------...
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index a63f4da..1cd8715 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -138,34 +138,25 @@ def group_typed_literal(tlist): def group_period(tlist): + """Group together tokens that are separated by a period.""" ...
["tests/test_grouping.py::test_grouping_identifier_invalid", "tests/test_grouping.py::test_grouping_identifier_invalid_in_middle"]
["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
29
2
1,228
0
0.6
1
0.75
1
0.301333
81.179
5,457
swe_smith::train::1172
swe_smith
train
1,172
jd__tenacity.0d40e76f.lm_rewrite__d09ethos
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
# Exceptions are not properly re-raised when using retry ## Description When using the retry functionality, exceptions are not properly re-raised in certain scenarios. This affects code that relies on catching specific exception types. For example, when using `retry_if_exception_of_type` or similar retry conditions,...
diff --git a/tenacity/__init__.py b/tenacity/__init__.py index 72eba04..79e30a0 100644 --- a/tenacity/__init__.py +++ b/tenacity/__init__.py @@ -393,18 +393,30 @@ class BaseRetrying(ABC): self._add_action_func(self._run_retry) self._add_action_func(self._post_retry_check_actions) - def _post_...
["tests/test_issue_478.py::TestIssue478::test_async", "tests/test_issue_478.py::TestIssue478::test_issue", "tests/test_tenacity.py::TestDecoratorWrapper::test_retry_except_exception_of_type", "tests/test_tenacity.py::TestDecoratorWrapper::test_retry_if_exception_cause_type", "tests/test_tenacity.py::TestDecoratorWrappe...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
36
10
1,088
0
0.6
1
0.75
1
0.301333
81.179
5,458
swe_smith::train::28443
swe_smith
train
28,443
encode__starlette.db5063c2.combine_module__lyi8pk3i
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Debug response returns wrong content type and status code #### Description When using ServerErrorMiddleware with debug=True, the debug response logic is inverted. Requests that accept HTML get plain text responses, and plain text responses return with status code 200 instead of 500. #### Steps/Code to Reproduce ```...
diff --git a/starlette/middleware/errors.py b/starlette/middleware/errors.py index 76ad776..dce79df 100644 --- a/starlette/middleware/errors.py +++ b/starlette/middleware/errors.py @@ -250,11 +250,11 @@ class ServerErrorMiddleware: def debug_response(self, request: Request, exc: Exception) -> Response: ac...
["tests/middleware/test_errors.py::test_debug_text[asyncio]", "tests/middleware/test_errors.py::test_debug_html[asyncio]", "tests/middleware/test_errors.py::test_debug_text[trio]", "tests/middleware/test_errors.py::test_debug_html[trio]", "tests/test_applications.py::test_subdomain_route[asyncio]", "tests/test_applicat...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
2
8
12
1,648
0
0.6
1
0.75
1
0.301333
81.179
5,459
swe_smith::train::1143
swe_smith
train
1,143
jd__tenacity.0d40e76f.func_basic__wx2vx0ly
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
# Incorrect logging in after_log function I've noticed an issue with the `after_log` function in tenacity. The log message is showing incorrect information and causes a recursion error when used. ## Description When using the `after_log` function to log retry attempts, the function is incorrectly formatting the log ...
diff --git a/tenacity/after.py b/tenacity/after.py index aa3cc9d..11cb786 100644 --- a/tenacity/after.py +++ b/tenacity/after.py @@ -37,15 +37,14 @@ def after_log( def log_it(retry_state: "RetryCallState") -> None: if retry_state.fn is None: - # NOTE(sileht): can't really happen, but we must ...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format"]
["tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::TestAsyncio::test_repr", "tests/test_asyncio.py::TestAsyncio::test_retry", "tests/test_asyncio.py::TestAsyncio::test_retry_attributes"...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
9
2
1,628
0
0.6
1
0.75
1
0.301333
81.179
5,460
swe_smith::train::45060
swe_smith
train
45,060
mahmoud__glom.fb3c4e76.lm_rewrite__ekldyxtc
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
# Recursive data structures not properly handled in Assign operation I'm trying to use the `Assign` operation with a recursive data structure, but it's not working correctly. ## Reproduction ```python from glom import glom, Assign, T # Create a recursive data structure val = {} val[1] = [val] # val contains a refe...
diff --git a/glom/core.py b/glom/core.py index cee71a3..4f5ae7d 100644 --- a/glom/core.py +++ b/glom/core.py @@ -2565,21 +2565,31 @@ class _ArgValuator: similar to FILL, but without function calling; useful for default, scope assignment, call/invoke, etc """ - recur = lambda val: scope...
["glom/test/test_mutation.py::test_assign_recursive"]
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
36
1
1,088
0
0.6
1
0.75
1
0.301333
81.179
5,461
swe_smith::train::26586
swe_smith
train
26,586
pylint-dev__astroid.b114f6b5.lm_rewrite__ijrrv0zs
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
[Bug]: File with unknown encoding raises wrong exception type ### Bug summary When trying to build a file with an unknown or wrong encoding, an `AstroidBuildingError` is raised instead of the expected `AstroidSyntaxError`. ### Code for reproduction ```python from astroid import builder # Create a file with invalid...
diff --git a/astroid/builder.py b/astroid/builder.py index b80090b..0e1659e 100644 --- a/astroid/builder.py +++ b/astroid/builder.py @@ -121,29 +121,19 @@ class AstroidBuilder(raw_building.InspectBuilder): error=exc, ) from exc except (SyntaxError, LookupError) as exc: - ...
["tests/test_builder.py::FileBuildTest::test_unknown_encoding"]
["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
26
1
1,287
0
0.6
1
0.75
1
0.301167
81.1785
5,462
swe_smith::train::38012
swe_smith
train
38,012
un33k__python-slugify.872b3750.func_pm_remove_assign__vwi0i7xy
swesmith/un33k__python-slugify.872b3750
un33k/python-slugify
python
null
# Slugify function broken after recent changes ### Steps to reproduce ```python from slugify import slugify # Basic usage text = "Hello World!" result = slugify(text) # Expected: "hello-world" # Actual: UnboundLocalError: local variable 'pattern' referenced before assignment # With unicode text = "C'est déjà l'été"...
diff --git a/slugify/slugify.py b/slugify/slugify.py index 09c7e07..f04cd7d 100644 --- a/slugify/slugify.py +++ b/slugify/slugify.py @@ -108,15 +108,12 @@ def slugify( # user-specific replacements if replacements: for old, new in replacements: - text = text.replace(old, new) + p...
["test_accented_text (__main__.TestSlugifyUnicode)", "allowing unicode shouldn't allow emojis, even in replacements.", "test_html_hexadecimal_on (__main__.TestSlugifyUnicode)", "test_replacements (__main__.TestSlugifyUnicode)"]
["test_affirmative_flags (__main__.TestCommandParams)", "test_defaults (__main__.TestCommandParams)", "test_multivalued_options_with_text (__main__.TestCommandParams)", "test_negative_flags (__main__.TestCommandParams)", "test_replacements_right (__main__.TestCommandParams)", "test_replacements_wrong (__main__.TestComm...
jyangballin/swesmith.x86_64.un33k_1776_python-slugify.872b3750
true
null
1
12
4
1,567
0
0.6
1
0.75
1
0.301167
81.1785
5,463
swe_smith::train::38306
swe_smith
train
38,306
burnash__gspread.a8be3b96.func_pm_ctrl_shuffle__po3e01d9
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
Client.open() method returns Spreadsheet before setting properties #### Description When calling `gc.open(title)` to open a spreadsheet by name, the method returns a Spreadsheet object before properly setting its properties. This causes the returned spreadsheet to have undefined properties and raises `UnboundLocalErr...
diff --git a/gspread/client.py b/gspread/client.py index e82e5be..9938edd 100644 --- a/gspread/client.py +++ b/gspread/client.py @@ -127,6 +127,19 @@ class Client: return files, response def open(self, title: str, folder_id: Optional[str] = None) -> Spreadsheet: + + return Spreadsheet(self.http_c...
["tests/client_test.py::ClientTest::test_no_found_exeption", "tests/client_test.py::ClientTest::test_open_by_name_has_metadata"]
["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
27
2
1,266
0
0.6
1
0.75
1
0.301
81.178
5,464
swe_smith::train::74
swe_smith
train
74
oauthlib__oauthlib.1fd52536.combine_file__el4fvj9g
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Custom validators swapped in grant type initialization #### Description When initializing grant types with custom validators, the validator parameters are being assigned to the wrong variables, causing authorization validators to be treated as token validators and vice versa. #### Steps/Code to Reproduce ```python ...
diff --git a/oauthlib/oauth2/rfc6749/grant_types/base.py b/oauthlib/oauth2/rfc6749/grant_types/base.py index d96a2db..091d01b 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/base.py +++ b/oauthlib/oauth2/rfc6749/grant_types/base.py @@ -93,19 +93,18 @@ class GrantTypeBase: setattr(self, kw, val) def...
["tests/oauth2/rfc6749/grant_types/test_client_credentials.py::ClientCredentialsGrantTest::test_custom_auth_validators_unsupported", "tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::test_custom_auth_validators_unsupported", "tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py...
["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
25
14
1,305
0
0.6
1
0.75
1
0.300833
81.1775
5,465
swe_smith::train::42748
swe_smith
train
42,748
python-jsonschema__jsonschema.93e0caa5.func_pm_remove_assign__5fl75sc1
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
Format validation broken for draft3 and draft4 schemas #### Description Format validation is not working properly for draft3 and draft4 JSON schemas. When validating instances against schemas that use format constraints, the validation passes even when it should fail. #### Steps/Code to Reproduce ```python import j...
diff --git a/jsonschema/_format.py b/jsonschema/_format.py index 789fe4f..38054aa 100644 --- a/jsonschema/_format.py +++ b/jsonschema/_format.py @@ -199,14 +199,13 @@ def _checks_drafts( draft4 = draft4 or name draft6 = draft6 or name draft7 = draft7 or name - draft201909 = draft201909 or name dr...
["jsonschema/tests/test_validators.py::TestDraft3Validator::test_schema_with_invalid_regex", "jsonschema/tests/test_validators.py::TestDraft4Validator::test_schema_with_invalid_regex", "jsonschema/tests/test_validators.py::TestDraft201909Validator::test_schema_with_invalid_regex"]
["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
6
3
1,685
0
0.6
1
0.75
1
0.300833
81.1775
5,466
swe_smith::train::7085
swe_smith
train
7,085
cantools__cantools.0c6a7871.combine_file__vwja293c
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
CAN log parsing fails with incorrect base conversion and timestamp format #### Description When parsing CAN log files, the logreader is incorrectly interpreting hexadecimal frame IDs as decimal/octal numbers and using wrong timestamp formats, causing parsing failures. #### Steps/Code to Reproduce ```python import c...
diff --git a/src/cantools/logreader.py b/src/cantools/logreader.py index 67943e0..5a53751 100644 --- a/src/cantools/logreader.py +++ b/src/cantools/logreader.py @@ -57,12 +57,12 @@ class CandumpDefaultPattern(BasePattern): @staticmethod def unpack(match_object): channel = match_object.group('channel'...
["tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_log_format", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_muxed_data", "tests/test_comman...
["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
13
1,524
0
0.6
1
0.75
1
0.300667
81.177
5,467
swe_smith::train::18201
swe_smith
train
18,201
msiemens__tinydb.10644a0e.combine_file__szhnxhbk
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
# Middleware initialization is broken in TinyDB ## Description There's an issue with the initialization of middleware classes in TinyDB. When creating a database with a middleware, the storage class is immediately instantiated during middleware initialization instead of being stored for later use. This causes severa...
diff --git a/tinydb/middlewares.py b/tinydb/middlewares.py index 7973012..3f01413 100644 --- a/tinydb/middlewares.py +++ b/tinydb/middlewares.py @@ -19,8 +19,8 @@ class Middleware: """ def __init__(self, storage_cls) -> None: - self._storage_cls = storage_cls - self.storage: Storage = None # ...
["tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_nested", "tests/test_middlewares.py::test_caching_json_write", "tests/test_tinydb.py::test_empty_write", "tests/test_tinydb.py::test_access_storage"]
["tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_delete[json]", "tests/test_operations.py::test_add_int[memory]", "tests/test_operations.py::test_add_int[json]", "tests/test_operations.py::test_add_str[memory]", "tests/test_operations.py::test_add_str[json]", "tests/test_operations.py::...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
13
5
1,544
0
0.6
1
0.75
1
0.300667
81.177
5,468
swe_bench::test::1504
swe_bench
test
1,504
scikit-learn__scikit-learn-10471
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
52aaf8269235d4965022b8ec970243bdcb59c9a7
KMeans optimisation for array C/F contiguity (was: Make sure that the output of PCA.fit_transform is C contiguous) otherwise, I would rather use: ``` Python pca.fit(X) X_new = pca.transform(X) ``` Because of FORTRAN data for inner product is very slow. (for example, in the KMeans)
Can you give an example? Maybe we should then rather change the behavior in KMeans. I wouldn't change the output format, since we don't know what the user wants to do next. They should be the same that the output and input format of PCA.fit_transform, isn't it? Because PCA.transform is such. In _k_means._assign_label...
diff --git a/sklearn/cluster/k_means_.py b/sklearn/cluster/k_means_.py --- a/sklearn/cluster/k_means_.py +++ b/sklearn/cluster/k_means_.py @@ -22,6 +22,7 @@ from ..utils.extmath import row_norms, squared_norm, stable_cumsum from ..utils.sparsefuncs_fast import assign_rows_csr from ..utils.sparsefuncs import mean_var...
diff --git a/sklearn/cluster/tests/test_k_means.py b/sklearn/cluster/tests/test_k_means.py --- a/sklearn/cluster/tests/test_k_means.py +++ b/sklearn/cluster/tests/test_k_means.py @@ -169,7 +169,8 @@ def _check_fitted_model(km): assert_greater(km.inertia_, 0.0) # check error on dataset being too small - a...
["sklearn/cluster/tests/test_k_means.py::test_mb_k_means_plus_plus_init_dense_array", "sklearn/cluster/tests/test_k_means.py::test_mb_k_means_plus_plus_init_sparse_matrix", "sklearn/cluster/tests/test_k_means.py::test_minibatch_k_means_random_init_dense_array", "sklearn/cluster/tests/test_k_means.py::test_minibatch_k_m...
["sklearn/cluster/tests/test_k_means.py::test_elkan_results", "sklearn/cluster/tests/test_k_means.py::test_labels_assignment_and_inertia", "sklearn/cluster/tests/test_k_means.py::test_minibatch_update_consistency", "sklearn/cluster/tests/test_k_means.py::test_k_means_plus_plus_init", "sklearn/cluster/tests/test_k_means...
null
true
2018-01-14T11:20:46Z
1
66
11
283
0
0.8
1
0.55
1
0.267167
81.1765
5,469
swe_smith::train::33232
swe_smith
train
33,232
django-money__django-money.835c1ab8.func_pm_class_rm_funcs__mj51j2w4
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
# Division by Money and modulo operations not working correctly I've encountered an issue with the `Money` class in django-money. After a recent update, I'm unable to perform certain operations with Money objects that used to work before. ## Issue Description When trying to divide a number by a Money instance or per...
diff --git a/djmoney/money.py b/djmoney/money.py index 51c436b..bc67644 100644 --- a/djmoney/money.py +++ b/djmoney/money.py @@ -80,11 +80,6 @@ class Money(DefaultMoney): self._copy_attributes(other, result) return result - def __rtruediv__(self, other): - # Backported from py-moneyed,...
["tests/test_money.py::test_keep_decimal_places[<lambda>10-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>10-4]"]
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
1
11
2
1,583
0
0.6
1
0.75
1
0.3005
81.1765
5,470
swe_smith::train::23511
swe_smith
train
23,511
pyparsing__pyparsing.533adf47.func_basic__az7126ma
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
SkipTo parser returns wrong tuple order and incorrect results #### Description The SkipTo parser is returning results in the wrong order and producing incorrect parsing behavior. When using SkipTo with various configurations, the parser returns a tuple with swapped positions and incorrect content. #### Steps/Code to...
diff --git a/pyparsing/core.py b/pyparsing/core.py index 777165c..11089c8 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -5440,46 +5440,42 @@ class SkipTo(ParseElementEnhance): tmploc = loc while tmploc <= instrlen: if self_failOn_canParseNext is not None: - # br...
["examples/test_bibparse.py::TestBibparse::test_bib1", "tests/test_unit.py::Test02_WithoutPackrat::testLineAndStringEnd", "tests/test_unit.py::Test02_WithoutPackrat::testParseEBNF", "tests/test_unit.py::Test02_WithoutPackrat::testSkipToIgnoreExpr2", "tests/test_unit.py::Test02_WithoutPackrat::testSkipToParserTests", "t...
["examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse::test_names", "examples/test_bibparse.py::TestBibpars...
jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47
true
null
1
24
31
1,323
0
0.6
1
0.75
1
0.3005
81.1765
5,471
swe_smith::train::51424
swe_smith
train
51,424
spulec__freezegun.5f171db0.func_pm_remove_wrapper__s7fminim
swesmith/spulec__freezegun.5f171db0
spulec/freezegun
python
null
# Freezegun fails to properly restore modules imported after freezing time ## Description I've encountered an issue with freezegun where modules imported after freezing time are not properly restored when the freeze context ends. This causes errors when trying to access attributes that should be available. ## How to...
diff --git a/freezegun/api.py b/freezegun/api.py index d235292..e4fbc7a 100644 --- a/freezegun/api.py +++ b/freezegun/api.py @@ -835,11 +835,6 @@ class _freeze_time: if module_attribute in self.fake_names: continue - try: - ...
["tests/test_asyncio.py::test_datetime_in_coroutine", "tests/test_class_import.py::test_import_after_start", "tests/test_warnings.py::test_ignore_warnings_in_stop"]
["tests/test_asyncio.py::test_freezing_time_in_coroutine", "tests/test_asyncio.py::test_freezing_time_before_running_coroutine", "tests/test_asyncio.py::test_asyncio_sleeping_not_affected_by_freeze_time", "tests/test_asyncio.py::test_asyncio_to_call_later_with_frozen_time", "tests/test_class_import.py::test_import_date...
jyangballin/swesmith.x86_64.spulec_1776_freezegun.5f171db0
true
null
1
8
3
1,643
0
0.6
1
0.75
1
0.3005
81.1765
5,472
swe_smith::train::24507
swe_smith
train
24,507
sunpy__sunpy.f8edfd5c.combine_module__i1tr5b46
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Regression in VSO client: Wavelength handling and connection validation issues I've found a couple of issues with the VSO client in the latest version: ## Issue 1: Wavelength handling is broken in QueryResponse When using the VSO client to query data with wavelength information, the wavelength values are not being...
diff --git a/sunpy/net/vso/legacy_response.py b/sunpy/net/vso/legacy_response.py index ff54c6a..3c403a2 100644 --- a/sunpy/net/vso/legacy_response.py +++ b/sunpy/net/vso/legacy_response.py @@ -102,6 +102,8 @@ class QueryResponse(BaseQueryResponse): record_items['Type'].append('N/A') # If w...
["sunpy/net/vso/tests/test_vso.py::test_build_client", "sunpy/net/vso/tests/test_vso.py::test_build_client_params", "sunpy/net/vso/tests/test_vso.py::test_response_block_properties_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
2
17
3
1,463
0
0.6
1
0.75
1
0.3005
81.1765
5,473
r2e_gym::train::4407
r2e_gym
train
4,407
numpy__76f0eafbaba73815710612bddf4bf6eef682965d
numpy
numpy/numpy
python
76f0eafbaba73815710612bddf4bf6eef682965d
**Title:** `np.linalg.cond` Raises `LinAlgError` Instead of Returning `inf` or `NaN` for Singular or NaN-containing Matrices **Description:** When calculating the condition number of a matrix using `np.linalg.cond`, the function is expected to return `inf` for singular matrices and propagate `NaN` values if the matrix...
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -24,7 +24,7 @@ add, multiply, sqrt, maximum, fastCopyAndTranspose, sum, isfinite, size, finfo, errstate, geterrobj, longdouble, moveaxis, amin, amax, product, abs, broadcast, atleast_...
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py --- a/numpy/linalg/tests/test_linalg.py +++ b/numpy/linalg/tests/test_linalg.py @@ -671,45 +671,112 @@ assert_raises(linalg.LinAlgError, linalg.svd, a) -class TestCondSVD(LinalgSquareTestCase, LinalgGeneralizedSquareTestCase...
null
null
namanjain12/numpy_final:76f0eafbaba73815710612bddf4bf6eef682965d
true
null
1
37
null
1,775
0
0.75
1
0.6375
1
0.419167
81.17625
5,474
swe_smith::train::3534
swe_smith
train
3,534
pygments__pygments.27649ebb.combine_file__w59g3rt8
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
PostgreSQL lexer fails with AttributeError when processing certain SQL content #### Description The PostgreSQL lexer is throwing an `AttributeError: 'reversed' object has no attribute '__getitem__'` when processing SQL content. This appears to be related to the `lookahead` class implementation in the SQL lexer module...
diff --git a/pygments/lexers/sql.py b/pygments/lexers/sql.py index 9016538..1d7ab9a 100644 --- a/pygments/lexers/sql.py +++ b/pygments/lexers/sql.py @@ -90,28 +90,27 @@ def language_callback(lexer, match): lx = lexer._get_lexer(m.group(1)) else: m = list(language_re.finditer( - lexer.t...
["tests/test_basic_api.py::test_random_input[PostgresConsoleLexer]", "tests/test_basic_api.py::test_lexer_options[PostgresConsoleLexer]", "tests/examplefiles/postgresql/postgresql_test.txt::", "tests/examplefiles/psql/psql_session.txt::"]
["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
31
4
1,182
0
0.6
1
0.75
1
0.300333
81.176
5,475
swe_smith::train::33288
swe_smith
train
33,288
django-money__django-money.835c1ab8.lm_rewrite__r1g7i8ym
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
# MoneyField validation fails for certain tuple values Hi everyone, I've discovered a bug in the validation logic for MoneyField. When trying to create a model with certain tuple values for a MoneyField, the validation doesn't work as expected. ## Reproduction steps: ```python from myapp.models import BaseModel # ...
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index dc5f6ad..678724f 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -67,9 +67,28 @@ def validate_money_value(value): - Money instances - Pairs of numeric value and currency. Currency can't be None. """ - if...
["tests/test_models.py::TestVanillaMoneyField::test_invalid_values[value0]", "tests/test_models.py::TestVanillaMoneyField::test_invalid_values[value2]", "tests/test_models.py::TestExpressions::test_value_create_invalid"]
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
1
23
3
1,342
0
0.6
1
0.75
1
0.300333
81.176
5,476
swe_smith::train::45170
swe_smith
train
45,170
modin-project__modin.8c7799fd.func_pm_remove_cond__sslagfmo
swesmith/modin-project__modin.8c7799fd
modin-project/modin
python
null
# sum() function broken for arrays with None axis parameter ## Description The `sum()` method in the `array` class is broken when the `axis` parameter is set to `None`. This happens because a large chunk of code that handles this case has been removed. ## Reproduction ```python import numpy as np import modin.numpy...
diff --git a/modin/numpy/arr.py b/modin/numpy/arr.py index ab40eca..3586d7b 100644 --- a/modin/numpy/arr.py +++ b/modin/numpy/arr.py @@ -1989,8 +1989,6 @@ class array(object): if apply_axis == 1: raise numpy.AxisError(1, 1) target = where.where(self, 0) if isinstance(where, ar...
["modin/tests/numpy/test_array.py::test_array_function[size1]", "modin/tests/numpy/test_array.py::test_array_function[size2]", "modin/tests/numpy/test_array.py::test_array_function[size3]", "modin/tests/numpy/test_array.py::test_array_function[size4]", "modin/tests/numpy/test_array_axis_functions.py::test_sum"]
["modin/tests/numpy/test_array.py::test_shape[100]", "modin/tests/numpy/test_array.py::test_shape[size1]", "modin/tests/numpy/test_array.py::test_shape[size2]", "modin/tests/numpy/test_array.py::test_shape[size3]", "modin/tests/numpy/test_array.py::test_shape[size4]", "modin/tests/numpy/test_array.py::test_dtype", "mod...
jyangballin/swesmith.x86_64.modin-project_1776_modin.8c7799fd
true
null
1
38
5
1,042
0
0.6
1
0.75
1
0.300333
81.176
5,477
swe_smith::train::48364
swe_smith
train
48,364
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__dj4f4wyn
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
PythonTemplater crashes with UnboundLocalError on variable references #### Description The Python templater is throwing `UnboundLocalError` when processing SQL templates with variable substitutions. This appears to be affecting basic templating functionality where variables are referenced before assignment in the tem...
diff --git a/src/sqlfluff/core/templaters/python.py b/src/sqlfluff/core/templaters/python.py index a2126a8..46b99b6 100644 --- a/src/sqlfluff/core/templaters/python.py +++ b/src/sqlfluff/core/templaters/python.py @@ -702,7 +702,6 @@ class PythonTemplater(RawTemplater): # Yield anything simple ...
["test/core/templaters/python_test.py::test__templater_python", "test/core/templaters/python_test.py::test__templater_python_split_uniques_coalesce_rest[split_file1-raw_occurrences1-templated_occurrences1-foo-result1]", "test/core/templaters/python_test.py::test__templater_python_slice_file[foo-foo-True-result1]", "tes...
["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
29
4
1,220
0
0.6
1
0.75
1
0.3
81.175
5,478
swe_smith::train::49024
swe_smith
train
49,024
facebookresearch__hydra.0f03eb60.lm_rewrite__whnd53dz
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
Override Error with Invalid Package in Defaults List Description When attempting to override a package in the defaults list using an invalid package name, the system raises a ConfigCompositionException. This occurs when the specified override does not match any existing config group, leading to an error message indic...
diff --git a/hydra/_internal/defaults_list.py b/hydra/_internal/defaults_list.py index d3bcb51..9234a85 100644 --- a/hydra/_internal/defaults_list.py +++ b/hydra/_internal/defaults_list.py @@ -134,39 +134,19 @@ class Overrides: default.config_name_overridden = True self.override_metadata[key]....
["tests/defaults_list/test_defaults_list.py::test_group_default_pkg1[option_override:group_default_pkg1:bad_package_in_override]"]
["tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[empty]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[one_item]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[self_leading]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[se...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
42
1
960
0
0.6
1
0.75
1
0.3
81.175
5,479
swe_smith::train::2987
swe_smith
train
2,987
Suor__funcy.207a7810.combine_file__fkcvx1dp
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Curry and compose functions are broken in latest version ## Description I've been using the `curry` and `compose` functions in my code, but after updating to the latest version, they're not working correctly anymore. The `curry` function seems to be returning incorrect results and the `compose` function is complet...
diff --git a/funcy/funcs.py b/funcy/funcs.py index 0a235bb..472bd8a 100644 --- a/funcy/funcs.py +++ b/funcy/funcs.py @@ -42,14 +42,14 @@ def rpartial(func, *args, **kwargs): def curry(func, n=EMPTY): """Curries func into a chain of one argument functions.""" if n is EMPTY: - n = get_spec(func).max_n +...
["tests/test_funcs.py::test_curry", "tests/test_funcs.py::test_curry_funcy", "tests/test_funcs.py::test_compose", "tests/test_funcs.py::test_rcompose"]
["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_cal...
jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810
true
null
1
18
4
1,440
0
0.6
1
0.75
1
0.3
81.175
5,480
swe_smith::train::32765
swe_smith
train
32,765
pydantic__pydantic.acb0f10f.lm_rewrite__6o9eky0x
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
resolve_ref_schema fails to handle definition-ref schemas properly #### Description When using custom `__get_pydantic_core_schema__` methods that call `handler.resolve_ref_schema()`, the method fails to properly resolve `definition-ref` type schemas. The current implementation looks for a `ref` key instead of checkin...
diff --git a/pydantic/_internal/_schema_generation_shared.py b/pydantic/_internal/_schema_generation_shared.py index b231a82..5f41661 100644 --- a/pydantic/_internal/_schema_generation_shared.py +++ b/pydantic/_internal/_schema_generation_shared.py @@ -99,7 +99,8 @@ class CallbackGetCoreSchemaHandler(GetCoreSchemaHandl...
["tests/test_json_schema.py::test_namedtuple_modify_schema", "tests/test_main.py::test_get_core_schema_unpacks_refs_for_source_type", "tests/test_main.py::test_get_core_schema_return_new_ref", "tests/test_main.py::test_resolve_def_schema_from_core_schema", "tests/test_types.py::test_enum_custom_schema", "tests/test_typ...
["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
26
6
1,279
0
0.6
1
0.75
1
0.299833
81.1745
5,481
swe_smith::train::118
swe_smith
train
118
oauthlib__oauthlib.1fd52536.combine_file__pay2hsd1
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OpenID Connect claims parameter handling broken with malformed JSON #### Description When using OpenID Connect with a malformed claims parameter, the library now silently sets claims to an empty dict instead of raising an InvalidRequestError as specified in the OpenID Connect specification. #### Steps/Code to Reprod...
diff --git a/oauthlib/openid/connect/core/grant_types/base.py b/oauthlib/openid/connect/core/grant_types/base.py index 29d583e..63e82a1 100644 --- a/oauthlib/openid/connect/core/grant_types/base.py +++ b/oauthlib/openid/connect/core/grant_types/base.py @@ -34,16 +34,11 @@ class GrantTypeBase: return self.proxy...
["tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_invalid_claims", "tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py::OpenIDConnectEndpointTest::test_prompt_none_exclusiveness", "tests/openid/connect/core/grant_types/test_authorization_code.py::OpenIDAuthC...
["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
31
21
1,179
0
0.6
1
0.75
1
0.299833
81.1745
5,482
swe_smith::train::10308
swe_smith
train
10,308
paramiko__paramiko.23f92003.func_basic__4vfdy5mw
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH connection fails with sequence number rollover during initial key exchange #### Description SSH connections are failing unexpectedly during the initial key exchange phase. The connection terminates with a "Sequence number rolled over during initial kex!" error, even when the sequence number hasn't actually rolled...
diff --git a/paramiko/packet.py b/paramiko/packet.py index f1de4b0..e684629 100644 --- a/paramiko/packet.py +++ b/paramiko/packet.py @@ -415,20 +415,19 @@ class Packetizer: """ Write a block of data using the current cipher, as an SSH block. """ - # encrypt this sucka data = d...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::AuthHandler_::interactive_auth", "tests/auth.py::AuthHandler_::interactive_fallback", "tests/auth.py::AuthHandler_::utf8", "tests/auth.py::AuthHandler_::non_utf8", "...
["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
25
128
1,299
0
0.6
1
0.75
1
0.299833
81.1745
5,483
swe_smith::train::2954
swe_smith
train
2,954
madzak__python-json-logger.5f85723f.func_pm_remove_cond__vy5nnsfk
swesmith/madzak__python-json-logger.5f85723f
madzak/python-json-logger
python
null
# JsonEncoder fails to handle datetime, date, time, and exception objects ### Describe the bug The `JsonEncoder` class in `pythonjsonlogger` is no longer properly handling special Python objects like datetime, date, time, and exceptions. When trying to log messages containing these types of objects, they are not bein...
diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py index 519a64d..e20c435 100644 --- a/src/pythonjsonlogger/jsonlogger.py +++ b/src/pythonjsonlogger/jsonlogger.py @@ -76,14 +76,6 @@ class JsonEncoder(json.JSONEncoder): """ def default(self, obj): - if isinstance(obj,...
["tests/test_jsonlogger.py::TestJsonLogger::test_json_default_encoder", "tests/test_jsonlogger.py::TestJsonLogger::test_json_default_encoder_with_timestamp"]
["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg...
jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f
true
null
1
9
2
1,619
0
0.6
1
0.75
1
0.299833
81.1745
5,484
swe_smith::train::23323
swe_smith
train
23,323
adrienverge__yamllint.8513d9b9.lm_rewrite__hhduo7lm
swesmith/adrienverge__yamllint.8513d9b9
adrienverge/yamllint
python
null
# ValueError when using non-existent rule ID ## Description When trying to use a rule that doesn't exist in yamllint, the application doesn't properly handle the error. Instead of providing a helpful error message, it fails with an unhandled exception. ## To Reproduce Create a config file with a non-existent rule: ...
diff --git a/yamllint/rules/__init__.py b/yamllint/rules/__init__.py index 815d4bc..e591a08 100644 --- a/yamllint/rules/__init__.py +++ b/yamllint/rules/__init__.py @@ -67,7 +67,9 @@ _RULES = { def get(id): - if id not in _RULES: - raise ValueError(f'no such rule: "{id}"') + """Get a rule module by id...
["tests/test_cli.py::CommandLineTestCase::test_run_with_bad_config", "tests/test_config.py::SimpleConfigTestCase::test_unknown_rule"]
["tests/rules/test_anchors.py::AnchorsTestCase::test_disabled", "tests/rules/test_anchors.py::AnchorsTestCase::test_forbid_duplicated_anchors", "tests/rules/test_anchors.py::AnchorsTestCase::test_forbid_undeclared_aliases", "tests/rules/test_anchors.py::AnchorsTestCase::test_forbid_unused_anchors", "tests/rules/test_br...
jyangballin/swesmith.x86_64.adrienverge_1776_yamllint.8513d9b9
true
null
1
8
2
1,639
0
0.6
1
0.75
1
0.299833
81.1745
5,485
swe_bench::test::84
swe_bench
test
84
astropy__astropy-7973
astropy/astropy
astropy/astropy
python
4fc9f31af6c5659c3a59b66a387894c12203c946
Record data size in the WCS object It is clear that there are practical reasons to have a record of the original data size in the WCS object. This in the past has been recorded in public attributes `naxis1` and `naxis2` and subsequently in the private `_naxis1` and `_naxis2`. There's along thread on why this should ...
I support #1 of the two choices for reasons I mentioned in #5454. In addition I want to mention that we already deviated from the FITS standard by adding the `d2im` distortion. :+1: for solution 1, for the reasons explained by @nden in https://github.com/astropy/astropy/pull/5411#issuecomment-258138938 hm, I'm sure ...
diff --git a/astropy/wcs/wcs.py b/astropy/wcs/wcs.py --- a/astropy/wcs/wcs.py +++ b/astropy/wcs/wcs.py @@ -72,6 +72,10 @@ __doctest_skip__ = ['WCS.all_world2pix'] +NAXIS_DEPRECATE_MESSAGE = """ +Private attributes "_naxis1" and "naxis2" have been deprecated since v3.1. +Instead use the "pixel_shape" property which...
diff --git a/astropy/wcs/tests/test_wcs.py b/astropy/wcs/tests/test_wcs.py --- a/astropy/wcs/tests/test_wcs.py +++ b/astropy/wcs/tests/test_wcs.py @@ -17,6 +17,7 @@ from ...utils.data import ( get_pkg_data_filenames, get_pkg_data_contents, get_pkg_data_filename) from ...utils.misc import NumpyRNGContext +from .....
["astropy/wcs/tests/test_wcs.py::test_footprint_to_file"]
["astropy/wcs/tests/test_wcs.py::TestMaps::test_consistency", "astropy/wcs/tests/test_wcs.py::TestMaps::test_maps", "astropy/wcs/tests/test_wcs.py::TestSpectra::test_consistency", "astropy/wcs/tests/test_wcs.py::TestSpectra::test_spectra", "astropy/wcs/tests/test_wcs.py::test_fixes", "astropy/wcs/tests/test_wcs.py::tes...
null
true
2018-10-25T22:33:11Z
1
19
1
1,219
0
0.8
1
0.55
1
0.2665
81.1745
5,486
swe_smith::train::2651
swe_smith
train
2,651
cknd__stackprinter.219fcc52.combine_file__5zghcl1w
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
# Stackprinter breaks when formatting frames I'm trying to use stackprinter to format stack traces, but I'm running into an issue where it fails with an UnboundLocalError. ## Reproduction Here's a simple script that reproduces the issue: ```python import stackprinter def some_function(): # This will cause an e...
diff --git a/stackprinter/frame_formatting.py b/stackprinter/frame_formatting.py index 136920e..ad920ab 100644 --- a/stackprinter/frame_formatting.py +++ b/stackprinter/frame_formatting.py @@ -134,9 +134,6 @@ class FrameFormatter(): raise def _format_frame(self, fi): - msg = self.headline_tpl...
["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting"]
["tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
true
null
1
28
2
1,239
0
0.6
1
0.75
1
0.299833
81.1745
5,487
swe_smith::train::38388
swe_smith
train
38,388
dbader__schedule.82a43db1.func_basic__9b5xexja
swesmith/dbader__schedule.82a43db1
dbader/schedule
python
null
Timezone localization fails with "Not naive datetime" error #### Description When scheduling jobs with timezone support, the scheduler raises a `ValueError: Not naive datetime` error. This appears to be related to how datetime objects are being processed when timezone information is present. #### Steps/Code to Repro...
diff --git a/schedule/__init__.py b/schedule/__init__.py index 8e12eeb..b40f50d 100644 --- a/schedule/__init__.py +++ b/schedule/__init__.py @@ -780,40 +780,22 @@ class Job: """ if self.at_time_zone is None: return moment - # Normalize corrects the utc-offset to match the timezone ...
["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_with_dst_fold", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold_fixate_1", "test_schedule.py:...
["test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_at_time", "test_schedule.py::SchedulerTests::test_at_time_hour", "test_schedule.py::SchedulerTests::test_at_time_minute", "test_schedule.py::SchedulerTests::test_cancel_job", "test_schedule.py::SchedulerTests...
jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1
true
null
1
34
39
1,118
0
0.6
1
0.75
1
0.299667
81.174
5,488
swe_smith::train::7986
swe_smith
train
7,986
cantools__cantools.0c6a7871.func_pm_ctrl_shuffle__wccxxit5
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
SYM file parsing fails with "local variable 'name' referenced before assignment" #### Description When loading SYM files, the parser fails with an UnboundLocalError indicating that the local variable 'name' is referenced before assignment. This affects all SYM file operations including loading, converting, and genera...
diff --git a/src/cantools/database/can/formats/sym.py b/src/cantools/database/can/formats/sym.py index 4bdc121..d27c9d2 100644 --- a/src/cantools/database/can/formats/sym.py +++ b/src/cantools/database/can/formats/sym.py @@ -664,25 +664,6 @@ def _load_message(frame_id, strict, sort...
["tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_sym", "tests/test_convert.py::CanToolsConvertFullTest::test_sym_to_dbc__compare_databases", "tests/test_convert.py::CanToolsConvertFullTest::test_sym_to_dbc__compare_files", "tests/test_database.py::CanToolsDatabaseTest::test_big_endian", "te...
["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
37
24
1,058
0
0.6
1
0.75
1
0.299667
81.174
5,489
swe_smith::train::26596
swe_smith
train
26,596
pylint-dev__astroid.b114f6b5.lm_rewrite__l54n4duk
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
### Attribute String Conversion Fails with Recursion Error #### What happened? After the recent changes, converting certain attribute nodes to strings using the `AsStringVisitor` class results in a recursion error. This seems to occur when the attribute's expression is deeply nested or complex, leading to an infinite...
diff --git a/astroid/nodes/as_string.py b/astroid/nodes/as_string.py index d063350..16e2b33 100644 --- a/astroid/nodes/as_string.py +++ b/astroid/nodes/as_string.py @@ -365,23 +365,10 @@ class AsStringVisitor: node.elt.accept(self), " ".join(n.accept(self) for n in node.generators) ) - def vi...
["tests/test_nodes.py::AsStringTest::test_int_attribute", "tests/test_nodes.py::AsStringTest::test_recursion_error_trapped"]
["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
19
2
1,418
0
0.6
1
0.75
1
0.299667
81.174
5,490
swe_smith::train::33934
swe_smith
train
33,934
pallets__click.fde47b4b.lm_rewrite__xvtk49bf
swesmith/pallets__click.fde47b4b
pallets/click
python
null
# Path type conversion doesn't work correctly with bytes or PathLike objects ## Description I found an issue with the `click.Path` type when using the `path_type` parameter. When setting `path_type=bytes` or `path_type=pathlib.Path`, the conversion doesn't work correctly. ## Steps to Reproduce Here's a simple examp...
diff --git a/src/click/types.py b/src/click/types.py index 354c7e3..9728384 100644 --- a/src/click/types.py +++ b/src/click/types.py @@ -854,19 +854,14 @@ class Path(ParamType): ) return info_dict - def coerce_path_result( - self, value: str | os.PathLike[str] - ) -> str | bytes | os.Pa...
["tests/test_types.py::test_path_type[bytes-a/b/c.txt]"]
["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
19
1
1,418
0
0.6
1
0.75
1
0.299667
81.174
5,491
swe_smith::train::48727
swe_smith
train
48,727
facebookresearch__hydra.0f03eb60.combine_module__vd3prdit
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
Override parser fails with assertion error on simple key overrides #### Description When parsing simple key overrides without package specification, the override parser crashes with an assertion error. This affects basic configuration overrides that should work normally. #### Steps/Code to Reproduce ```python from ...
diff --git a/hydra/core/override_parser/overrides_visitor.py b/hydra/core/override_parser/overrides_visitor.py index b8540e6..96b99b1 100644 --- a/hydra/core/override_parser/overrides_visitor.py +++ b/hydra/core/override_parser/overrides_visitor.py @@ -60,16 +60,15 @@ class HydraOverrideVisitor(OverrideParserVisitor): ...
["tests/defaults_list/test_defaults_list.py::test_include_nested_group_pkg2[option_override:include_nested_group_pkg2]", "tests/defaults_list/test_defaults_list.py::test_group_default_pkg1[option_override:group_default_pkg1]", "tests/defaults_list/test_defaults_list.py::test_group_default_pkg1[option_override:group_def...
["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
2
39
104
1,018
0
0.6
1
0.75
1
0.299667
81.174
5,492
swe_smith::train::2571
swe_smith
train
2,571
pdfminer__pdfminer.six.1a8bd2f7.func_pm_remove_loop__sfegxsfb
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFDocument initialization fails when catalog is not found When processing PDF files, the PDFDocument class fails to properly initialize when it cannot find a catalog in the trailer. The initialization process appears to skip essential steps for setting up document properties like encryption info, document info, and c...
diff --git a/pdfminer/pdfdocument.py b/pdfminer/pdfdocument.py index 1c06335..cae1c29 100644 --- a/pdfminer/pdfdocument.py +++ b/pdfminer/pdfdocument.py @@ -712,34 +712,9 @@ class PDFDocument: newxref = PDFXRefFallback() newxref.load(parser) self.xrefs.append(newxref) ...
["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_625_identity_cmap", "tests/test_highlevel_extracttext.py::TestExtractText::test_simple4_with_file", "tests/test_highlevel_extracttext.py::TestExtractText::test_simple4_with_string", "tests/test_highlevel_extracttext.py::TestExtractPages::test_line_margi...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
25
14
1,297
0
0.6
1
0.75
1
0.2995
81.1735
5,493
swe_smith::train::23417
swe_smith
train
23,417
pyparsing__pyparsing.533adf47.combine_file__wx6190f8
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
`match_only_at_col` and `with_attribute` parse actions not working correctly #### Description The `match_only_at_col` and `with_attribute` parse actions are not functioning as expected. The column matching logic appears to be inverted, and the attribute validation is failing when it should pass. #### Steps/Code to R...
diff --git a/pyparsing/actions.py b/pyparsing/actions.py index b584048..43b87bd 100644 --- a/pyparsing/actions.py +++ b/pyparsing/actions.py @@ -50,7 +50,7 @@ def match_only_at_col(n: int) -> ParseAction: """ def verify_col(strg: str, locn: int, toks: ParseResults) -> None: - if col(locn, strg) != n:...
["tests/test_unit.py::Test02_WithoutPackrat::testMatchOnlyAtColErr", "tests/test_unit.py::Test02_WithoutPackrat::testWithAttributeParseAction", "tests/test_unit.py::Test04_WithPackrat::testMatchOnlyAtColErr", "tests/test_unit.py::Test04_WithPackrat::testWithAttributeParseAction", "tests/test_unit.py::Test06_WithBounded...
["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse...
jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47
true
null
1
17
12
1,457
0
0.6
1
0.75
1
0.2995
81.1735
5,494
swe_smith::train::42863
swe_smith
train
42,863
python-jsonschema__jsonschema.93e0caa5.pr_1208
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
Enum validation issue with boolean-like integers ### Description It seems there's an issue with the `enum` keyword validation when dealing with boolean-like integers (0 and 1). The validation incorrectly treats these integers as equivalent to their boolean counterparts (`False` and `True`), leading to unexpected vali...
diff --git a/jsonschema/_keywords.py b/jsonschema/_keywords.py index f30f954..d734810 100644 --- a/jsonschema/_keywords.py +++ b/jsonschema/_keywords.py @@ -8,6 +8,7 @@ from jsonschema._utils import ( find_additional_properties, find_evaluated_item_indexes_by_schema, find_evaluated_property_keys_by_schem...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_enum_enum_with_0_does_not_match_false___false_is_invalid", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_enum_enum_with_1_does_not_match_true___true_is_invalid", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_enum_...
["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
30
1,657
0
0.6
1
0.75
1
0.2995
81.1735
5,495
swe_smith::train::47251
swe_smith
train
47,251
python-trio__trio.cfbbe2c1.lm_rewrite__6y3hq768
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
# MockClock rate validation is missing When setting a negative rate on MockClock, the validation check is not working properly. ## Description I'm trying to set a negative rate on a MockClock instance, but it's not raising the expected ValueError. According to the documentation, the rate should be >= 0. ```python f...
diff --git a/src/trio/_core/_mock_clock.py b/src/trio/_core/_mock_clock.py index 7e85df2..63802f0 100644 --- a/src/trio/_core/_mock_clock.py +++ b/src/trio/_core/_mock_clock.py @@ -86,16 +86,20 @@ class MockClock(Clock): return self._rate @rate.setter - def rate(self, new_rate: float) -> None: - ...
["src/trio/_core/_tests/test_mock_clock.py::test_mock_clock"]
["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
24
1
1,317
0
0.6
1
0.75
1
0.2995
81.1735
5,496
swe_smith::train::10222
swe_smith
train
10,222
paramiko__paramiko.23f92003.combine_file__yeahfzmk
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP file operations fail with AttributeError after recent changes #### Description SFTP operations are broken and throwing `AttributeError: 'int' object has no attribute 'close'` when trying to perform basic file operations like opening, writing, or reading files. #### Steps/Code to Reproduce ```python import para...
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 066cd83..ae4328e 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -358,20 +358,18 @@ class SFTPClient(BaseSFTP, ClosingContextManager): filename = self._adjust_cwd(filename) self._log(DEBUG, "open({!r}, {!r})".fo...
["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_close", "tests/test_sftp.py::TestSFTP::test_sftp_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test...
["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
41
45
977
0
0.6
1
0.75
1
0.2995
81.1735
5,497
swe_smith::train::37
swe_smith
train
37
oauthlib__oauthlib.1fd52536.combine_file__8424hlua
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RequestValidator methods silently fail instead of raising NotImplementedError #### Description The OpenID Connect RequestValidator base class methods are supposed to raise NotImplementedError to force subclasses to implement them, but some methods are now returning default values instead. This breaks the contract and...
diff --git a/oauthlib/openid/connect/core/request_validator.py b/oauthlib/openid/connect/core/request_validator.py index e3cea79..234cdd4 100644 --- a/oauthlib/openid/connect/core/request_validator.py +++ b/oauthlib/openid/connect/core/request_validator.py @@ -75,7 +75,7 @@ class RequestValidator(OAuth2RequestValidator...
["tests/openid/connect/core/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
11
1
1,577
0
0.6
1
0.75
1
0.2995
81.1735
5,498
swe_smith::train::38168
swe_smith
train
38,168
john-kurkowski__tldextract.3d1bf184.combine_file__a8cw58y5
swesmith/john-kurkowski__tldextract.3d1bf184
john-kurkowski/tldextract
python
null
# Trie.from_public_suffixes returns None instead of a Trie object ## Bug description When using tldextract, all URL parsing is failing with an AttributeError: 'NoneType' object has no attribute... ## Steps to reproduce ```python import tldextract # Any extraction fails result = tldextract.extract('example.com') # ...
diff --git a/tldextract/tldextract.py b/tldextract/tldextract.py index 667c36a..c4eb9eb 100644 --- a/tldextract/tldextract.py +++ b/tldextract/tldextract.py @@ -194,26 +194,22 @@ class TLDExtract: """ suffix_list_urls = suffix_list_urls or () self.suffix_list_urls = tuple( - url.st...
["tests/cli_test.py::test_cli_posargs", "tests/cli_test.py::test_cli_namedargs", "tests/cli_test.py::test_cli_json_output", "tests/custom_suffix_test.py::test_private_extraction", "tests/custom_suffix_test.py::test_suffix_which_is_not_in_custom_list", "tests/custom_suffix_test.py::test_custom_suffixes", "tests/custom_s...
["tests/cli_test.py::test_cli_no_input", "tests/cli_test.py::test_cli_parses_args", "tests/main_test.py::test_lenient_netloc", "tests/main_test.py::test_looks_like_ip", "tests/main_test.py::test_looks_like_ipv6", "tests/main_test.py::test_bad_kwargs_no_way_to_fetch", "tests/main_test.py::test_cache_timeouts", "tests/ma...
jyangballin/swesmith.x86_64.john-kurkowski_1776_tldextract.3d1bf184
true
null
1
36
45
1,077
0
0.6
1
0.75
1
0.2995
81.1735
5,499
swe_smith::train::46720
swe_smith
train
46,720
python-trio__trio.cfbbe2c1.combine_module__8cqj73v7
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Traceback concatenation broken - wrong frame and line info in exceptions #### Description When exceptions are raised in trio, the traceback concatenation is producing incorrect frame and line number information. The traceback frames are getting mixed up and line numbers are swapped, making debugging very difficult. ...
diff --git a/src/trio/_core/_concat_tb.py b/src/trio/_core/_concat_tb.py index a146961..3e53a6f 100644 --- a/src/trio/_core/_concat_tb.py +++ b/src/trio/_core/_concat_tb.py @@ -46,7 +46,6 @@ except ImportError: ] def copy_tb(base_tb: TracebackType, tb_next: TracebackType | None) -> TracebackType: - ...
["src/trio/_core/_tests/test_exceptiongroup_gc.py::test_concat_tb", "src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_ki", "src/trio/_core/_tests/test_ki.py::test_ki_protection_works", "src/trio/_core/_tests/test_ki.py::test_identity_weakref_internals", "src/trio/_tests/test_repl.py::test_KI_interrupts", "src/...
["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
2
35
9
1,096
0
0.6
1
0.75
1
0.299333
81.173