selection_rank int64 0 10k | uid stringlengths 17 29 | source stringclasses 7
values | split stringclasses 3
values | row_idx int64 0 58.9k | instance_id stringlengths 14 120 | repo stringclasses 246
values | repo_canon stringclasses 232
values | language stringclasses 8
values | base_commit stringlengths 40 40 ⌀ | problem_statement stringlengths 84 23.6k | extra_context stringclasses 626
values | hints stringlengths 0 59.3k | patch stringlengths 252 175k | test_patch stringlengths 0 358k | f2p stringlengths 10 155k ⌀ | p2p stringlengths 2 1.75M ⌀ | env_image stringlengths 41 154 ⌀ | env_available bool 1
class | created_at stringlengths 10 20 ⌀ | n_src_files int64 1 15 | src_lines int64 1 1.48k | n_f2p float64 1 1.87k ⌀ | ps_chars int64 84 23.6k | leak_ratio float64 0 0.6 | s_prior float64 0.6 1 | s_verif float64 0.75 1 | s_ps float64 0.04 1 | s_patch float64 0.07 1 | s_tiebreak float64 0.02 1 | score float64 47.9 98.6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7,700 | swe_smith::train::52593 | swe_smith | train | 52,593 | pydicom__pydicom.7d361b3d.func_pm_remove_cond__nf3evwyp | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | _BufferedItem.read() method broken after recent changes
#### Description
The `_BufferedItem.read()` method in `encaps.py` appears to be broken. When trying to read data from a buffered item, it returns empty bytes instead of the expected content.
#### Steps/Code to Reproduce
```python
from io import BytesIO
from py... | diff --git a/src/pydicom/encaps.py b/src/pydicom/encaps.py
index 3493808..4b8aeb6 100644
--- a/src/pydicom/encaps.py
+++ b/src/pydicom/encaps.py
@@ -708,21 +708,6 @@ class _BufferedItem:
out = bytearray()
while length := (size - nr_read):
offset = start + nr_read
- if offset < ... | ["tests/test_encaps.py::TestBufferedFrame::test_read_even", "tests/test_encaps.py::TestBufferedFrame::test_read_odd", "tests/test_encaps.py::TestBufferedFrame::test_read_partial_even", "tests/test_encaps.py::TestBufferedFrame::test_read_partial_odd", "tests/test_encaps.py::TestBufferedFrame::test_empty_buffer", "tests/... | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 16 | 11 | 979 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2165 | 80.9245 | |||
7,701 | swe_smith::train::47120 | swe_smith | train | 47,120 | python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__coiqvxq4 | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | open_signal_receiver raises RuntimeError too late when not in main thread
#### Description
When `open_signal_receiver` is called from a non-main thread, it should immediately raise a RuntimeError. However, the main thread check has been moved to the wrong location and now only executes after the context manager exits... | diff --git a/src/trio/_signals.py b/src/trio/_signals.py
index 729c48a..e604a8c 100644
--- a/src/trio/_signals.py
+++ b/src/trio/_signals.py
@@ -130,6 +130,7 @@ def get_pending_signal_count(rec: AsyncIterator[int]) -> int:
def open_signal_receiver(
*signals: signal.Signals | int,
) -> Generator[AsyncIterator[int... | ["src/trio/_tests/test_signals.py::test_catch_signals_wrong_thread"] | ["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 | 16 | 1 | 979 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2165 | 80.9245 | |||
7,702 | swe_smith::train::2757 | swe_smith | train | 2,757 | cknd__stackprinter.219fcc52.func_pm_remove_assign__jjdk5r8z | swesmith/cknd__stackprinter.219fcc52 | cknd/stackprinter | python | null | NameError in source inspection after tokenization changes
#### Description
After recent changes to the tokenization logic, several variables are being referenced but not defined, causing NameError exceptions when trying to format stack traces or inspect source code.
#### Steps/Code to Reproduce
```python
import sta... | diff --git a/stackprinter/source_inspection.py b/stackprinter/source_inspection.py
index 63bc52c..4cd8ed9 100644
--- a/stackprinter/source_inspection.py
+++ b/stackprinter/source_inspection.py
@@ -127,19 +127,9 @@ def _tokenize(source_lines):
"""
tokenizer = tokenize.generate_tokens(iter(source_lines).__nex... | ["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting", "tests/test_source_inspection.py::test_source_annotation"] | ["tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_utils.py::test_match"] | jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52 | true | null | 1 | 19 | 3 | 919 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2165 | 80.9245 | |||
7,703 | swe_smith::train::47860 | swe_smith | train | 47,860 | sqlfluff__sqlfluff.50a1c4b6.func_basic__e3bjkj78 | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | Config loading returns None instead of configuration dictionary
#### Description
When loading configuration files, the config loader is returning `None` instead of the expected configuration dictionary. This breaks all configuration-dependent functionality in sqlfluff.
#### Steps/Code to Reproduce
```python
from sq... | diff --git a/src/sqlfluff/core/config/file.py b/src/sqlfluff/core/config/file.py
index 9e06df7..7e338ee 100644
--- a/src/sqlfluff/core/config/file.py
+++ b/src/sqlfluff/core/config/file.py
@@ -104,11 +104,15 @@ def load_config_file_as_dict(filepath: str) -> ConfigMappingType:
# The raw loaded files have some pat... | ["test/core/config/fluffconfig_test.py::test__config__nested_config_tests", "test/core/config/fluffconfig_test.py::test__config__glob_exclude_config_tests", "test/core/config/fluffconfig_test.py::test__config__glob_include_config_tests", "test/core/config/fluffconfig_test.py::test__config__rules_set_to_none", "test/cor... | ["test/core/config/fluffconfig_test.py::test__config__from_strings", "test/core/config/fluffconfig_test.py::test__config__templater_selection[raw-RawTemplater-False]", "test/core/config/fluffconfig_test.py::test__config__templater_selection[jinja-JinjaTemplater-False]", "test/core/config/fluffconfig_test.py::test__conf... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 6 | 13 | 1,179 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2165 | 80.9245 | |||
7,704 | swe_smith::train::41032 | swe_smith | train | 41,032 | scanny__python-pptx.278b47b1.func_basic__f0orh0cn | swesmith/scanny__python-pptx.278b47b1 | scanny/python-pptx | python | null | GroupShape.click_action returns ActionSetting instead of raising TypeError
#### Description
When accessing the `click_action` property on a GroupShape, it now returns an ActionSetting object instead of raising a TypeError as expected. Group shapes should not have click actions according to the design.
#### Steps/Cod... | diff --git a/src/pptx/shapes/group.py b/src/pptx/shapes/group.py
index 7173758..cb92aa0 100644
--- a/src/pptx/shapes/group.py
+++ b/src/pptx/shapes/group.py
@@ -29,7 +29,11 @@ class GroupShape(BaseShape):
A group shape cannot have a click action or hover action.
"""
- raise TypeError("a group... | ["tests/shapes/test_group.py::DescribeGroupShape::it_raises_on_access_click_action"] | ["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr... | jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1 | true | null | 1 | 6 | 1 | 1,179 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2165 | 80.9245 | |||
7,705 | swe_smith::train::30931 | swe_smith | train | 30,931 | mido__mido.a0158ff9.func_pm_ctrl_shuffle__2cpdf59x | swesmith/mido__mido.a0158ff9 | mido/mido | python | null | Message creation fails with NameError when using unknown message type
#### Description
When trying to create a MIDI message with an unknown message type, the code raises a `NameError` instead of the expected `LookupError`. This happens because variables are being referenced before they are defined.
#### Steps/Code t... | diff --git a/mido/messages/specs.py b/mido/messages/specs.py
index 91e2b2b..d65fa3e 100644
--- a/mido/messages/specs.py
+++ b/mido/messages/specs.py
@@ -112,6 +112,13 @@ DEFAULT_VALUES = {
# TODO: should this be in decode.py?
def make_msgdict(type_, overrides):
+
+ for name in spec['value_names']:
+ msg[n... | ["../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_parser.py::test_parse", "../dev/tests/test... | ["../dev/tests/test_frozen.py::test_frozen_meta_repr", "../dev/tests/test_frozen.py::test_frozen_unknown_meta_repr", "../dev/tests/test_parser.py::test_parse_stray_data", "../dev/tests/test_parser.py::test_parse_stray_status_bytes", "../dev/tests/test_parser.py::test_feed_byte", "../dev/tests/test_parser.py::test_feed"... | jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9 | true | null | 1 | 20 | 35 | 899 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2165 | 80.9245 | |||
7,706 | swe_smith::train::26345 | swe_smith | train | 26,345 | pylint-dev__astroid.b114f6b5.func_pm_remove_assign__8rlvsirn | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Binary operations on tuples and lists broken after recent changes
#### Description
After some recent changes, binary operations like addition (`+`) and multiplication (`*`) on tuples and lists are no longer working correctly. The operations are raising `NameError` exceptions instead of returning the expected results.... | diff --git a/astroid/protocols.py b/astroid/protocols.py
index 8a837b8..93d6961 100644
--- a/astroid/protocols.py
+++ b/astroid/protocols.py
@@ -190,15 +190,7 @@ def tl_infer_binary_op(
# For tuples and list the boundnode is no longer the tuple or list instance
context.boundnode = None
- not_implemented ... | ["tests/brain/test_dateutil.py::DateutilBrainTest::test_parser", "tests/brain/test_named_tuple.py::NamedTupleTest::test_namedtuple_advanced_inference", "tests/test_inference.py::InferenceTest::test_binary_op_list_mul_none", "tests/test_inference.py::InferenceTest::test_binary_op_on_self", "tests/test_inference.py::Infe... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 9 | 19 | 1,119 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2165 | 80.9245 | |||
7,707 | swe_smith::train::32523 | swe_smith | train | 32,523 | pydantic__pydantic.acb0f10f.func_pm_ctrl_invert_if__ptbt7r8e | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | TypeAdapter fails to resolve forward references when parent frame is None
#### Description
When creating a TypeAdapter and the parent frame cannot be fetched (returns None), the globalns and localns are incorrectly set to empty dictionaries instead of using the parent frame's globals and locals. This causes forward r... | diff --git a/pydantic/type_adapter.py b/pydantic/type_adapter.py
index a6cdaba..93eb3f4 100644
--- a/pydantic/type_adapter.py
+++ b/pydantic/type_adapter.py
@@ -216,12 +216,12 @@ class TypeAdapter(Generic[T]):
parent_frame = self._fetch_parent_frame()
if parent_frame is not None:
+ global... | ["tests/test_forward_ref.py::test_implicit_type_alias_recursive_error_message", "tests/test_plugins.py::test_plugin_path_type_adapter", "tests/test_type_adapter.py::test_correct_frame_used_parametrized"] | ["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 | 7 | 3 | 1,159 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2165 | 80.9245 | |||
7,708 | swe_smith::train::3002 | swe_smith | train | 3,002 | Suor__funcy.207a7810.combine_file__ngqssnyf | swesmith/Suor__funcy.207a7810 | suor/funcy | python | null | # Issues with sequence functions in funcy
I've found several issues with sequence functions in funcy:
## 1. `partition` and `chunks` functions are broken
For example:
```python
>>> lchunks(2, [0, 1, 2, 3, 4])
[[1, 2], [2, 3], [4], []] # Wrong output
```
Expected output should be:
```python
[[0, 1], [2, 3], [4]]
``... | diff --git a/funcy/seqs.py b/funcy/seqs.py
index 9a96252..8929b9d 100644
--- a/funcy/seqs.py
+++ b/funcy/seqs.py
@@ -353,8 +353,8 @@ def count_reps(seq):
# For efficiency we use separate implementation for cutting sequences (those capable of slicing)
def _cut_seq(drop_tail, n, step, seq):
- limit = len(seq)-n+1 ... | ["tests/test_seqs.py::test_partition", "tests/test_seqs.py::test_chunks", "tests/test_seqs.py::test_lzip", "tests/test_seqs.py::test_lzip_strict"] | ["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 | 8 | 4 | 1,138 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216333 | 80.924 | |||
7,709 | swe_smith::train::23994 | swe_smith | train | 23,994 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__d6a04lwo | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | GOES XRS TimeSeries fails to parse netCDF files
#### Description
When trying to load GOES XRS netCDF files, the parser fails with a ValueError indicating the files are not supported, even though netCDF files should be supported according to the documentation.
#### Steps/Code to Reproduce
```python
import sunpy.time... | diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py
index 08e2a6a..ddb8738 100644
--- a/sunpy/timeseries/sources/goes.py
+++ b/sunpy/timeseries/sources/goes.py
@@ -140,6 +140,13 @@ class XRSTimeSeries(GenericTimeSeries):
@classmethod
def _parse_file(cls, filepath):
+ try:... | ["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g15_d20131028_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.p... | ["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/go1520120601.fits.gz-GOES-15]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno_missin... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 15 | 22 | 998 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216333 | 80.924 | |||
7,710 | swe_smith::train::4699 | swe_smith | train | 4,699 | bottlepy__bottle.a8dfef30.combine_file__x70r972s | swesmith/bottlepy__bottle.a8dfef30 | bottlepy/bottle | python | null | DictProperty and HeaderProperty broken after recent changes
#### Description
Setting values through DictProperty and HeaderProperty is completely broken. Properties that should be writable are now throwing "Read-Only property" errors, and header values are not being set correctly.
#### Steps/Code to Reproduce
```py... | diff --git a/bottle.py b/bottle.py
index 286b5bc..d40a08b 100755
--- a/bottle.py
+++ b/bottle.py
@@ -216,8 +216,8 @@ class DictProperty(object):
return storage[key]
def __set__(self, obj, value):
- if self.read_only: raise AttributeError("Read-Only property.")
- getattr(obj, self.attr)[sel... | ["test/test_contextlocals.py::TestThreadLocals::test_response", "test/test_environ.py::TestResponse::test_charset", "test/test_environ.py::TestResponse::test_content_type", "test/test_environ.py::TestResponse::test_expires_header", "test/test_exc.py::TestAppException::test_noncatched_error", "test/test_mount.py::TestAp... | ["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 | 6 | 11 | 1,178 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216333 | 80.924 | |||
7,711 | swe_smith::train::34944 | swe_smith | train | 34,944 | pyutils__line_profiler.a646bf0f.combine_module__um79u043 | swesmith/pyutils__line_profiler.a646bf0f | pyutils/line_profiler | python | null | Autoprofile fails with TypeError when using profile_imports
#### Description
When using the `--prof-imports` flag with kernprof autoprofile, the profiler crashes with a TypeError related to method binding.
#### Steps/Code to Reproduce
Create a simple Python script and try to profile it with import profiling enabled... | diff --git a/line_profiler/autoprofile/autoprofile.py b/line_profiler/autoprofile/autoprofile.py
index 7331dcc..c4ae82a 100644
--- a/line_profiler/autoprofile/autoprofile.py
+++ b/line_profiler/autoprofile/autoprofile.py
@@ -64,7 +64,7 @@ def _extend_line_profiler_for_profiling_imports(prof):
prof (LineProfile... | ["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_autoprofile.py::test_autoprofile_module", "tests/t... | ["tests/test_cli.py::test_cli", "tests/test_cli.py::test_version_agreement", "tests/test_complex_case.py::test_complex_example_python_none", "tests/test_duplicate_functions.py::test_duplicate_function", "tests/test_explicit_profile.py::test_simple_explicit_nonglobal_usage", "tests/test_explicit_profile.py::test_explici... | jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f | true | null | 2 | 11 | 9 | 1,078 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216333 | 80.924 | |||
7,712 | swe_smith::train::43038 | swe_smith | train | 43,038 | gawel__pyquery.811cd048.func_basic__76uwp3jg | swesmith/gawel__pyquery.811cd048 | gawel/pyquery | python | null | # Bug: PyQuery.Fn method registration is broken
## Bug summary
In the latest version, the `PyQuery.Fn` functionality is broken. When registering custom methods using `pq.fn`, the methods are not properly accessible on PyQuery objects.
## Code for reproduction
```python
from pyquery import PyQuery as pq
# Create a ... | diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py
index 5b05681..d6213bb 100644
--- a/pyquery/pyquery.py
+++ b/pyquery/pyquery.py
@@ -1505,10 +1505,10 @@ class PyQuery(list):
"""
def __setattr__(self, name, func):
def fn(self, *args, **kwargs):
- func.__globals__['this']... | ["pyquery/pyquery.py::pyquery.pyquery.PyQuery.Fn", "tests/test_pyquery.py::TestHook::test_fn", "tests/test_pyquery.py::TestHook::test_fn_with_kwargs"] | ["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 | 6 | 3 | 1,177 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216167 | 80.9235 | |||
7,713 | swe_smith::train::28773 | swe_smith | train | 28,773 | encode__starlette.db5063c2.func_pm_class_rm_funcs__x6yzrq9h | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | FormParser missing __init__ method breaks form parsing
#### Description
Form parsing fails when trying to create a FormParser instance. The `__init__` method appears to be missing from the FormParser class, causing AttributeError when attempting to parse form data.
#### Steps/Code to Reproduce
```python
from starle... | diff --git a/starlette/formparsers.py b/starlette/formparsers.py
index 82e2ad1..1e5bf47 100644
--- a/starlette/formparsers.py
+++ b/starlette/formparsers.py
@@ -54,11 +54,6 @@ class MultiPartException(Exception):
class FormParser:
- def __init__(self, headers: Headers, stream: typing.AsyncGenerator[bytes, None]... | ["tests/test_formparsers.py::test_urlencoded_request_data[asyncio]", "tests/test_formparsers.py::test_urlencoded_percent_encoding[asyncio]", "tests/test_formparsers.py::test_urlencoded_percent_encoding_keys[asyncio]", "tests/test_formparsers.py::test_urlencoded_multi_field_app_reads_body[asyncio]", "tests/test_formpars... | ["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 | 10 | 12 | 1,097 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216167 | 80.9235 | |||
7,714 | swe_smith::train::43826 | swe_smith | train | 43,826 | pydata__patsy.a5d16484.combine_file__t27wi97b | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | PatsyError constructor arguments swapped causing incorrect error reporting
When creating PatsyError instances, the message and origin arguments appear to be swapped in the constructor, leading to incorrect error reporting and test failures.
#### Steps/Code to Reproduce
```python
from patsy import PatsyError
from pat... | diff --git a/patsy/__init__.py b/patsy/__init__.py
index 50431ec..6e1e70c 100644
--- a/patsy/__init__.py
+++ b/patsy/__init__.py
@@ -46,9 +46,10 @@ class PatsyError(Exception):
def __init__(self, message, origin=None):
Exception.__init__(self, message)
- self.message = message
- self.origi... | ["patsy/build.py::test__examine_factor_types", "patsy/constraint.py::test_eval_errors", "patsy/desc.py::test_eval_formula_error_reporting", "patsy/missing.py::test_NAAction_raise", "patsy/parse_formula.py::test_parse_errors", "patsy/parse_formula.py::test_parse_extra_op", "patsy/test_highlevel.py::test_evalfactor_rerai... | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/builtins.py::test_... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 19 | 8 | 917 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216167 | 80.9235 | |||
7,715 | swe_smith::train::33375 | swe_smith | train | 33,375 | pallets__click.fde47b4b.combine_module__o4mzt3xv | swesmith/pallets__click.fde47b4b | pallets/click | python | null | Shell completion broken with empty string arguments
#### Description
Shell completion is failing when processing empty string arguments. The completion system crashes with an `IndexError` when trying to access string indices on empty values.
#### Steps/Code to Reproduce
```python
import click
from click.shell_compl... | diff --git a/src/click/shell_completion.py b/src/click/shell_completion.py
index c8655b1..5e4f139 100644
--- a/src/click/shell_completion.py
+++ b/src/click/shell_completion.py
@@ -498,11 +498,11 @@ def _is_incomplete_argument(ctx: Context, param: Parameter) -> bool:
def _start_of_option(ctx: Context, value: str) ->... | ["tests/test_shell_completion.py::test_command", "tests/test_shell_completion.py::test_group", "tests/test_shell_completion.py::test_chained", "tests/test_shell_completion.py::test_argument_order", "tests/test_shell_completion.py::test_argument_default", "tests/test_shell_completion.py::test_type_choice", "tests/test_s... | ["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs... | jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b | true | null | 2 | 11 | 30 | 1,077 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216167 | 80.9235 | |||
7,716 | swe_smith::train::47143 | swe_smith | train | 47,143 | python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__ks119twn | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | Instrument registration fails when docstring is moved after implementation
#### Description
When adding an instrument to the current run loop, the registration process fails if the docstring is placed after the implementation code instead of at the beginning of the method.
#### Steps/Code to Reproduce
```python
imp... | diff --git a/src/trio/_core/_instrumentation.py b/src/trio/_core/_instrumentation.py
index 40bddd1..5acc6d1 100644
--- a/src/trio/_core/_instrumentation.py
+++ b/src/trio/_core/_instrumentation.py
@@ -41,17 +41,6 @@ class Instruments(dict[str, dict[Instrument, None]]):
@_public
def add_instrument(self, inst... | ["src/trio/_core/_tests/test_instrumentation.py::test_instrument_that_raises_on_getattr"] | ["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co... | jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1 | true | null | 1 | 21 | 1 | 877 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216167 | 80.9235 | |||
7,717 | swe_smith::train::48714 | swe_smith | train | 48,714 | facebookresearch__hydra.0f03eb60.combine_module__o1cx5nj6 | swesmith/facebookresearch__hydra.0f03eb60 | facebookresearch/hydra | python | null | Tab completion broken for config groups with files
#### Description
Tab completion is not working properly for config groups that contain files. When trying to complete a config group that has files but no directories, the completion system fails with a TypeError.
#### Steps/Code to Reproduce
```python
from hydra.p... | diff --git a/hydra/plugins/completion_plugin.py b/hydra/plugins/completion_plugin.py
index 8bc6138..bed84df 100644
--- a/hydra/plugins/completion_plugin.py
+++ b/hydra/plugins/completion_plugin.py
@@ -206,14 +206,13 @@ class CompletionPlugin(Plugin):
overrides=words,
)
... | ["tests/test_callbacks.py::test_app_with_callbacks[on_compose_callback]", "tests/test_completion.py::TestRunCompletion::test_completion_plugin[-2-expected0-no_prefix]", "tests/test_completion.py::TestRunCompletion::test_completion_plugin[-2-expected0-prefix]", "tests/test_completion.py::TestRunCompletion::test_completi... | ["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 | 8 | 25 | 1,137 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216167 | 80.9235 | |||
7,718 | swe_smith::train::30585 | swe_smith | train | 30,585 | gweis__isodate.17cb25eb.func_basic__y3h8khx4 | swesmith/gweis__isodate.17cb25eb | gweis/isodate | python | null | Duration.totimedelta() fails when both start and end parameters provided
#### Description
The `totimedelta()` method in the Duration class doesn't properly handle the case when both `start` and `end` parameters are provided. Instead of raising a ValueError as expected, it silently accepts both parameters and produces... | diff --git a/src/isodate/duration.py b/src/isodate/duration.py
index 85241e4..a79e0c9 100644
--- a/src/isodate/duration.py
+++ b/src/isodate/duration.py
@@ -289,10 +289,7 @@ class Duration:
if start is None and end is None:
raise ValueError("start or end required")
if start is not None an... | ["tests/test_duration.py::test_totimedelta"] | ["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::tes... | jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb | true | null | 1 | 9 | 1 | 1,117 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216167 | 80.9235 | |||
7,719 | swe_smith::train::27804 | swe_smith | train | 27,804 | arrow-py__arrow.1d70d009.lm_rewrite__e6m1pcz7 | swesmith/arrow-py__arrow.1d70d009 | arrow-py/arrow | python | null | # Arrow._get_datetime fails to parse string timestamps
## Description
The `_get_datetime` method in Arrow fails when trying to parse string inputs. This is a regression from previous behavior.
## Steps to reproduce
```python
import arrow
from datetime import datetime
# This fails
arrow.Arrow._get_datetime("2023-01... | diff --git a/arrow/arrow.py b/arrow/arrow.py
index 9d1f5e3..45994ff 100644
--- a/arrow/arrow.py
+++ b/arrow/arrow.py
@@ -1802,20 +1802,18 @@ class Arrow:
raise ValueError(f"{tz_expr!r} not recognized as a timezone.")
@classmethod
- def _get_datetime(
- cls, expr: Union["Arrow", dt_date... | ["tests/test_arrow.py::TestArrowUtil::test_get_datetime"] | ["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te... | jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009 | true | null | 1 | 16 | 1 | 977 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216167 | 80.9235 | |||
7,720 | swe_smith::train::28477 | swe_smith | train | 28,477 | encode__starlette.db5063c2.func_basic__1q3fbl2t | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | collapse_excgroups context manager not raising exceptions properly
#### Description
The `collapse_excgroups()` context manager is not properly re-raising exceptions when used in test scenarios. Instead of propagating the original exception, it appears to be swallowing exceptions entirely.
#### Steps/Code to Reproduc... | diff --git a/starlette/_utils.py b/starlette/_utils.py
index 74c9f24..22778b9 100644
--- a/starlette/_utils.py
+++ b/starlette/_utils.py
@@ -76,10 +76,10 @@ def collapse_excgroups() -> typing.Generator[None, None, None]:
yield
except BaseException as exc:
if has_exceptiongroups:
- whil... | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_custom_middleware[trio]", "tests/middleware/test_wsgi.py::test_wsgi_exception[asyncio]", "tests/middleware/test_wsgi.py::test_wsgi_exception[trio]"] | ["tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTT... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 8 | 4 | 1,137 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216167 | 80.9235 | |||
7,721 | r2e_gym::train::414 | r2e_gym | train | 414 | orange3__9c69c4dd754b74e2327406799b5686332429f517 | orange3 | biolab/orange3 | python | 9c69c4dd754b74e2327406799b5686332429f517 | **Title:** `nanmean` Function Raises TypeError When `weights` Are Provided
**Description:**
When attempting to calculate a weighted mean using the `nanmean` function, providing the `weights` parameter results in a `TypeError`. This prevents users from performing weighted mean calculations while appropriately handling ... | diff --git a/Orange/statistics/util.py b/Orange/statistics/util.py
--- a/Orange/statistics/util.py
+++ b/Orange/statistics/util.py
@@ -342,20 +342,14 @@
is_numeric = np.issubdtype(X.dtype, np.number)
is_sparse = sp.issparse(X)
weighted = weights is not None and X.dtype != object
-
- def weighted_mean(... | diff --git a/Orange/tests/test_statistics.py b/Orange/tests/test_statistics.py
--- a/Orange/tests/test_statistics.py
+++ b/Orange/tests/test_statistics.py
@@ -353,6 +353,16 @@
self.random_state = check_random_state(42)
self.x = self.random_state.uniform(size=(10, 5))
np.fill_diagonal(self.x, ... | null | null | namanjain12/orange3_final:9c69c4dd754b74e2327406799b5686332429f517 | true | null | 1 | 36 | null | 1,289 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.334833 | 80.92325 | ||
7,722 | swe_smith::train::24659 | swe_smith | train | 24,659 | marshmallow-code__marshmallow.9716fc62.func_basic__8ymbtehj | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | OneOf validator choices order reversed and error handling broken
#### Description
The OneOf validator is behaving unexpectedly - the choices are being reversed and error messages are not working properly.
#### Steps/Code to Reproduce
```python
from marshmallow import validate
# Create a OneOf validator with ordere... | diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py
index e4536d8..a7cbd9c 100644
--- a/src/marshmallow/validate.py
+++ b/src/marshmallow/validate.py
@@ -581,11 +581,11 @@ class OneOf(Validator):
*,
error: str | None = None,
):
- self.choices = choices
+ self.choi... | ["tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_raises_with_errors", "tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_raises_with_errors_with_multiple_validators", "tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_many_raises_... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 6 | 12 | 1,176 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216 | 80.923 | |||
7,723 | swe_smith::train::20917 | swe_smith | train | 20,917 | tobymao__sqlglot.036601ba.func_pm_remove_assign__uqopc6kh | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | UnboundLocalError in unnest_subqueries optimizer
#### Description
The unnest_subqueries optimizer is throwing an UnboundLocalError when processing certain SQL queries. Variables like `predicate`, `column`, `value`, `join_key`, and `join_key_not_null` are being referenced before assignment.
#### Steps/Code to Reprodu... | diff --git a/sqlglot/optimizer/unnest_subqueries.py b/sqlglot/optimizer/unnest_subqueries.py
index dcb2f59..299a39d 100644
--- a/sqlglot/optimizer/unnest_subqueries.py
+++ b/sqlglot/optimizer/unnest_subqueries.py
@@ -39,8 +39,6 @@ def unnest_subqueries(expression):
def unnest(select, parent_select, next_alias_name):
... | ["tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch", "tests/test_optimizer.py::TestOptimizer::test_unnest_subqueries"] | ["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 11 | 4 | 1,076 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216 | 80.923 | |||
7,724 | swe_smith::train::24031 | swe_smith | train | 24,031 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__kmspdrob | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | LYRATimeSeries.plot() method broken after recent changes
#### Description
The `plot()` method in `LYRATimeSeries` is failing with an `AttributeError: 'NoneType' object has no attribute 'xaxis'`. This appears to be related to the order of operations in the plotting setup.
#### Steps/Code to Reproduce
```python
impor... | diff --git a/sunpy/timeseries/sources/lyra.py b/sunpy/timeseries/sources/lyra.py
index 1ca8fb9..97c38b8 100644
--- a/sunpy/timeseries/sources/lyra.py
+++ b/sunpy/timeseries/sources/lyra.py
@@ -56,6 +56,11 @@ class LYRATimeSeries(GenericTimeSeries):
_url = "https://proba2.sidc.be/about/LYRA"
def plot(self, a... | ["sunpy/timeseries/sources/tests/test_lyra.py::test_lyra_plot_column"] | ["sunpy/timeseries/sources/tests/test_lyra.py::test_implicit_lyra", "sunpy/timeseries/sources/tests/test_lyra.py::test_lyra"] | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 13 | 1 | 1,036 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216 | 80.923 | |||
7,725 | swe_smith::train::14383 | swe_smith | train | 14,383 | python-openxml__python-docx.0cf6d71f.lm_rewrite__63e87gh1 | swesmith/python-openxml__python-docx.0cf6d71f | python-openxml/python-docx | python | null | # BaseXmlEnum.from_xml returns None instead of raising ValueError when xml_value is None
I'm encountering an issue with `BaseXmlEnum.from_xml()` method when passing `None` as the `xml_value` parameter. The method now returns `None` instead of raising a `ValueError` as it did before.
## Reproduction
Here's a simple e... | diff --git a/src/docx/enum/base.py b/src/docx/enum/base.py
index bc96ab6..17ca833 100644
--- a/src/docx/enum/base.py
+++ b/src/docx/enum/base.py
@@ -51,7 +51,7 @@ class BaseXmlEnum(int, enum.Enum):
return f"{self.name} ({self.value})"
@classmethod
- def from_xml(cls, xml_value: str | None) -> Self:
+... | ["tests/test_enum.py::DescribeBaseXmlEnum::and_it_can_find_the_member_from_None_when_a_member_maps_that", "tests/test_enum.py::DescribeBaseXmlEnum::but_it_raises_when_there_is_no_such_mapped_XML_value"] | ["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows... | jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f | true | null | 1 | 15 | 2 | 996 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216 | 80.923 | |||
7,726 | swe_smith::train::24833 | swe_smith | train | 24,833 | marshmallow-code__marshmallow.9716fc62.func_pm_ctrl_invert_if__7qklohbz | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | Error merging logic swapped in merge_errors function
#### Description
When merging error dictionaries with overlapping keys, the merge logic appears to be reversed. Instead of recursively merging nested errors when a key exists in both dictionaries, it's overwriting the existing error with the new one, and when the k... | diff --git a/src/marshmallow/error_store.py b/src/marshmallow/error_store.py
index 72b7037..edc2bd1 100644
--- a/src/marshmallow/error_store.py
+++ b/src/marshmallow/error_store.py
@@ -48,13 +48,13 @@ def merge_errors(errors1, errors2):
errors = dict(errors1)
for key, val in errors2.items():
... | ["tests/test_decorators.py::TestValidatesDecorator::test_validates_with_data_key", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_multiple_validators", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_multiple_validators_merge_dict_errors", "tests/test_deserialization.py::TestSchemaDeseriali... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 6 | 55 | 1,176 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216 | 80.923 | |||
7,727 | swe_smith::train::32414 | swe_smith | train | 32,414 | pydantic__pydantic.acb0f10f.combine_module__a13he235 | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | #### Description
When using discriminated unions with function validators, an undefined variable error occurs due to a missing variable definition.
#### Steps/Code to Reproduce
```python
from pydantic import BaseModel, field_validator
from typing import Union, Literal
class ModelA(BaseModel):
type: Literal['a']... | diff --git a/pydantic/_internal/_discriminated_union.py b/pydantic/_internal/_discriminated_union.py
index 5dd6fda..f447bee 100644
--- a/pydantic/_internal/_discriminated_union.py
+++ b/pydantic/_internal/_discriminated_union.py
@@ -447,7 +447,6 @@ class _ApplyInferredDiscriminator:
return self._infer_disc... | ["tests/test_docs.py::test_docs_examples[docs/errors/usage_errors.md:293-322]", "tests/test_generics.py::test_replace_types_with_user_defined_generic_type_field", "tests/test_types.py::test_defaultdict_unknown_default_factory"] | ["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 | 2 | 9 | 3 | 1,116 | 0 | 0.6 | 1 | 0.75 | 1 | 0.216 | 80.923 | |||
7,728 | swe_smith::train::45154 | swe_smith | train | 45,154 | modin-project__modin.8c7799fd.func_pm_remove_assign__acj0a3bv | swesmith/modin-project__modin.8c7799fd | modin-project/modin | python | null | # `np.split` function broken for axis=0
## Description
The `np.split` function in Modin's NumPy API is not working correctly when splitting arrays along axis=0. The function fails with an `UnboundLocalError` when trying to access the `end_index` variable.
## To Reproduce
Here's a simple script to reproduce the issu... | diff --git a/modin/numpy/arr.py b/modin/numpy/arr.py
index ab40eca..cbcf18a 100644
--- a/modin/numpy/arr.py
+++ b/modin/numpy/arr.py
@@ -1191,9 +1191,6 @@ class array(object):
prev_index = 0
for i in range(len(indices) + 1):
if i < len(indices):
- end_index ... | ["modin/tests/numpy/test_array_shaping.py::test_split_2d[0]", "modin/tests/numpy/test_array_shaping.py::test_split_2d[1]", "modin/tests/numpy/test_array_shaping.py::test_split_2d_oob"] | ["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 | 6 | 3 | 1,175 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215833 | 80.9225 | |||
7,729 | swe_smith::train::27131 | swe_smith | train | 27,131 | tkrajina__gpxpy.09fc46b3.func_pm_ctrl_shuffle__2zjiy3ma | swesmith/tkrajina__gpxpy.09fc46b3 | tkrajina/gpxpy | python | null | reduce_points method fails with UnboundLocalError
#### Description
The `reduce_points` method in `GPXTrackSegment` is throwing an `UnboundLocalError` when trying to access the `reduced_points` variable. This happens when calling the method on any track segment.
#### Steps/Code to Reproduce
```python
import gpxpy
#... | diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py
index 73e2024..895fc49 100644
--- a/gpxpy/gpx.py
+++ b/gpxpy/gpx.py
@@ -708,6 +708,9 @@ class GPXTrackSegment:
self.points = mod_geo.simplify_polyline(self.points, max_distance) # type: ignore
def reduce_points(self, min_distance: float) -> None:
+
+ self.... | ["test.py::GPXTests::test_clone_and_smooth", "test.py::GPXTests::test_moving_stopped_times", "test.py::GPXTests::test_reduce_by_min_distance", "test.py::GPXTests::test_reduce_gpx_file"] | ["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a... | jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3 | true | null | 1 | 7 | 4 | 1,155 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215833 | 80.9225 | |||
7,730 | swe_smith::train::43974 | swe_smith | train | 43,974 | pydata__patsy.a5d16484.func_basic__bttwogff | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | te() function raises wrong exception types for invalid inputs
#### Description
The `te()` function is raising incorrect exception types when given invalid inputs. The function should raise `ValueError` for invalid input shapes and constraint shapes, but it's currently raising `TypeError` and `IndexError` instead.
##... | diff --git a/patsy/mgcv_cubic_splines.py b/patsy/mgcv_cubic_splines.py
index 5f93680..52e875c 100644
--- a/patsy/mgcv_cubic_splines.py
+++ b/patsy/mgcv_cubic_splines.py
@@ -1008,11 +1008,9 @@ def test_te_errors():
import pytest
x = np.arange(27)
- # Invalid input shape
- pytest.raises(ValueError, te, ... | ["patsy/mgcv_cubic_splines.py::test_te_errors"] | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 8 | 1 | 1,135 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215833 | 80.9225 | |||
7,731 | swe_smith::train::45021 | swe_smith | train | 45,021 | mahmoud__glom.fb3c4e76.func_pm_remove_cond__g64iavf6 | swesmith/mahmoud__glom.fb3c4e76 | mahmoud/glom | python | null | glom function returns None instead of raising errors when default is provided
#### Description
When using the `glom` function with a `default` parameter, the function returns `None` instead of properly raising exceptions or returning the expected default value in error cases.
#### Steps/Code to Reproduce
```python
... | diff --git a/glom/core.py b/glom/core.py
index cee71a3..244603f 100644
--- a/glom/core.py
+++ b/glom/core.py
@@ -2267,14 +2267,10 @@ def glom(target, spec, **kwargs):
scope[T] = target
scope.update(kwargs.pop('scope', {}))
err = None
- if kwargs:
- raise TypeError('unexpected keyword args: %r' ... | ["glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_seq_getitem", "glom/test/test_basic.py::test_python_native", "glom/test/test_basic.py::test_glom_extra_kwargs", "glom/test/test_check.py::test_check_basic", "glom/test/test_check.py::test_check_multi", "glom/test/test_cli.py::test_main_b... | ["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_val", "glom/test/test_basic.py::test_abstract_iterable", "... | jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76 | true | null | 1 | 8 | 62 | 1,135 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215833 | 80.9225 | |||
7,732 | swe_smith::train::21969 | swe_smith | train | 21,969 | life4__textdistance.c3aca916.func_pm_class_rm_funcs__p29pfj86 | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | MongeElkan algorithm raises NotImplementedError after recent changes
#### Description
The MongeElkan algorithm is no longer working and raises `NotImplementedError` when trying to calculate similarity or distance between sequences.
#### Steps/Code to Reproduce
```python
import textdistance
# This used to work but ... | diff --git a/textdistance/algorithms/token_based.py b/textdistance/algorithms/token_based.py
index d499b84..fbbfea7 100644
--- a/textdistance/algorithms/token_based.py
+++ b/textdistance/algorithms/token_based.py
@@ -258,21 +258,6 @@ class MongeElkan(_BaseSimilarity):
maxes.append(max_sim)
ret... | ["tests/test_common.py::test_normalization_range[alg16]", "tests/test_common.py::test_normalization_by_one[alg16]", "tests/test_common.py::test_normalization_same[alg16]", "tests/test_common.py::test_normalization_monotonic[alg16]", "tests/test_common.py::test_no_common_chars[alg16]", "tests/test_common.py::test_empty[... | ["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati... | jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916 | true | null | 1 | 15 | 9 | 995 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215833 | 80.9225 | |||
7,733 | swe_smith::train::19111 | swe_smith | train | 19,111 | seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__j72w1bmf | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | Numpy array distance calculation returns undefined variable
#### Description
When using deepdiff with numpy arrays, the distance calculation function `_get_numpy_array_distance` is returning an undefined variable `distance_array` instead of the computed result. This causes `UnboundLocalError` when comparing numpy arr... | diff --git a/deepdiff/distance.py b/deepdiff/distance.py
index d2dc2fe..2078f7e 100644
--- a/deepdiff/distance.py
+++ b/deepdiff/distance.py
@@ -268,6 +268,12 @@ def _get_numpy_array_distance(num1, num2, max_=1, use_log_scale=False, log_scale
The reason is the
When max is returned means the 2 numbers are real... | ["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_overlap", "tests/test_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[delta_ignore_order_case3]", "tests/test_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[de... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 13 | 10 | 1,034 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215667 | 80.922 | |||
7,734 | swe_smith::train::31355 | swe_smith | train | 31,355 | benoitc__gunicorn.bacbf8aa.combine_file__3haivw5d | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | Config initialization fails with TypeError when loading configuration
#### Description
When initializing a Gunicorn application, the configuration loading process fails with a TypeError due to incorrect parameter order in the Config constructor call.
#### Steps/Code to Reproduce
```python
from gunicorn.app.base imp... | diff --git a/gunicorn/app/base.py b/gunicorn/app/base.py
index 9bf7a4f..37efd62 100644
--- a/gunicorn/app/base.py
+++ b/gunicorn/app/base.py
@@ -31,16 +31,14 @@ class BaseApplication:
Loads the configuration
"""
try:
- self.load_default_config()
self.load_config()
- ... | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | ["tests/test_config.py::test_worker_class", "tests/test_config.py::test_defaults", "tests/test_config.py::test_property_access", "tests/test_config.py::test_bool_validation", "tests/test_config.py::test_pos_int_validation", "tests/test_config.py::test_str_validation", "tests/test_config.py::test_str_to_addr_list_valida... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 1 | 10 | 43 | 1,094 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215667 | 80.922 | |||
7,735 | swe_smith::train::27895 | swe_smith | train | 27,895 | jsvine__pdfplumber.02ff4313.func_pm_ctrl_shuffle__owiehqp1 | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | to_json method returns None instead of JSON string when called without stream parameter
#### Description
When calling the `to_json()` method on a PDF object without providing a stream parameter, the method returns `None` instead of the expected JSON string.
#### Steps/Code to Reproduce
```python
import pdfplumber
i... | diff --git a/pdfplumber/container.py b/pdfplumber/container.py
index 2589a4a..fa2bbe3 100644
--- a/pdfplumber/container.py
+++ b/pdfplumber/container.py
@@ -115,6 +115,12 @@ class Container(object):
indent: Optional[int] = None,
) -> Optional[str]:
+ if stream is None:
+ return json.du... | ["tests/test_convert.py::Test::test_additional_attr_types", "tests/test_convert.py::Test::test_cli_json", "tests/test_convert.py::Test::test_json", "tests/test_convert.py::Test::test_json_all_types", "tests/test_convert.py::Test::test_json_attr_filter", "tests/test_convert.py::Test::test_single_pages", "tests/test_oss_... | ["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te... | jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313 | true | null | 1 | 13 | 7 | 1,034 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215667 | 80.922 | |||
7,736 | swe_smith::train::48289 | swe_smith | train | 48,289 | sqlfluff__sqlfluff.50a1c4b6.func_pm_op_change__9ek9pxz8 | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | PlaceholderTemplater breaks with TypeError on string operations
#### Description
The PlaceholderTemplater is failing with a TypeError when processing SQL templates with placeholders. This affects all parameter styles including colon, question mark, dollar, percent, and other placeholder formats.
#### Steps/Code to R... | diff --git a/src/sqlfluff/core/templaters/placeholder.py b/src/sqlfluff/core/templaters/placeholder.py
index de708a8..8d628f7 100644
--- a/src/sqlfluff/core/templaters/placeholder.py
+++ b/src/sqlfluff/core/templaters/placeholder.py
@@ -162,7 +162,7 @@ class PlaceholderTemplater(RawTemplater):
replacem... | ["test/core/templaters/placeholder_test.py::test__templater_param_style[colon_simple_substitution]", "test/core/templaters/placeholder_test.py::test__templater_param_style[colon_tuple_substitution]", "test/core/templaters/placeholder_test.py::test__templater_param_style[colon_quoted]", "test/core/templaters/placeholder... | ["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 | 6 | 17 | 1,174 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215667 | 80.922 | |||
7,737 | swe_smith::train::17980 | swe_smith | train | 17,980 | pyasn1__pyasn1.0f07d724.func_pm_remove_cond__bbg3milq | swesmith/pyasn1__pyasn1.0f07d724 | pyasn1/pyasn1 | python | null | OctetStringEncoder broken after removing substrate initialization
#### Description
The OctetStringEncoder is failing to encode octet strings properly. When trying to encode various ASN.1 structures containing octet strings, the encoder throws a NameError because the `substrate` variable is not defined.
#### Steps/Co... | diff --git a/pyasn1/codec/ber/encoder.py b/pyasn1/codec/ber/encoder.py
index d16fb1f..7f56f62 100644
--- a/pyasn1/codec/ber/encoder.py
+++ b/pyasn1/codec/ber/encoder.py
@@ -228,15 +228,6 @@ class OctetStringEncoder(AbstractItemEncoder):
def encodeValue(self, value, asn1Spec, encodeFun, **options):
- if ... | ["tests/codec/ber/test_encoder.py::OctetStringEncoderTestCase::testDefMode", "tests/codec/ber/test_encoder.py::OctetStringEncoderTestCase::testDefModeChunked", "tests/codec/ber/test_encoder.py::OctetStringEncoderTestCase::testIndefMode", "tests/codec/ber/test_encoder.py::OctetStringEncoderTestCase::testIndefModeChunked... | ["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d... | jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724 | true | null | 1 | 17 | 151 | 953 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2155 | 80.9215 | |||
7,738 | swe_smith::train::36651 | swe_smith | train | 36,651 | lincolnloop__python-qrcode.456b01d4.func_pm_class_rm_funcs__lapo38cd | swesmith/lincolnloop__python-qrcode.456b01d4 | lincolnloop/python-qrcode | python | null | QRCode version property setter removed breaks version assignment
When trying to set the version property on a QRCode instance, an AttributeError is raised saying "can't set attribute". This breaks basic functionality where users need to specify a specific QR code version.
#### Steps/Code to Reproduce
```python
impor... | diff --git a/qrcode/main.py b/qrcode/main.py
index 46116b5..3a3ee39 100644
--- a/qrcode/main.py
+++ b/qrcode/main.py
@@ -107,13 +107,6 @@ class QRCode(Generic[GenericImage]):
self.best_fit()
return cast(int, self._version)
- @version.setter
- def version(self, value) -> None:
- if v... | ["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_overflow", "qrcode/tests/test_qrcode.py::test_add_qrdata", "qrcode/tests/test_qrcode.py::test_fit",... | ["qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_qrdata_repr", "qrcode/tests/test_qrcode.py::test_negative_size_at_construction", "qrcode/tests/test_release.py::test_invalid_data", "qrcode/tests/test_release.py::test_not_qrcode", "qrcode/tests/test_release.py::test_no_change", "qr... | jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4 | true | null | 1 | 26 | 71 | 773 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2155 | 80.9215 | |||
7,739 | swe_smith::train::8850 | swe_smith | train | 8,850 | pyupio__safety.7654596b.func_pm_ctrl_shuffle__ra8br0at | swesmith/pyupio__safety.7654596b | pyupio/safety | python | null | Database fetch fails immediately without attempting mirrors
#### Description
The `fetch_database` function is raising a `DatabaseFetchError` immediately without attempting to fetch from any configured mirrors. This causes all database operations to fail regardless of the mirror configuration or authentication status.... | diff --git a/safety/safety.py b/safety/safety.py
index 7bb6ad7..192420b 100644
--- a/safety/safety.py
+++ b/safety/safety.py
@@ -324,6 +324,14 @@ def fetch_database(
ecosystem: Optional[Ecosystem] = None,
from_cache: bool = True
) -> Dict[str, Any]:
+ if session.is_using_auth_credentials():
+ mirro... | ["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_safety.py::TestSafety::test_check_from_file", "tests/test_safety.py::TestSafety::test_check_fro... | ["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_vulnerabilities_found_default", "tests/test_cli.py::TestSafetyCLI::test_check_vulnerabilities_found_with_outputs", "tests/tes... | jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b | true | null | 1 | 17 | 9 | 953 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2155 | 80.9215 | |||
7,740 | swe_smith::train::4945 | swe_smith | train | 4,945 | bottlepy__bottle.a8dfef30.func_pm_ctrl_shuffle__bvnee65i | swesmith/bottlepy__bottle.a8dfef30 | bottlepy/bottle | python | null | MultipartParser fails with AttributeError when buffer_size is accessed before initialization
#### Description
When creating a `_MultipartParser` instance, the constructor fails with an `AttributeError` because `buffer_size` is referenced before it's defined. The initialization order was changed and now `self.buffer_s... | diff --git a/bottle.py b/bottle.py
index 286b5bc..315da64 100755
--- a/bottle.py
+++ b/bottle.py
@@ -3217,19 +3217,18 @@ class _MultipartParser(object):
):
self.stream = stream
self.boundary = boundary
- self.content_length = content_length
- self.disk_limit = disk_limit
- se... | ["test/test_environ.py::TestRequest::test_multipart", "test/test_multipart.py::TestMultipartParser::test_big_file", "test/test_multipart.py::TestMultipartParser::test_file_seek", "test/test_multipart.py::TestMultipartParser::test_fuzzy_lineiter", "test/test_multipart.py::TestMultipartParser::test_iterlines", "test/test... | ["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 | 9 | 23 | 1,113 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2155 | 80.9215 | |||
7,741 | swe_smith::train::27955 | swe_smith | train | 27,955 | jsvine__pdfplumber.02ff4313.func_pm_remove_assign__khuqld35 | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | PDFStructTree initialization fails with AttributeError when accessing undefined attributes
#### Description
When initializing a PDFStructTree object, the code attempts to access `self.root` and `self.pages` attributes before they are defined, causing AttributeError exceptions.
#### Steps/Code to Reproduce
```python... | diff --git a/pdfplumber/structure.py b/pdfplumber/structure.py
index 88749d7..7bbe357 100644
--- a/pdfplumber/structure.py
+++ b/pdfplumber/structure.py
@@ -172,9 +172,7 @@ class PDFStructTree(Findable):
self.doc = doc.doc
if "StructTreeRoot" not in self.doc.catalog:
raise StructTreeMissi... | ["tests/test_convert.py::Test::test_cli_structure_text", "tests/test_structure.py::Test::test_structure_tree", "tests/test_structure.py::TestClass::test_all_mcids", "tests/test_structure.py::TestClass::test_element_bbox", "tests/test_structure.py::TestClass::test_find_all_element", "tests/test_structure.py::TestClass::... | ["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te... | jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313 | true | null | 1 | 6 | 16 | 1,173 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2155 | 80.9215 | |||
7,742 | swe_smith::train::48624 | swe_smith | train | 48,624 | mewwts__addict.75284f95.func_basic__9tjra5yk | swesmith/mewwts__addict.75284f95 | mewwts/addict | python | null | # Addition operator (`+`) broken for Dict objects
I found an issue with the `+` operator for Dict objects. When trying to add dictionaries, it's not working as expected.
## Reproduction
```python
from addict import Dict
# Case 1: Adding an empty Dict
empty_dict = Dict()
other_dict = Dict(a=1, b=2)
result = empty_di... | diff --git a/addict/addict.py b/addict/addict.py
index 55e02d1..a655537 100644
--- a/addict/addict.py
+++ b/addict/addict.py
@@ -47,13 +47,13 @@ class Dict(dict):
object.__delattr__(self, '__key')
def __add__(self, other):
- if not self.keys():
- return other
+ if self.keys(... | ["test_addict.py::DictTests::test_add_on_empty_dict", "test_addict.py::DictTests::test_add_on_non_empty_dict", "test_addict.py::ChildDictTests::test_add_on_empty_dict", "test_addict.py::ChildDictTests::test_add_on_non_empty_dict"] | ["test_addict.py::DictTests::test_add_on_non_empty_value", "test_addict.py::DictTests::test_add_on_unsupported_type", "test_addict.py::DictTests::test_copy", "test_addict.py::DictTests::test_deepcopy", "test_addict.py::DictTests::test_deepcopy2", "test_addict.py::DictTests::test_delattr", "test_addict.py::DictTests::te... | jyangballin/swesmith.x86_64.mewwts_1776_addict.75284f95 | true | null | 1 | 10 | 4 | 1,093 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2155 | 80.9215 | |||
7,743 | swe_smith::train::30116 | swe_smith | train | 30,116 | getnikola__nikola.0f4c230e.func_pm_remove_wrapper__nfiedmvs | swesmith/getnikola__nikola.0f4c230e | getnikola/nikola | python | null | WordPress import fails with NameError on tag processing
#### Description
When importing a WordPress site, the import process crashes with a `NameError: name 'tag_str' is not defined` error during tag redirect generation.
#### Steps/Code to Reproduce
```python
from nikola.plugins.command.import_wordpress import Comm... | diff --git a/nikola/plugins/command/import_wordpress.py b/nikola/plugins/command/import_wordpress.py
index 9a8b130..16af75d 100644
--- a/nikola/plugins/command/import_wordpress.py
+++ b/nikola/plugins/command/import_wordpress.py
@@ -405,13 +405,6 @@ to
# Add tag redirects
for tag in self.all_tags:
-... | ["tests/test_command_import_wordpress.py::test_create_import[options1-None]", "tests/test_command_import_wordpress.py::test_create_import[None-additional_args2]", "tests/test_command_import_wordpress.py::test_ignoring_drafts_during_import[options0]", "tests/test_command_import_wordpress.py::test_ignoring_drafts_during_... | ["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o... | jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e | true | null | 1 | 8 | 4 | 1,133 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2155 | 80.9215 | |||
7,744 | swe_smith::train::3460 | swe_smith | train | 3,460 | pygments__pygments.27649ebb.combine_file__p3ja3fnh | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | Terminal256Formatter and TerminalTrueColorFormatter broken after recent changes
#### Description
The terminal formatters are throwing `NameError: name 'escape' is not defined` when trying to format code. This affects both Terminal256Formatter and TerminalTrueColorFormatter classes.
#### Steps/Code to Reproduce
```p... | diff --git a/pygments/formatters/terminal256.py b/pygments/formatters/terminal256.py
index 6402d8c..594bbfc 100644
--- a/pygments/formatters/terminal256.py
+++ b/pygments/formatters/terminal256.py
@@ -223,16 +223,15 @@ class Terminal256Formatter(Formatter):
def _setup_styles(self):
for ttype, ndef in se... | ["tests/test_basic_api.py::test_formatter_public_api[TerminalTrueColorFormatter]", "tests/test_basic_api.py::test_formatter_unicode_handling[TerminalTrueColorFormatter]", "tests/test_basic_api.py::test_formatter_unicode_handling[Terminal256Formatter]", "tests/test_basic_api.py::test_formatter_public_api[Terminal256Form... | ["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 | 13 | 5 | 1,032 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215333 | 80.921 | |||
7,745 | swe_smith::train::49237 | swe_smith | train | 49,237 | mozilla__bleach.73871d76.func_basic__232kkxkv | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | HTML entity parsing broken - ValueError when processing entities
#### Description
HTML entity parsing is failing with `ValueError: Stream should end with ";"` when processing various HTML entities. This affects both cleaning and linkifying operations.
#### Steps/Code to Reproduce
```python
import bleach
# This sho... | diff --git a/bleach/html5lib_shim.py b/bleach/html5lib_shim.py
index f083db7..7bd7ba8 100644
--- a/bleach/html5lib_shim.py
+++ b/bleach/html5lib_shim.py
@@ -614,17 +614,15 @@ def match_entity(stream):
entity; ``None`` otherwise
"""
- # Nix the & at the beginning
- if stream[0] != "&":
- rai... | ["tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_character_entities_handling[&-&]", "tests/test_clean.py::test_character_entities_handling[ - ]", "tests/test_clean.py::test_character_entities_handling[<em>strong</em>-<em>strong</em>]", "tests/test_c... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 17 | 32 | 952 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215333 | 80.921 | |||
7,746 | swe_smith::train::27221 | swe_smith | train | 27,221 | tkrajina__gpxpy.09fc46b3.func_pm_ctrl_shuffle__siz7a46x | swesmith/tkrajina__gpxpy.09fc46b3 | tkrajina/gpxpy | python | null | get_points_data method returns undefined variable
#### Description
The `get_points_data` method in the GPX class is broken and returns an undefined variable `points` before it's initialized.
#### Steps/Code to Reproduce
```python
import gpxpy
# Create a simple GPX with some track points
gpx = gpxpy.GPX()
track = g... | diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py
index 73e2024..c519829 100644
--- a/gpxpy/gpx.py
+++ b/gpxpy/gpx.py
@@ -2432,15 +2432,9 @@ class GPX:
return MinimumMaximum(min(elevations), max(elevations))
def get_points_data(self, distance_2d: bool=False) -> List[PointData]:
- """
- Returns a li... | ["test.py::GPXTests::test_named_tuples_values_point_data", "test.py::GPXTests::test_positions_on_track", "test.py::GPXTests::test_positions_on_track_2", "test.py::GPXTests::test_track_points_data"] | ["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a... | jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3 | true | null | 1 | 19 | 4 | 912 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215333 | 80.921 | |||
7,747 | swe_smith::train::55859 | swe_smith | train | 55,859 | go-critic__go-critic.db2ec6f4.func_pm_flip_operators__2340wsln | swesmith/go-critic__go-critic.db2ec6f4 | go-critic/go-critic | go | null | unnamedResult checker crashes with nil pointer dereference
#### Description
The unnamedResult checker is causing a panic with a nil pointer dereference when analyzing certain Go code. This makes the linter crash completely instead of continuing with other checks.
#### Steps/Code to Reproduce
The crash occurs when r... | diff --git a/checkers/unnamedResult_checker.go b/checkers/unnamedResult_checker.go
index 0d40add..20be295 100644
--- a/checkers/unnamedResult_checker.go
+++ b/checkers/unnamedResult_checker.go
@@ -42,9 +42,9 @@ func (c *unnamedResultChecker) VisitFuncDecl(decl *ast.FuncDecl) {
}
results := decl.Type.Results
switc... | ["TestCheckers", "TestCheckers/unnamedResult", "TestIntegration", "TestIntegration/check_main_only", "TestIntegration/check_packages"] | ["TestCheckers/appendAssign/debug", "TestCheckers/appendCombine/debug", "TestCheckers/argOrder/debug", "TestCheckers/assignOp/debug", "TestCheckers/badCall/debug", "TestCheckers/badCond/debug", "TestCheckers/badLock/debug", "TestCheckers/badRegexp/debug", "TestCheckers/badSorting/debug", "TestCheckers/badSyncOnceFunc/d... | jyangballin/swesmith.x86_64.go-critic_1776_go-critic.db2ec6f4 | true | null | 1 | 12 | 5 | 1,052 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215333 | 80.921 | |||
7,748 | swe_smith::train::27983 | swe_smith | train | 27,983 | jsvine__pdfplumber.02ff4313.func_pm_remove_cond__leo4goto | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | KeyError when accessing PDF structure tree attributes
#### Description
When trying to access PDF structure tree information, a KeyError is raised for missing 'C' key in structure objects. This happens when processing PDFs with structure trees that don't have class map attributes defined.
#### Steps/Code to Reproduce... | diff --git a/pdfplumber/structure.py b/pdfplumber/structure.py
index 88749d7..895c573 100644
--- a/pdfplumber/structure.py
+++ b/pdfplumber/structure.py
@@ -219,8 +219,6 @@ class PDFStructTree(Findable):
) -> Dict[str, Any]:
attr_obj_list = []
for key in "C", "A":
- if key not in obj:
... | ["tests/test_convert.py::Test::test_cli_structure_text", "tests/test_structure.py::Test::test_structure_tree", "tests/test_structure.py::TestClass::test_all_mcids", "tests/test_structure.py::TestClass::test_element_bbox", "tests/test_structure.py::TestClass::test_find_all_element", "tests/test_structure.py::TestClass::... | ["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te... | jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313 | true | null | 1 | 9 | 16 | 1,112 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215333 | 80.921 | |||
7,749 | swe_smith::train::2171 | swe_smith | train | 2,171 | pdfminer__pdfminer.six.1a8bd2f7.func_basic__gr5p8gfw | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | TextConverter writes to binary output when text output expected
#### Description
When using TextConverter with a text output stream, the converter incorrectly attempts to write binary data instead of text, causing a TypeError.
#### Steps/Code to Reproduce
```python
from pdfminer.converter import TextConverter
from ... | diff --git a/pdfminer/converter.py b/pdfminer/converter.py
index 7563c7a..7da2871 100644
--- a/pdfminer/converter.py
+++ b/pdfminer/converter.py
@@ -337,9 +337,9 @@ class TextConverter(PDFConverter[AnyIO]):
self.imagewriter = imagewriter
def write_text(self, text: str) -> None:
- text = utils.com... | ["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cid_range", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cmap_bytes", "tests/test_highlevel_extracttext.py::TestExtractText::test_iss... | ["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p... | jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7 | true | null | 1 | 6 | 46 | 1,172 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215333 | 80.921 | |||
7,750 | swe_smith::train::52485 | swe_smith | train | 52,485 | pydicom__pydicom.7d361b3d.func_pm_remove_assign__aof6agqo | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | DSdecimal validation error message undefined when string too long
#### Description
When creating a DSdecimal instance with a value that exceeds 16 characters and validation is enabled, a NameError occurs because the error message variable `msg` is not defined.
#### Steps/Code to Reproduce
```python
from decimal imp... | diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py
index c81f96d..ae3b967 100644
--- a/src/pydicom/valuerep.py
+++ b/src/pydicom/valuerep.py
@@ -1207,15 +1207,6 @@ class DSdecimal(Decimal):
if validation_mode != config.IGNORE:
if len(repr(self).strip("'")) > 16:
- msg ... | ["tests/test_valuerep.py::TestDSdecimal::test_string_too_long", "tests/test_valuerep.py::TestDSdecimal::test_string_too_long_raises"] | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 10 | 2 | 1,091 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215167 | 80.9205 | |||
7,751 | swe_smith::train::2962 | swe_smith | train | 2,962 | Suor__funcy.207a7810.combine_file__186umsl2 | swesmith/Suor__funcy.207a7810 | suor/funcy | python | null | Cache decorator returns timestamp instead of cached value
#### Description
The `@cache` decorator is returning timestamps instead of the actual cached values when retrieving items from the cache.
#### Steps/Code to Reproduce
```python
from funcy import cache
@cache(timeout=60)
def add_one(x):
return x + 1
res... | diff --git a/funcy/calc.py b/funcy/calc.py
index 2966bdd..a976412 100644
--- a/funcy/calc.py
+++ b/funcy/calc.py
@@ -83,11 +83,11 @@ class CacheMemory(dict):
self._expires.append(expires_at)
def __getitem__(self, key):
- value, expires_at = dict.__getitem__(self, key)
- if expires_at <= ti... | ["tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_calc.py::test_silnent_lookuper_nested", "tests/test_calc.py::test_cache[int]", "tests/test_calc.py::test_cache[timedelta]", "tests/test_calc.py::test_cache_timedout", "tests/test_calc.py::test_cache_invalidate"] | ["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_silent_lookuper", "tests/test_calc.py::test_cache_mixed_args", "tests/test_colls... | jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810 | true | null | 1 | 22 | 7 | 851 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215167 | 80.9205 | |||
7,752 | swe_smith::train::20037 | swe_smith | train | 20,037 | kurtmckee__feedparser.cad965a3.func_pm_ctrl_shuffle__k9dtqah0 | swesmith/kurtmckee__feedparser.cad965a3 | kurtmckee/feedparser | python | null | Hungarian date parser broken after code reorganization
#### Description
The Hungarian date parser is failing to parse dates correctly. When trying to parse Hungarian date strings, the function raises an `UnboundLocalError` because variables are being used before they are defined.
#### Steps/Code to Reproduce
```pyt... | diff --git a/feedparser/datetimes/hungarian.py b/feedparser/datetimes/hungarian.py
index e75296a..53ae39c 100644
--- a/feedparser/datetimes/hungarian.py
+++ b/feedparser/datetimes/hungarian.py
@@ -51,16 +51,16 @@ _hungarian_date_format_re = re.compile(
def _parse_date_hungarian(date_string):
- """Parse a string... | ["tests/test_ill_formed.py::test_http_conditions[info0]", "tests/test_date_parsers.py::test_date_parser[_parse_date_hungarian--None]", "tests/test_date_parsers.py::test_date_parser[_parse_date_hungarian-2004-j\\xfalius-13T9:15-05:00-expected_value3]"] | ["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 | 16 | 3 | 971 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215167 | 80.9205 | |||
7,753 | swe_smith::train::29555 | swe_smith | train | 29,555 | django__channels.a144b4b8.combine_file__wqas0loz | swesmith/django__channels.a144b4b8 | django/channels | python | null | Channel layer backend caching broken after recent changes
#### Description
The channel layer manager is not properly caching backends anymore. When trying to access a channel layer backend, it returns `None` instead of the configured backend instance.
#### Steps/Code to Reproduce
```python
from channels.layers impo... | diff --git a/channels/layers.py b/channels/layers.py
index 5fc53f7..ffaaf4b 100644
--- a/channels/layers.py
+++ b/channels/layers.py
@@ -74,9 +74,9 @@ class ChannelLayerManager:
return backend_class(**config)
def __getitem__(self, key):
- if key not in self.backends:
+ if key in self.backe... | ["tests/test_generic_websocket.py::test_websocket_consumer_groups", "tests/test_generic_websocket.py::test_async_websocket_consumer_groups", "tests/test_generic_websocket.py::test_async_websocket_consumer_specific_channel_layer", "tests/test_generic_websocket.py::test_block_underscored_type_function_call", "tests/test_... | ["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_generic_websocket.py::test_websocket... | jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8 | true | null | 1 | 14 | 21 | 1,011 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215167 | 80.9205 | |||
7,754 | swe_smith::train::47104 | swe_smith | train | 47,104 | python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__5lhb7k3u | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | Memory channel validation error not raised for invalid max_buffer_size
#### Description
When creating a memory channel with an invalid `max_buffer_size` parameter (non-integer, non-inf value), the validation error is not being raised as expected.
#### Steps/Code to Reproduce
```python
import trio
# This should rai... | diff --git a/src/trio/_channel.py b/src/trio/_channel.py
index 6410d91..0744ecb 100644
--- a/src/trio/_channel.py
+++ b/src/trio/_channel.py
@@ -25,6 +25,9 @@ if TYPE_CHECKING:
def _open_memory_channel(
max_buffer_size: int | float, # noqa: PYI041
) -> tuple[MemorySendChannel[T], MemoryReceiveChannel[T]]:
+ ... | ["src/trio/_tests/test_channel.py::test_channel"] | ["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 | 11 | 1 | 1,071 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215167 | 80.9205 | |||
7,755 | swe_smith::train::48248 | swe_smith | train | 48,248 | sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__pcrd17uq | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | ParseContext._append_terminators returns undefined variables after code reorganization
#### Description
The `_append_terminators` method in `ParseContext` is returning undefined variables `_appended` and `_terminators` due to incorrect code placement. The variable assignments were moved after the return statement, ma... | diff --git a/src/sqlfluff/core/parser/context.py b/src/sqlfluff/core/parser/context.py
index 7edf331..e790c8e 100644
--- a/src/sqlfluff/core/parser/context.py
+++ b/src/sqlfluff/core/parser/context.py
@@ -162,9 +162,6 @@ class ParseContext:
Tuple[int, Tuple["Matchable", ...]]: A tuple containing the
... | ["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[True]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[False]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof_templated", "test/core/parser/grammar/grammar_anyof_test.py::test__pars... | ["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar__oneof__copy", "test/core/parser/grammar/grammar_other_test.py::test__parser__grammar_anything_structure[input_tokens0-terminators0-output_tuple0]", "test/core/parser/grammar/grammar_other_test.py::test__parser__grammar_anything_match[terminators0-... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 7 | 94 | 1,150 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215 | 80.92 | |||
7,756 | swe_smith::train::46612 | swe_smith | train | 46,612 | python-trio__trio.cfbbe2c1.combine_file__ep7kxpvs | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | SSLStream attribute access broken - infinite recursion on attribute lookup
#### Description
SSLStream attribute access is completely broken, causing infinite recursion when trying to access any SSL object attributes. This affects all SSL operations and makes the SSL functionality unusable.
#### Steps/Code to Reprodu... | diff --git a/src/trio/_ssl.py b/src/trio/_ssl.py
index 0a0419f..de2f2ad 100644
--- a/src/trio/_ssl.py
+++ b/src/trio/_ssl.py
@@ -428,8 +428,8 @@ class SSLStream(Stream, Generic[T_Stream]):
self,
name: str,
) -> Any:
- if name in self._forwarded:
- if name in self._after_handshak... | ["src/trio/_tests/test_highlevel_ssl_helpers.py::test_open_ssl_over_tcp_stream_and_everything_else[tls13]", "src/trio/_tests/test_highlevel_ssl_helpers.py::test_open_ssl_over_tcp_stream_and_everything_else[tls12]", "src/trio/_tests/test_socket.py::test_many_sockets", "src/trio/_tests/test_ssl.py::test_ssl_client_basics... | ["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co... | jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1 | true | null | 1 | 6 | 64 | 1,170 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215 | 80.92 | |||
7,757 | swe_smith::train::43198 | swe_smith | train | 43,198 | gawel__pyquery.811cd048.func_pm_remove_assign__sx990ycu | swesmith/gawel__pyquery.811cd048 | gawel/pyquery | python | null | PyQuery initialization fails with TypeError when using basic selectors
#### Description
When creating PyQuery objects with basic HTML selectors, the initialization process fails with a `TypeError: <NoDefault>` error. This affects most basic PyQuery operations including creating objects from HTML strings, using select... | diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py
index 5b05681..fe2ef48 100644
--- a/pyquery/pyquery.py
+++ b/pyquery/pyquery.py
@@ -165,7 +165,6 @@ class PyQuery(list):
def __init__(self, *args, **kwargs):
html = None
elements = []
- self._base_url = None
self.parser = kwargs... | ["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... | ["tests/test_pyquery.py::TestConstruction::test_typeerror_on_invalid_value"] | jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048 | true | null | 1 | 9 | 149 | 1,110 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215 | 80.92 | |||
7,758 | swe_smith::train::30021 | swe_smith | train | 30,021 | getnikola__nikola.0f4c230e.func_pm_remove_assign__uz38h3do | swesmith/getnikola__nikola.0f4c230e | getnikola/nikola | python | null | Development server crashes with NameError when serving sites with base paths
#### Description
The `nikola serve` command fails with a NameError when trying to serve sites that have a base path configured in their BASE_URL. The server starts but crashes when attempting to construct the server URL.
#### Steps/Code to ... | diff --git a/nikola/plugins/command/serve.py b/nikola/plugins/command/serve.py
index 0b2cbac..194d06e 100644
--- a/nikola/plugins/command/serve.py
+++ b/nikola/plugins/command/serve.py
@@ -129,8 +129,6 @@ class CommandServe(Command):
self.serve_pidfile = os.path.abspath('nikolaserve.pid')
os.c... | ["tests/integration/test_dev_server_serve.py::test_serves_root_dir[https://example.org]", "tests/integration/test_dev_server_serve.py::test_serves_root_dir[https://example.org:1234/blog]", "tests/integration/test_dev_server_serve.py::test_serves_root_dir[https://example.org:3456/blog/]", "tests/integration/test_dev_ser... | ["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o... | jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e | true | null | 1 | 11 | 4 | 1,070 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215 | 80.92 | |||
7,759 | swe_smith::train::10193 | swe_smith | train | 10,193 | paramiko__paramiko.23f92003.combine_file__tnug6u6t | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | make_pipe() returns None on Windows platform
#### Description
The `make_pipe()` function in `paramiko/pipe.py` is returning `None` instead of a proper pipe object on Windows systems. This causes AttributeError when trying to use the pipe object.
#### Steps/Code to Reproduce
```python
import paramiko.pipe as pipe
#... | diff --git a/paramiko/pipe.py b/paramiko/pipe.py
index 65944fa..12fec95 100644
--- a/paramiko/pipe.py
+++ b/paramiko/pipe.py
@@ -31,19 +31,19 @@ import socket
def make_pipe():
- if sys.platform[:3] != "win":
+ if sys.platform[:3] == "win":
p = PosixPipe()
else:
p = WindowsPipe()
- r... | ["tests/test_buffered_pipe.py::BufferedPipeTest::test_or_pipe", "tests/test_transport.py::TransportTest::test_select", "tests/test_transport.py::TransportTest::test_select_after_close", "tests/test_transport.py::TransportTest::test_stderr_select", "tests/test_transport.py::ServiceRequestingTransportTest::test_select", ... | ["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag... | jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003 | true | null | 1 | 22 | 7 | 850 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215 | 80.92 | |||
7,760 | swe_smith::train::228 | swe_smith | train | 228 | oauthlib__oauthlib.1fd52536.combine_module__7xlkjmo3 | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OpenID Connect grant types broken after attribute access changes
#### Description
After recent changes to the OpenID Connect grant type base class, accessing attributes on OpenID Connect grant types is failing. The proxy mechanism that forwards attribute access to the underlying OAuth2 grant types appears to be broke... | diff --git a/oauthlib/openid/connect/core/grant_types/base.py b/oauthlib/openid/connect/core/grant_types/base.py
index 29d583e..0db4272 100644
--- a/oauthlib/openid/connect/core/grant_types/base.py
+++ b/oauthlib/openid/connect/core/grant_types/base.py
@@ -17,7 +17,10 @@ class GrantTypeBase:
# proxy_target grant t... | ["tests/oauth2/rfc6749/endpoints/test_metadata.py::MetadataEndpointTest::test_openid_oauth2_preconfigured", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_claims_stored_on_code_creation", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_inval... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 2 | 13 | 164 | 1,030 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215 | 80.92 | |||
7,761 | swe_smith::train::43598 | swe_smith | train | 43,598 | cloudpipe__cloudpickle.6220b0ce.func_basic__mk0k2f36 | swesmith/cloudpipe__cloudpickle.6220b0ce | cloudpipe/cloudpickle | python | null | # Submodule imports broken when using subimport function
I've encountered an issue with the `subimport` function in cloudpickle. When importing submodules, the function incorrectly returns only the top-level module instead of the requested submodule.
## Reproduction
```python
import cloudpickle
import xml.etree.Elem... | diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py
index 8c50ba1..2b0e0c3 100644
--- a/cloudpickle/cloudpickle.py
+++ b/cloudpickle/cloudpickle.py
@@ -454,11 +454,9 @@ def is_tornado_coroutine(func):
def subimport(name):
- # We cannot do simply: `return __import__(name)`: Indeed, if ``name`` i... | ["tests/cloudpickle_test.py::CloudPickleTest::test_import", "tests/cloudpickle_test.py::CloudPickleTest::test_tornado_coroutine", "tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_import", "tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_tornado_coroutine"] | ["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/c... | jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce | true | null | 1 | 6 | 4 | 1,170 | 0 | 0.6 | 1 | 0.75 | 1 | 0.215 | 80.92 | |||
7,762 | swe_smith::train::890 | swe_smith | train | 890 | oauthlib__oauthlib.1fd52536.lm_rewrite__mq7qhqvt | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | BearerToken.estimate_type returns string instead of integer
When using the BearerToken class, the estimate_type method now returns a string ('Bearer') instead of an integer value. Previously, this method would return numeric values (9, 5, or 0) to indicate the confidence level of the token type.
This change breaks co... | diff --git a/oauthlib/oauth2/rfc6749/tokens.py b/oauthlib/oauth2/rfc6749/tokens.py
index 73b8c66..08a75d7 100644
--- a/oauthlib/oauth2/rfc6749/tokens.py
+++ b/oauthlib/oauth2/rfc6749/tokens.py
@@ -342,9 +342,9 @@ class BearerToken(TokenBase):
:param request: OAuthlib request.
:type request: oauthlib.c... | ["tests/oauth2/rfc6749/test_tokens.py::TokenTest::test_estimate_type", "tests/oauth2/rfc6749/test_tokens.py::TokenTest::test_estimate_type_with_fake_header_returns_type_0"] | ["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 | 10 | 2 | 1,089 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214833 | 80.9195 | |||
7,763 | swe_smith::train::46593 | swe_smith | train | 46,593 | python-trio__trio.cfbbe2c1.combine_file__a6g71t3y | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | SSL operations fail with NeedHandshakeError after recent changes
#### Description
SSL streams are throwing `NeedHandshakeError` exceptions when they should be working normally. This affects various SSL operations including protocol selection, channel binding, and certificate retrieval.
#### Steps/Code to Reproduce
... | diff --git a/src/trio/_ssl.py b/src/trio/_ssl.py
index 0a0419f..519bd1f 100644
--- a/src/trio/_ssl.py
+++ b/src/trio/_ssl.py
@@ -205,12 +205,8 @@ STARTING_RECEIVE_SIZE: TFinal = 16384
def _is_eof(exc: BaseException | None) -> bool:
- # There appears to be a bug on Python 3.10, where SSLErrors
- # aren't prop... | ["src/trio/_tests/test_ssl.py::test_SSLStream_generic[tls13-True]", "src/trio/_tests/test_ssl.py::test_ssl_bad_shutdown_but_its_ok[tls13]", "src/trio/_tests/test_ssl.py::test_ssl_https_compatibility_disagreement[tls13]", "src/trio/_tests/test_ssl.py::test_https_mode_eof_before_handshake[tls13]", "src/trio/_tests/test_s... | ["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co... | jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1 | true | null | 1 | 10 | 22 | 1,089 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214833 | 80.9195 | |||
7,764 | swe_smith::train::23379 | swe_smith | train | 23,379 | pyparsing__pyparsing.533adf47.combine_file__b756s2rd | swesmith/pyparsing__pyparsing.533adf47 | pyparsing/pyparsing | python | null | ParseException constructor arguments swapped causing incorrect error reporting
#### Description
When creating ParseException instances, the constructor arguments appear to be getting mixed up, causing incorrect error location reporting and message handling.
#### Steps/Code to Reproduce
```python
import pyparsing as... | diff --git a/pyparsing/exceptions.py b/pyparsing/exceptions.py
index 57a1579..8cad64a 100644
--- a/pyparsing/exceptions.py
+++ b/pyparsing/exceptions.py
@@ -54,13 +54,13 @@ class ParseBaseException(Exception):
elem=None,
):
if msg is None:
- msg, pstr = pstr, ""
+ pstr, msg ... | ["tests/test_simple_unit.py::TestLiteral::runTest", "tests/test_simple_unit.py::TestRepetition::runTest", "tests/test_simple_unit.py::TestWhitespaceMethods::runTest", "tests/test_unit.py::Test02_WithoutPackrat::testEachWithParseFatalException", "tests/test_unit.py::Test02_WithoutPackrat::testEnableDebugOnExpressionWith... | ["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 | 8 | 79 | 1,129 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214833 | 80.9195 | |||
7,765 | swe_smith::train::7748 | swe_smith | train | 7,748 | cantools__cantools.0c6a7871.func_basic__tgr298uo | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | Tester expect method fails with negative timeout values
#### Description
When using the `expect` method in the tester module with timeout values, the method is failing with a `ValueError: 'timeout' must be a non-negative number`. This appears to be happening even when reasonable timeout values are provided.
#### Ste... | diff --git a/src/cantools/tester.py b/src/cantools/tester.py
index c2ad9f2..455d006 100644
--- a/src/cantools/tester.py
+++ b/src/cantools/tester.py
@@ -202,7 +202,7 @@ class Message(UserDict):
def _expect_input_queue(self, signals, timeout, discard_other_messages):
if timeout is not None:
en... | ["tests/test_tester.py::CanToolsTesterTest::test_expect", "tests/test_tester.py::CanToolsTesterTest::test_flush_input"] | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 10 | 2 | 1,089 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214833 | 80.9195 | |||
7,766 | swe_smith::train::26607 | swe_smith | train | 26,607 | pylint-dev__astroid.b114f6b5.lm_rewrite__ons62tzt | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | ### Bug report
**Bug summary**
The `catch` method in `ExceptHandler` seems to have an issue with handling exceptions correctly when multiple `except` blocks are involved.
**Code for reproduction**
Here's a minimal example to reproduce the issue:
```python
try:
def exclusive_func2():
"docstring"
except ... | diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py
index fde3239..bd25243 100644
--- a/astroid/nodes/node_classes.py
+++ b/astroid/nodes/node_classes.py
@@ -2652,14 +2652,19 @@ class ExceptHandler(
return self.lineno
def catch(self, exceptions: list[str] | None) -> bool:
- ... | ["tests/test_utils.py::InferenceUtil::test_try_except"] | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 13 | 1 | 1,029 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214833 | 80.9195 | |||
7,767 | swe_smith::train::31222 | swe_smith | train | 31,222 | scrapy__scrapy.35212ec5.func_pm_class_rm_funcs__b7aoiabc | swesmith/scrapy__scrapy.35212ec5 | scrapy/scrapy | python | null | Crawler.get_downloader_middleware method missing
#### Description
The `Crawler.get_downloader_middleware()` method appears to be missing from the Crawler class. When trying to call this method on a crawler instance, it raises an AttributeError.
#### Steps/Code to Reproduce
```python
from scrapy.crawler import Crawl... | diff --git a/scrapy/crawler.py b/scrapy/crawler.py
index 1ec1e31..7f1655b 100644
--- a/scrapy/crawler.py
+++ b/scrapy/crawler.py
@@ -192,23 +192,6 @@ class Crawler:
"""
return self._get_component(cls, self.addons.addons)
- def get_downloader_middleware(self, cls: type[_T]) -> _T | None:
- ... | ["tests/test_crawler.py::CrawlerTestCase::test_get_downloader_middleware", "tests/test_crawler.py::CrawlerTestCase::test_get_downloader_middleware_no_engine", "tests/test_crawler.py::CrawlerTestCase::test_get_downloader_middleware_not_crawling"] | ["tests/test_crawler.py::CrawlerTestCase::test_crawler_accepts_None", "tests/test_crawler.py::CrawlerTestCase::test_crawler_accepts_dict", "tests/test_crawler.py::CrawlerTestCase::test_crawler_crawl_twice_unsupported", "tests/test_crawler.py::CrawlerTestCase::test_crawler_rejects_spider_objects", "tests/test_crawler.py... | jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5 | true | null | 1 | 18 | 3 | 928 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214667 | 80.919 | |||
7,768 | swe_smith::train::45702 | swe_smith | train | 45,702 | conan-io__conan.86f29e13.func_pm_class_rm_funcs__ap9dg2hs | swesmith/conan-io__conan.86f29e13 | conan-io/conan | python | null | ## Issue: Missing `base_package` Property in Folders Class
### Description
After the recent changes, it seems that the `base_package` property is no longer available in the `Folders` class. This is causing issues when trying to access the base package directory, which is crucial for certain operations that rely on th... | diff --git a/conan/internal/model/layout.py b/conan/internal/model/layout.py
index 5ddacf5..e6ddb38 100644
--- a/conan/internal/model/layout.py
+++ b/conan/internal/model/layout.py
@@ -131,10 +131,6 @@ class Folders(object):
def set_base_build(self, folder):
self._base_build = folder
- @property
- ... | ["test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming_complete", "test/unittests/model/other_settings_test.py::SettingsTest::test_invalid_settings4", "test/unittests/model/other_settings_test.py::SettingsTest::test_settings_as_a_dict_conanfile", "test/unittests/model/other_settings_test.py::Set... | ["test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_new_print", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_new_print_save", "test/unittests/model/info_test.py::test_false_values_affect_none", ... | jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13 | true | null | 1 | 6 | 6 | 1,168 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214667 | 80.919 | |||
7,769 | swe_smith::train::33532 | swe_smith | train | 33,532 | pallets__click.fde47b4b.func_basic__866cda32 | swesmith/pallets__click.fde47b4b | pallets/click | python | null | Binary stream detection broken for already binary streams
When using `click.get_binary_stream()` or similar functions that rely on `_find_binary_writer()`, the function fails to return the stream when it's already a binary stream.
#### Steps/Code to Reproduce
```python
import click
import sys
# This should work but... | diff --git a/src/click/_compat.py b/src/click/_compat.py
index feb8366..9e75ca1 100644
--- a/src/click/_compat.py
+++ b/src/click/_compat.py
@@ -189,21 +189,15 @@ def _find_binary_reader(stream: t.IO[t.Any]) -> t.BinaryIO | None:
def _find_binary_writer(stream: t.IO[t.Any]) -> t.BinaryIO | None:
- # We need to ... | ["tests/test_arguments.py::test_file_args", "tests/test_arguments.py::test_file_atomics", "tests/test_termui.py::test_secho_non_text[test-test]", "tests/test_testing.py::test_runner", "tests/test_testing.py::test_echo_stdin_stream", "tests/test_testing.py::test_runner_with_stream", "tests/test_utils.py::test_echo"] | ["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 | 16 | 7 | 968 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214667 | 80.919 | |||
7,770 | swe_smith::train::782 | swe_smith | train | 782 | oauthlib__oauthlib.1fd52536.func_pm_ctrl_shuffle__rzfjedk4 | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | # UnboundLocalError: local variable 'kwargs' referenced before assignment
When trying to use the `raise_from_error` function in oauthlib, I'm getting an error about a variable being referenced before assignment.
## Steps to reproduce
I'm trying to handle OAuth2 errors in my application:
```python
from oauthlib.oaut... | diff --git a/oauthlib/oauth2/rfc6749/errors.py b/oauthlib/oauth2/rfc6749/errors.py
index 3b41574..28b7d44 100644
--- a/oauthlib/oauth2/rfc6749/errors.py
+++ b/oauthlib/oauth2/rfc6749/errors.py
@@ -386,14 +386,14 @@ class CustomOAuth2Error(OAuth2Error):
def raise_from_error(error, params=None):
- import inspect
... | ["tests/oauth2/rfc6749/test_parameters.py::ParameterTests::test_custom_json_error", "tests/oauth2/rfc6749/test_parameters.py::ParameterTests::test_grant_response", "tests/oauth2/rfc6749/test_parameters.py::ParameterTests::test_json_token_response", "tests/oauth2/rfc6749/test_parameters.py::ParameterTests::test_url_enco... | ["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 | 12 | 4 | 1,048 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214667 | 80.919 | |||
7,771 | r2e_gym::train::6526 | r2e_gym | train | 6,526 | pillow__eb1dbbf787af3b09db48757ff25856678aa43e40 | pillow | python-pillow/pillow | python | eb1dbbf787af3b09db48757ff25856678aa43e40 | **Title:** ICO Image Plugin raises `ValueError` on truncated mask data despite `LOAD_TRUNCATED_IMAGES=True`
**Description:**
When loading an ICO image with a truncated mask, setting `ImageFile.LOAD_TRUNCATED_IMAGES` to `True` does not prevent a `ValueError`. Instead of handling the incomplete mask gracefully, the imag... | diff --git a/src/PIL/IcoImagePlugin.py b/src/PIL/IcoImagePlugin.py
--- a/src/PIL/IcoImagePlugin.py
+++ b/src/PIL/IcoImagePlugin.py
@@ -243,13 +243,19 @@
alpha_bytes = self.buf.read(im.size[0] * im.size[1] * 4)[3::4]
# convert to an 8bpp grayscale image
- mask = Image.f... | diff --git a/Tests/test_file_ico.py b/Tests/test_file_ico.py
--- a/Tests/test_file_ico.py
+++ b/Tests/test_file_ico.py
@@ -6,7 +6,7 @@
import pytest
-from PIL import IcoImagePlugin, Image, ImageDraw
+from PIL import IcoImagePlugin, Image, ImageDraw, ImageFile
from .helper import assert_image_equal, assert_image... | null | null | namanjain12/pillow_final:eb1dbbf787af3b09db48757ff25856678aa43e40 | true | null | 1 | 45 | null | 1,100 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.333333 | 80.91875 | ||
7,772 | swe_smith::train::52413 | swe_smith | train | 52,413 | pydicom__pydicom.7d361b3d.func_pm_ctrl_shuffle__ai21clhv | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | register_transfer_syntax fails when uid parameter is string and encoding arguments provided
#### Description
When calling `register_transfer_syntax` with a string UID and providing both `implicit_vr` and `little_endian` arguments, the function raises an `AttributeError` because it tries to access the `is_transfer_syn... | diff --git a/src/pydicom/uid.py b/src/pydicom/uid.py
index 173a77b..43ea8bd 100644
--- a/src/pydicom/uid.py
+++ b/src/pydicom/uid.py
@@ -464,6 +464,12 @@ def register_transfer_syntax(
implicit_vr: bool | None = None,
little_endian: bool | None = None,
) -> UID:
+
+ if None in (implicit_vr, little_endian) ... | ["tests/test_uid.py::TestRegisterTransferSyntax::test_no_encoding_raises", "tests/test_uid.py::TestRegisterTransferSyntax::test_encoding_str"] | ["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 | 15 | 2 | 987 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2145 | 80.9185 | |||
7,773 | swe_smith::train::27986 | swe_smith | train | 27,986 | jsvine__pdfplumber.02ff4313.func_pm_remove_cond__pg1rkxwm | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | Table extraction fails with tolerance settings not properly resolved
#### Description
When using table extraction with custom tolerance settings, the table parsing fails because tolerance fallback values are not being properly resolved. This affects various table extraction strategies and can cause extraction to retu... | diff --git a/pdfplumber/table.py b/pdfplumber/table.py
index 0ba4445..f205f96 100644
--- a/pdfplumber/table.py
+++ b/pdfplumber/table.py
@@ -536,9 +536,6 @@ class TableSettings:
for attr in ["x_tolerance", "y_tolerance"]:
if attr not in self.text_settings:
self.text_settings[attr]... | ["tests/test_ca_warn_report.py::Test::test_parse", "tests/test_issues.py::Test::test_issue_1181", "tests/test_issues.py::Test::test_issue_140", "tests/test_nics_report.py::Test::test_plain", "tests/test_table.py::Test::test_edges_strict", "tests/test_table.py::Test::test_issue_466_mixed_strategy", "tests/test_table.py:... | ["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te... | jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313 | true | null | 1 | 7 | 10 | 1,147 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2145 | 80.9185 | |||
7,774 | swe_smith::train::48108 | swe_smith | train | 48,108 | sqlfluff__sqlfluff.50a1c4b6.func_pm_class_rm_funcs__lrjsa21n | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | IntermediateFileSlice missing trim_ends method
#### Description
The `IntermediateFileSlice` class is missing the `trim_ends` method, causing AttributeError when trying to call this method on instances.
#### Steps/Code to Reproduce
```python
from sqlfluff.core.templaters.python import IntermediateFileSlice
from sqlf... | diff --git a/src/sqlfluff/core/templaters/python.py b/src/sqlfluff/core/templaters/python.py
index a2126a8..eb2e754 100644
--- a/src/sqlfluff/core/templaters/python.py
+++ b/src/sqlfluff/core/templaters/python.py
@@ -120,23 +120,6 @@ class IntermediateFileSlice(NamedTuple):
)
return new_intermediate, ... | ["test/core/templaters/python_test.py::test__templater_python_intermediate__trim[int_slice0-foo-head_test0-tail_test0-int_test0]", "test/core/templaters/python_test.py::test__templater_python_intermediate__trim[int_slice1-foo-head_test1-tail_test1-int_test1]", "test/core/templaters/python_test.py::test__templater_pytho... | ["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 | 18 | 4 | 927 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2145 | 80.9185 | |||
7,775 | swe_smith::train::25178 | swe_smith | train | 25,178 | pylint-dev__astroid.b114f6b5.combine_module__gfx9qtfa | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Dataclass attribute inference broken after recent changes
#### Description
Dataclass attribute inference is not working correctly. When trying to infer attributes on dataclass instances and classes, the inference is returning unexpected results or failing entirely.
#### Steps/Code to Reproduce
```python
from datacl... | diff --git a/astroid/brain/brain_dataclasses.py b/astroid/brain/brain_dataclasses.py
index 92d983e..243ab11 100644
--- a/astroid/brain/brain_dataclasses.py
+++ b/astroid/brain/brain_dataclasses.py
@@ -465,13 +465,13 @@ def _looks_like_dataclass_attribute(node: nodes.Unknown) -> bool:
"""
parent = node.parent
... | ["tests/brain/test_brain.py::BrainUUIDTest::test_uuid_has_int_member", "tests/brain/test_dataclasses.py::test_inference_attribute_no_default[dataclasses]", "tests/brain/test_dataclasses.py::test_inference_attribute_no_default[pydantic.dataclasses]", "tests/brain/test_dataclasses.py::test_inference_attribute_no_default[... | ["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 | 16 | 24 | 966 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214333 | 80.918 | |||
7,776 | swe_smith::train::43970 | swe_smith | train | 43,970 | pydata__patsy.a5d16484.func_basic__bhvlhoq4 | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | TE tensor product splines fail with "centre" constraint spelling
#### Description
When using tensor product splines with the British spelling "centre" for constraints, the TE class fails with a KeyError. The constraint checking logic appears to be inconsistent between different spelling variants.
#### Steps/Code to ... | diff --git a/patsy/mgcv_cubic_splines.py b/patsy/mgcv_cubic_splines.py
index 5f93680..1349f4b 100644
--- a/patsy/mgcv_cubic_splines.py
+++ b/patsy/mgcv_cubic_splines.py
@@ -951,24 +951,24 @@ class TE(object):
def memorize_chunk(self, *args, **kwargs):
constraints = self._tmp.setdefault("constraints", kw... | ["patsy/mgcv_cubic_splines.py::test_te_errors", "patsy/mgcv_cubic_splines.py::test_te_1smooth", "patsy/mgcv_cubic_splines.py::test_te_2smooths"] | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 18 | 3 | 926 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214333 | 80.918 | |||
7,777 | swe_smith::train::5778 | swe_smith | train | 5,778 | luozhouyang__python-string-similarity.115acaac.func_pm_class_rm_funcs__96brcjir | swesmith/luozhouyang__python-string-similarity.115acaac | luozhouyang/python-string-similarity | python | null | OptimalStringAlignment distance method not implemented
#### Description
The OptimalStringAlignment class is missing its distance method implementation. When trying to calculate string distances, the method doesn't exist.
#### Steps/Code to Reproduce
```python
from strsimpy.optimal_string_alignment import OptimalStr... | diff --git a/strsimpy/optimal_string_alignment.py b/strsimpy/optimal_string_alignment.py
index 8812048..808b3bc 100644
--- a/strsimpy/optimal_string_alignment.py
+++ b/strsimpy/optimal_string_alignment.py
@@ -23,35 +23,4 @@ from .string_distance import StringDistance
class OptimalStringAlignment(StringDistance):
-... | ["strsimpy/optimal_string_alignment_test.py::TestOptimalStringAlignment::test_optimal_string_alignment"] | ["strsimpy/cosine_test.py::TestCosine::test_cosine", "strsimpy/damerau_test.py::TestDamerau::test_damerau", "strsimpy/jaccard_test.py::TestJaccard::test_jaccard", "strsimpy/jaro_winkler_test.py::TestJaroWinkler::test_jarowinkler", "strsimpy/levenshtein_test.py::TestLevenshtein::test_levenshtein", "strsimpy/longest_comm... | jyangballin/swesmith.x86_64.luozhouyang_1776_python-string-similarity.115acaac | true | null | 1 | 33 | 1 | 626 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214333 | 80.918 | |||
7,778 | swe_smith::train::39931 | swe_smith | train | 39,931 | tornadoweb__tornado.d5ac65c1.func_pm_remove_wrapper__tx1o4vdq | swesmith/tornadoweb__tornado.d5ac65c1 | tornadoweb/tornado | python | null | AsyncTestCase.wait() timeout doesn't raise exception anymore
#### Description
When using `AsyncTestCase.wait()` with a timeout, the method no longer raises an exception when the timeout is reached. Instead, it just stops the event loop without signaling that a timeout occurred.
#### Steps/Code to Reproduce
```pytho... | diff --git a/tornado/testing.py b/tornado/testing.py
index 9f54a1e..517bf2b 100644
--- a/tornado/testing.py
+++ b/tornado/testing.py
@@ -334,12 +334,6 @@ class AsyncTestCase(unittest.TestCase):
if timeout:
def timeout_func() -> None:
- try:
- rai... | ["test_wait_timeout (tornado.test.testing_test.AsyncTestCaseTest)"] | ["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header... | jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1 | true | null | 1 | 7 | 1 | 1,146 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214333 | 80.918 | |||
7,779 | swe_smith::train::33156 | swe_smith | train | 33,156 | django-money__django-money.835c1ab8.func_basic__1u92ky7y | swesmith/django-money__django-money.835c1ab8 | django-money/django-money | python | null | money_manager function returns None instead of manager instance
#### Description
When using `money_manager` to patch a custom manager, the function now returns `None` instead of the patched manager instance. This breaks code that expects to use the returned manager object.
#### Steps/Code to Reproduce
```python
fro... | diff --git a/djmoney/models/managers.py b/djmoney/models/managers.py
index d76f0c5..6d0e680 100644
--- a/djmoney/models/managers.py
+++ b/djmoney/models/managers.py
@@ -228,25 +228,16 @@ def money_manager(manager):
Patches a model manager's get_queryset method so that each QuerySet it returns
is able to work ... | ["tests/test_models.py::TestCustomManager::test_method"] | ["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 | 17 | 1 | 946 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214333 | 80.918 | |||
7,780 | r2e_gym::train::5134 | r2e_gym | train | 5,134 | pyramid__636d45bbad90a84048a5e3e8952678d08cb24e96 | pyramid | pylons/pyramid | python | 636d45bbad90a84048a5e3e8952678d08cb24e96 | **Title:** Execution Policy Fails to Render Exception View on Unhandled Exceptions
**Description:**
When an exception occurs during request processing, the execution policy does not render the designated exception view, resulting in unhandled exceptions instead of user-friendly error pages.
**Example Buggy Code:**
``... | diff --git a/pyramid/router.py b/pyramid/router.py
--- a/pyramid/router.py
+++ b/pyramid/router.py
@@ -1,3 +1,4 @@
+import sys
from zope.interface import (
implementer,
providedBy,
@@ -24,6 +25,7 @@
BeforeTraversal,
)
+from pyramid.compat import reraise
from pyramid.httpexceptions import HTTPNot... | diff --git a/pyramid/tests/test_router.py b/pyramid/tests/test_router.py
--- a/pyramid/tests/test_router.py
+++ b/pyramid/tests/test_router.py
@@ -1284,6 +1284,33 @@
self.assertEqual(resp.status_code, 200)
self.assertEqual(resp.body, b'foo')
+ def test_execution_policy_handles_exception(self):
+ ... | null | null | namanjain12/pyramid_final:636d45bbad90a84048a5e3e8952678d08cb24e96 | true | null | 1 | 14 | null | 1,718 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.333 | 80.91775 | ||
7,781 | swe_bench::test::1059 | swe_bench | test | 1,059 | matplotlib__matplotlib-24971 | matplotlib/matplotlib | matplotlib/matplotlib | python | a3011dfd1aaa2487cce8aa7369475533133ef777 | [Bug]: compressed layout setting can be forgotten on second save
### Bug summary
I'm not sure whether this is really a bug or I'm just using an inconsistent combination of options. Under some specific circumstances (see below) compressed layout is not applied the second time a figure is saved.
### Code for reproduct... | Yeah we do some dancing around when we save with bbox inches - so this seems to get caught in that. I tried to track it down, but the figure-saving stack is full of context managers, and I can't see where the layout manager gets reset. Hopefully someone more cognizant of that part of the codebase can explain.
Than... | diff --git a/lib/matplotlib/_tight_bbox.py b/lib/matplotlib/_tight_bbox.py
--- a/lib/matplotlib/_tight_bbox.py
+++ b/lib/matplotlib/_tight_bbox.py
@@ -17,8 +17,6 @@ def adjust_bbox(fig, bbox_inches, fixed_dpi=None):
"""
origBbox = fig.bbox
origBboxInches = fig.bbox_inches
- orig_layout = fig.get_layou... | diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
--- a/lib/matplotlib/tests/test_figure.py
+++ b/lib/matplotlib/tests/test_figure.py
@@ -532,6 +532,13 @@ def test_savefig_pixel_ratio(backend):
assert ratio1 == ratio2
+def test_savefig_preserve_layout_engine(tmp_path):
+ ... | ["lib/matplotlib/tests/test_figure.py::test_savefig_preserve_layout_engine"] | ["lib/matplotlib/tests/test_figure.py::test_align_labels[png]", "lib/matplotlib/tests/test_figure.py::test_align_labels_stray_axes", "lib/matplotlib/tests/test_figure.py::test_figure_label", "lib/matplotlib/tests/test_figure.py::test_fignum_exists", "lib/matplotlib/tests/test_figure.py::test_clf_keyword", "lib/matplotl... | null | true | 2023-01-13T14:32:35Z | 1 | 3 | 1 | 1,975 | 0 | 0.8 | 1 | 0.7 | 0.8 | 0.339167 | 80.9175 | |
7,782 | swe_smith::train::49112 | swe_smith | train | 49,112 | mozilla__bleach.73871d76.combine_file__dy5wn8zl | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | TreeBuilder initialization causes AttributeError in HTML parsing
#### Description
When using bleach to clean or linkify HTML content, operations fail with AttributeError because the TreeBuilder is incorrectly initialized. The document property becomes None and element creation returns None instead of proper element o... | diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py
index 2869da0..1f0d06a 100644
--- a/bleach/_vendor/html5lib/treebuilders/base.py
+++ b/bleach/_vendor/html5lib/treebuilders/base.py
@@ -185,13 +185,13 @@ class TreeBuilder(object):
self.openElements = []
... | ["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 16 | 183 | 965 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214167 | 80.9175 | |||
7,783 | swe_smith::train::2864 | swe_smith | train | 2,864 | pudo__dataset.5c2dc8d3.func_pm_ctrl_shuffle__pswkwm97 | swesmith/pudo__dataset.5c2dc8d3 | pudo/dataset | python | null | Column name validation broken for non-string types
#### Description
Column name validation is not working properly when non-string column names are passed. The function returns early without performing proper validation checks.
#### Steps/Code to Reproduce
```python
import dataset
# Connect to database
db = datase... | diff --git a/dataset/util.py b/dataset/util.py
index 4fa225d..a66b2a7 100644
--- a/dataset/util.py
+++ b/dataset/util.py
@@ -112,20 +112,19 @@ class ResultIter(object):
def normalize_column_name(name):
"""Check if a string is a reasonable thing to use as a column name."""
- if not isinstance(name, str):
- ... | ["test/test_dataset.py::TableTestCase::test_invalid_column_names", "test/test_dataset.py::TableTestCase::test_weird_column_names"] | ["test/test_dataset.py::DatabaseTestCase::test_contains", "test/test_dataset.py::DatabaseTestCase::test_create_table", "test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id1", "test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id2", "test/test_dataset.py::DatabaseTestCase::test_create_tabl... | jyangballin/swesmith.x86_64.pudo_1776_dataset.5c2dc8d3 | true | null | 1 | 11 | 2 | 1,065 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214167 | 80.9175 | |||
7,784 | swe_smith::train::9990 | swe_smith | train | 9,990 | google__textfsm.c31b6007.func_basic__ljj8tt1x | swesmith/google__textfsm.c31b6007 | google/textfsm | python | null | OnCreateOptions method calls undefined methods causing AttributeError
#### Description
The `OnCreateOptions` method in `TextFSMOptions` class is calling several undefined methods that don't exist in the class, causing `AttributeError` exceptions when parsing TextFSM templates.
#### Steps/Code to Reproduce
```python... | diff --git a/textfsm/parser.py b/textfsm/parser.py
index c00c976..6161d91 100755
--- a/textfsm/parser.py
+++ b/textfsm/parser.py
@@ -93,6 +93,14 @@ class TextFSMOptions(object):
def OnCreateOptions(self):
"""Called after all options have been parsed for a Value."""
+ options_list = self.retrieve_opti... | ["tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testKeyValue", "tests/clitable_test.py::UnitTestCliTable::testParseCmd", "tests/clitable_test.py::UnitTestCliTable::testParseCmdItem", "tests/clitable_test.py::UnitTestCliTable::testParseWithMultiTemplates", "tests/clita... | ["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.py::UnitTestCliTable::testCompletion", "tests/clitable_te... | jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007 | true | null | 1 | 8 | 19 | 1,125 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214167 | 80.9175 | |||
7,785 | swe_smith::train::47985 | swe_smith | train | 47,985 | sqlfluff__sqlfluff.50a1c4b6.func_basic__oyatklkb | 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 AttributeError exceptions when the code tries to access properties of the anchor segment.
... | diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py
index 1f00fb3..8abf7fa 100644
--- a/src/sqlfluff/core/rules/base.py
+++ b/src/sqlfluff/core/rules/base.py
@@ -138,9 +138,9 @@ class LintResult:
def to_linting_error(self, rule: "BaseRule") -> Optional[SQLLintError]:
"""Conver... | ["test/core/rules/docstring_test.py::test_backtick_replace", "test/core/rules/noqa_test.py::test__linter__raises_malformed_noqa", "test/core/rules/noqa_test.py::test_linter_noqa", "test/core/rules/noqa_test.py::test_linter_noqa_tmp", "test/core/rules/noqa_test.py::test_linter_noqa_disable", "test/core/rules/noqa_test.p... | ["test/core/rules/docstring_test.py::test_content_count[\\\\*\\\\*Anti-pattern\\\\*\\\\*-1]", "test/core/rules/docstring_test.py::test_keyword_anti_before_best", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input0-True]", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 11 | 8 | 1,065 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214167 | 80.9175 | |||
7,786 | swe_smith::train::20088 | swe_smith | train | 20,088 | kurtmckee__feedparser.cad965a3.func_pm_remove_assign__bbtyw6b6 | swesmith/kurtmckee__feedparser.cad965a3 | kurtmckee/feedparser | python | null | W3DTF date parsing fails with UnboundLocalError
#### Description
The W3DTF date parser is throwing `UnboundLocalError` when trying to parse dates. This appears to be affecting multiple date formats and causing widespread parsing failures.
#### Steps/Code to Reproduce
```python
import feedparser
from feedparser.date... | diff --git a/feedparser/datetimes/w3dtf.py b/feedparser/datetimes/w3dtf.py
index cf63f9d..5dbf166 100644
--- a/feedparser/datetimes/w3dtf.py
+++ b/feedparser/datetimes/w3dtf.py
@@ -61,7 +61,6 @@ timezonenames = {
def _parse_date_w3dtf(datestr):
if not datestr.strip():
return None
- parts = datestr.low... | ["tests/test_well_formed.py::test_http_conditions[info4]", "tests/test_well_formed.py::test_strict_parser[info1568]", "tests/test_well_formed.py::test_strict_parser[info1350]", "tests/test_well_formed.py::test_strict_parser[info85]", "tests/test_well_formed.py::test_loose_parser[info1267]", "tests/test_well_formed.py::... | ["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te... | jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3 | true | null | 1 | 10 | 158 | 1,085 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214167 | 80.9175 | |||
7,787 | swe_smith::train::28748 | swe_smith | train | 28,748 | encode__starlette.db5063c2.func_pm_class_rm_funcs__26gqk1cx | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | MultiDict missing setlist and update methods
#### Description
The `MultiDict` class is missing the `setlist` and `update` methods that are expected to be available. When trying to use these methods, an AttributeError is raised.
#### Steps/Code to Reproduce
```python
from starlette.datastructures import MultiDict
#... | diff --git a/starlette/datastructures.py b/starlette/datastructures.py
index 90a7296..9a6e0ab 100644
--- a/starlette/datastructures.py
+++ b/starlette/datastructures.py
@@ -347,29 +347,10 @@ class MultiDict(ImmutableMultiDict[typing.Any, typing.Any]):
return self[key]
- def setlist(self, key: typing.Any... | ["tests/test_datastructures.py::test_url_query_params", "tests/test_datastructures.py::test_multidict"] | ["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 | 19 | 2 | 904 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214 | 80.917 | |||
7,788 | swe_smith::train::20910 | swe_smith | train | 20,910 | tobymao__sqlglot.036601ba.func_pm_remove_assign__pnboh4h1 | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | BigQuery identifier case sensitivity logic broken after recent changes
#### Description
The BigQuery dialect's identifier case sensitivity handling appears to be broken. When parsing SQL with identifiers, a `NameError` is raised because the variable `case_sensitive` is referenced but not defined.
#### Steps/Code to ... | diff --git a/sqlglot/dialects/bigquery.py b/sqlglot/dialects/bigquery.py
index 6d39231..3c565de 100644
--- a/sqlglot/dialects/bigquery.py
+++ b/sqlglot/dialects/bigquery.py
@@ -444,26 +444,11 @@ class BigQuery(Dialect):
):
parent = expression.parent
while isinstance(parent, exp.Dot):
... | ["tests/dialects/test_bigquery.py::TestBigQuery::test_bigquery", "tests/dialects/test_bigquery.py::TestBigQuery::test_gap_fill", "tests/dialects/test_bigquery.py::TestBigQuery::test_inline_constructor", "tests/dialects/test_bigquery.py::TestBigQuery::test_models", "tests/dialects/test_bigquery.py::TestBigQuery::test_nu... | ["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 17 | 17 | 944 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214 | 80.917 | |||
7,789 | swe_smith::train::18953 | swe_smith | train | 18,953 | seperman__deepdiff.ed252022.func_basic__y8bo68lh | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | CacheNode initialization parameters incorrectly assigned
#### Description
The CacheNode constructor in lfucache.py has incorrect parameter assignments that cause cache functionality to break. When creating cache nodes, the parameters are being assigned to wrong attributes, leading to unexpected behavior in caching op... | diff --git a/deepdiff/lfucache.py b/deepdiff/lfucache.py
index 3aa168a..8731d94 100644
--- a/deepdiff/lfucache.py
+++ b/deepdiff/lfucache.py
@@ -13,14 +13,14 @@ from deepdiff.helper import not_found, dict_, SetOrdered
class CacheNode:
def __init__(self, key, report_type, value, freq_node, pre, nxt):
self... | ["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_overlap", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_distance.py::TestDeepDistance::test_get_distance_works_event_when_ignore_order_and_differe... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 12 | 12 | 1,044 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214 | 80.917 | |||
7,790 | swe_smith::train::10256 | swe_smith | train | 10,256 | paramiko__paramiko.23f92003.func_basic__1xeor9sf | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | Public key authentication fails with TypeError after recent changes
#### Description
Public key authentication is broken and raises a `TypeError: object of type 'NoneType' has no attribute` error when attempting to authenticate with SSH keys.
#### Steps/Code to Reproduce
```python
import paramiko
from paramiko impo... | diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py
index bc7f298..0d112d1 100644
--- a/paramiko/auth_handler.py
+++ b/paramiko/auth_handler.py
@@ -122,10 +122,10 @@ class AuthHandler:
def auth_publickey(self, username, key, event):
self.transport.lock.acquire()
try:
- sel... | ["tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::SHA2SignaturePubkeys::pubkey_auth_honors_disabled_algorithms", "tests/auth.py::SHA2SignaturePubkeys::client_sha2_disabled_server_sha1_disabled_no_match", "tests/auth.py::SHA2SignaturePubkeys::client_sha1_disabled_server_sha2_disabled_no_match", "tests/auth... | ["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 | 6 | 22 | 1,164 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214 | 80.917 | |||
7,791 | swe_smith::train::12907 | swe_smith | train | 12,907 | python-openxml__python-docx.0cf6d71f.combine_file__o5i4caut | swesmith/python-openxml__python-docx.0cf6d71f | python-openxml/python-docx | python | null | Package unmarshalling fails with KeyError when accessing parts by partname
#### Description
When opening a docx file, the package unmarshalling process fails with a KeyError. This appears to be related to how parts are stored and accessed during the unmarshalling process.
#### Steps/Code to Reproduce
```python
from... | diff --git a/src/docx/opc/package.py b/src/docx/opc/package.py
index 3b1eef2..c7f6e32 100644
--- a/src/docx/opc/package.py
+++ b/src/docx/opc/package.py
@@ -190,11 +190,11 @@ class Unmarshaller:
Package relationships are added to `pkg`.
"""
- parts = Unmarshaller._unmarshal_parts(pkg_reader, ... | ["tests/opc/test_package.py::DescribeUnmarshaller::it_can_unmarshal_from_a_pkg_reader", "tests/opc/test_package.py::DescribeUnmarshaller::it_can_unmarshal_parts", "tests/test_blkcntnr.py::DescribeBlockItemContainer::it_can_iterate_its_inner_content", "tests/test_package.py::DescribePackage::it_gathers_package_image_par... | ["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows... | jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f | true | null | 1 | 13 | 5 | 1,024 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214 | 80.917 | |||
7,792 | swe_smith::train::32749 | swe_smith | train | 32,749 | pydantic__pydantic.acb0f10f.func_pm_remove_wrapper__xsjsvoxd | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | JSON schema generation fails for discriminated unions with aliased fields
#### Description
When generating JSON schemas for discriminated unions where the discriminator field uses an alias, the schema generation process fails with a KeyError. This occurs because the code attempts to access properties using the alias ... | diff --git a/pydantic/json_schema.py b/pydantic/json_schema.py
index ca031ea..ce71cc4 100644
--- a/pydantic/json_schema.py
+++ b/pydantic/json_schema.py
@@ -1264,14 +1264,6 @@ class GenerateJsonSchema:
continue # this means that the "alias" does not represent a field
alias_is_pres... | ["tests/test_docs.py::test_docstrings_examples[pydantic/json_schema.py:2586-2620]", "tests/test_json_schema.py::test_alias_same"] | ["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_... | jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f | true | null | 1 | 9 | 2 | 1,104 | 0 | 0.6 | 1 | 0.75 | 1 | 0.214 | 80.917 | |||
7,793 | swe_smith::train::47325 | swe_smith | train | 47,325 | sqlfluff__sqlfluff.50a1c4b6.combine_file__0rozfmz9 | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | Simple API functions returning incorrect results or empty strings
#### Description
The simple API functions `lint()` and `fix()` are not working correctly. The `lint()` function appears to be accessing the wrong index in result records, and the `fix()` function is returning empty strings instead of the fixed SQL.
##... | diff --git a/src/sqlfluff/api/simple.py b/src/sqlfluff/api/simple.py
index 1d91187..bd79da7 100644
--- a/src/sqlfluff/api/simple.py
+++ b/src/sqlfluff/api/simple.py
@@ -96,7 +96,7 @@ def lint(
result = linter.lint_string_wrapped(sql)
result_records = result.as_records()
# Return just the violations for t... | ["test/api/simple_test.py::test__api__lint_string_without_violations", "test/api/simple_test.py::test__api__lint_string", "test/api/simple_test.py::test__api__lint_string_specific", "test/api/simple_test.py::test__api__lint_string_specific_single", "test/api/simple_test.py::test__api__lint_string_specific_exclude", "te... | ["test/api/simple_test.py::test__api__parse_string", "test/api/simple_test.py::test__api__parse_fail", "test/api/simple_test.py::test__api__config_path", "test/api/simple_test.py::test__api__invalid_dialect", "test/api/simple_test.py::test__api__parse_exceptions"] | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 18 | 14 | 923 | 0 | 0.6 | 1 | 0.75 | 1 | 0.213833 | 80.9165 | |||
7,794 | swe_smith::train::24166 | swe_smith | train | 24,166 | sunpy__sunpy.f8edfd5c.func_pm_op_swap__5jq5ec8f | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | TimeSeries plotting methods raise ZeroDivisionError when no columns present
#### Description
When attempting to display or plot a TimeSeries object that has no data columns, the plotting and HTML representation methods fail with a `ZeroDivisionError: integer modulo by zero`.
#### Steps/Code to Reproduce
```python
i... | diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py
index 80e5d20..abe73f1 100644
--- a/sunpy/timeseries/timeseriesbase.py
+++ b/sunpy/timeseries/timeseriesbase.py
@@ -300,7 +300,7 @@ class GenericTimeSeries:
axs.plot(
dat.index,
... | ["sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html", "sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html_", "sunpy/timeseries/tests/test_timeseriesbase.py::test_quicklook"] | ["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 11 | 3 | 1,063 | 0 | 0.6 | 1 | 0.75 | 1 | 0.213833 | 80.9165 | |||
7,795 | swe_smith::train::28910 | swe_smith | train | 28,910 | encode__starlette.db5063c2.lm_rewrite__eyotssxh | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | HTTP 304 Not Modified responses should have empty bodies
Description
When returning a 304 Not Modified response, the response body should be empty. However, with the current implementation, the response includes the detail text in the body.
To reproduce:
```python
from starlette.applications import Starlette
from s... | diff --git a/starlette/middleware/exceptions.py b/starlette/middleware/exceptions.py
index d708929..2ca93c7 100644
--- a/starlette/middleware/exceptions.py
+++ b/starlette/middleware/exceptions.py
@@ -62,11 +62,14 @@ class ExceptionMiddleware:
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, ... | ["tests/test_exceptions.py::test_not_modified[asyncio]", "tests/test_exceptions.py::test_not_modified[trio]"] | ["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 | 11 | 2 | 1,063 | 0 | 0.6 | 1 | 0.75 | 1 | 0.213833 | 80.9165 | |||
7,796 | swe_smith::train::26077 | swe_smith | train | 26,077 | pylint-dev__astroid.b114f6b5.func_basic__ww5vy4b8 | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | MatchMapping constructor swaps keys and patterns parameters
#### Description
The `MatchMapping` node constructor incorrectly assigns the `keys` parameter to `self.patterns` and the `patterns` parameter to `self.keys`, causing the attributes to be swapped.
#### Steps/Code to Reproduce
```python
import astroid
import... | diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py
index fde3239..dfdbc2d 100644
--- a/astroid/nodes/node_classes.py
+++ b/astroid/nodes/node_classes.py
@@ -5266,9 +5266,9 @@ class MatchMapping(_base_nodes.AssignTypeNode, Pattern):
patterns: list[Pattern],
rest: AssignName | No... | ["tests/test_nodes.py::TestPatternMatching::test_match_mapping", "tests/test_nodes_lineno.py::TestLinenoColOffset::test_end_lineno_match"] | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 6 | 2 | 1,163 | 0 | 0.6 | 1 | 0.75 | 1 | 0.213833 | 80.9165 | |||
7,797 | swe_smith::train::36669 | swe_smith | train | 36,669 | lincolnloop__python-qrcode.456b01d4.func_pm_ctrl_shuffle__77e97q4e | swesmith/lincolnloop__python-qrcode.456b01d4 | lincolnloop/python-qrcode | python | null | QRData initialization fails when mode is provided before data conversion
When creating a QRData instance with an explicit mode parameter, the code attempts to call `optimal_mode(data)` before the data has been converted to a bytestring, causing a TypeError.
#### Steps/Code to Reproduce
```python
import qrcode
from q... | diff --git a/qrcode/util.py b/qrcode/util.py
index 02fe11d..bbbbfbc 100644
--- a/qrcode/util.py
+++ b/qrcode/util.py
@@ -421,12 +421,6 @@ class QRData:
"""
def __init__(self, data, mode=None, check_data=True):
- """
- If ``mode`` isn't provided, the most compact QR data type possible is
- ... | ["qrcode/tests/test_qrcode.py::test_add_qrdata", "qrcode/tests/test_qrcode.py::test_mode_alpha", "qrcode/tests/test_qrcode.py::test_regression_mode_comma", "qrcode/tests/test_qrcode.py::test_mode_8bit", "qrcode/tests/test_qrcode.py::test_mode_8bit_newline", "qrcode/tests/test_qrcode.py::test_optimize_size"] | ["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_f... | jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4 | true | null | 1 | 13 | 6 | 1,022 | 0 | 0.6 | 1 | 0.75 | 1 | 0.213667 | 80.916 | |||
7,798 | swe_smith::train::42266 | swe_smith | train | 42,266 | scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__zqvem6ic | swesmith/scanny__python-pptx.278b47b1 | scanny/python-pptx | python | null | Font.underline property returns undefined variable instead of underline value
#### Description
The Font.underline property is broken and returns an undefined variable `u` instead of the actual underline setting. This causes a NameError when trying to access the underline property of any Font object.
#### Steps/Code ... | diff --git a/src/pptx/text/text.py b/src/pptx/text/text.py
index e139410..84014ba 100644
--- a/src/pptx/text/text.py
+++ b/src/pptx/text/text.py
@@ -398,6 +398,10 @@ class Font(object):
@property
def underline(self) -> bool | MSO_TEXT_UNDERLINE_TYPE | None:
+ return u
+ if u is MSO_UNDERLINE.S... | ["tests/text/test_text.py::DescribeFont::it_knows_its_underline_setting[underline_get_fixture0]", "tests/text/test_text.py::DescribeFont::it_knows_its_underline_setting[underline_get_fixture1]", "tests/text/test_text.py::DescribeFont::it_knows_its_underline_setting[underline_get_fixture2]", "tests/text/test_text.py::De... | ["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 | 9 | 4 | 1,102 | 0 | 0.6 | 1 | 0.75 | 1 | 0.213667 | 80.916 | |||
7,799 | swe_smith::train::49442 | swe_smith | train | 49,442 | mozilla__bleach.73871d76.func_pm_ctrl_shuffle__oub7xgz6 | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | urlparse function broken after recent changes
#### Description
The `urlparse` function in `bleach._vendor.parse` is throwing `UnboundLocalError: local variable 'result' referenced before assignment` when trying to parse URLs.
#### Steps/Code to Reproduce
```python
from bleach._vendor.parse import urlparse
# This s... | diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py
index ac6e7a9..1a9f608 100644
--- a/bleach/_vendor/parse.py
+++ b/bleach/_vendor/parse.py
@@ -362,21 +362,20 @@ _fix_result_transcoding()
del _fix_result_transcoding
def urlparse(url, scheme='', allow_fragments=True):
- """Parse a URL into 6 componen... | ["tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_disallowed_attr", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_invalid_filter_attr", "tests/test_clean.py::test_poster_attribute", "tests/test_clean.py::test_attributes_wildcard", "tests/test_clean.p... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 19 | 24 | 902 | 0 | 0.6 | 1 | 0.75 | 1 | 0.213667 | 80.916 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.