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
4,900
swe_smith::train::43668
swe_smith
train
43,668
cloudpipe__cloudpickle.6220b0ce.lm_rewrite__m6ptvs4s
swesmith/cloudpipe__cloudpickle.6220b0ce
cloudpipe/cloudpickle
python
null
### Issue: Unexpected Behavior in Dynamic Module Loading #### Describe the Bug After applying the recent changes, there seems to be an issue with loading dynamic modules. Specifically, when attempting to load a module from a pickle file, the function `f` within the module does not behave as expected. The function app...
diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py index 8c50ba1..5ca8c1b 100644 --- a/cloudpickle/cloudpickle.py +++ b/cloudpickle/cloudpickle.py @@ -1121,31 +1121,29 @@ def _function_setstate(obj, state): setattr on items of the slotstate. Instead, we have to modify them inplace. """ ...
["tests/cloudpickle_test.py::CloudPickleTest::test_deterministic_dynamic_class_attr_ordering_for_chained_pickling", "tests/cloudpickle_test.py::CloudPickleTest::test_deterministic_str_interning_for_chained_dynamic_class_pickling", "tests/cloudpickle_test.py::CloudPickleTest::test_dynamic_class_determinist_subworker_tup...
["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
46
27
1,139
0
0.6
1
0.75
1
0.343167
81.3045
4,901
r2e_gym::train::5457
r2e_gym
train
5,457
aiohttp__8e330d4c28e115858abbe9900c76e73c9efab71a
aiohttp
aio-libs/aiohttp
python
8e330d4c28e115858abbe9900c76e73c9efab71a
**Analysis:** - **Key Parts:** - **Commit Message:** "Add FormData validation at the add_field method." - **Commit Patch:** Added type checks for `filename`, `content_type`, and `content_transfer_encoding` in the `add_field` method to ensure they are instances of `str`. Raises `TypeError` if not. - **Test Result...
diff --git a/aiohttp/helpers.py b/aiohttp/helpers.py --- a/aiohttp/helpers.py +++ b/aiohttp/helpers.py @@ -68,6 +68,9 @@ self._is_multipart = True type_options = multidict.MultiDict({'name': name}) + if filename is not None and not isinstance(filename, str): + raise TypeError('...
diff --git a/tests/test_helpers.py b/tests/test_helpers.py --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -62,6 +62,15 @@ with self.assertRaises(TypeError): helpers.FormData('as') # 2-char str is not allowed + def test_invalid_formdata_fields(self): + form = helpers.FormDa...
null
null
namanjain12/aiohttp_final:8e330d4c28e115858abbe9900c76e73c9efab71a
true
null
1
9
null
2,591
0
0.75
1
0.6375
1
0.461833
81.30425
4,902
swe_smith::train::46587
swe_smith
train
46,587
python-trio__trio.cfbbe2c1.combine_file__9hp31r1n
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
ThreadCache initialization broken - AttributeError on thread operations #### Description When trying to use thread-related functionality in trio, I'm getting `AttributeError: 'NoneType' object has no attribute` errors. This seems to affect all operations that involve worker threads. #### Steps/Code to Reproduce ```...
diff --git a/src/trio/_core/_thread_cache.py b/src/trio/_core/_thread_cache.py index 189d5a5..798303f 100644 --- a/src/trio/_core/_thread_cache.py +++ b/src/trio/_core/_thread_cache.py @@ -30,10 +30,8 @@ def get_os_thread_name_func() -> Callable[[int | None, str], None] | None: ident: int | None, name...
["src/trio/_core/_tests/test_guest_mode.py::test_host_can_directly_wake_trio_task", "src/trio/_core/_tests/test_guest_mode.py::test_host_altering_deadlines_wakes_trio_up", "src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_sniffio_integration", "src/trio/_core/_tests/test_guest_mode.py::test_host_wakeup_doesnt_...
["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
58
141
898
0
0.6
1
0.75
1
0.343
81.304
4,903
swe_smith::train::43563
swe_smith
train
43,563
cloudpipe__cloudpickle.6220b0ce.func_basic__0lun00yt
swesmith/cloudpipe__cloudpickle.6220b0ce
cloudpipe/cloudpickle
python
null
# Functions with keyword-only arguments fail to unpickle correctly ## Describe the bug When using cloudpickle to pickle and unpickle functions with keyword-only arguments, the unpickled function fails with a TypeError indicating a missing required keyword-only argument. ## Steps to Reproduce ```python import cloudp...
diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py index 8c50ba1..7b5ac25 100644 --- a/cloudpickle/cloudpickle.py +++ b/cloudpickle/cloudpickle.py @@ -812,29 +812,17 @@ def _enum_getstate(obj): def _code_reduce(obj): """code object reducer.""" - # If you are not sure about the order of argu...
["tests/cloudpickle_test.py::CloudPickleTest::test_NamedTuple", "tests/cloudpickle_test.py::CloudPickleTest::test_abc", "tests/cloudpickle_test.py::CloudPickleTest::test_abstracts", "tests/cloudpickle_test.py::CloudPickleTest::test_bound_classmethod", "tests/cloudpickle_test.py::CloudPickleTest::test_classmethod", "tes...
["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/c...
jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce
true
null
1
33
130
1,398
0
0.6
1
0.75
1
0.343
81.304
4,904
swe_smith::train::27097
swe_smith
train
27,097
tkrajina__gpxpy.09fc46b3.func_pm_class_rm_funcs__rovqwwai
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPXTrackPoint missing time_difference and remove_time methods #### Description After recent changes, `GPXTrackPoint` objects are missing the `time_difference` and `remove_time` methods, causing `AttributeError` when trying to use these methods. #### Steps/Code to Reproduce ```python import gpxpy import datetime # ...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..68bf564 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -573,39 +573,6 @@ class GPXTrackPoint(mod_geo.Location): if self.time: self.time += delta - def remove_time(self) -> None: - """ Will remove time metadata. """ - self....
["test.py::GPXTests::test_add_missing_speeds", "test.py::GPXTests::test_raw_max_speed", "test.py::GPXTests::test_remove_time_all", "test.py::GPXTests::test_remove_time_tracks_only", "test.py::GPXTests::test_subsecond_speed", "test.py::GPXTests::test_time_difference"]
["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
34
6
1,377
0
0.6
1
0.75
1
0.342833
81.3035
4,905
swe_smith::train::45216
swe_smith
train
45,216
dask__dask.5f61e423.combine_module__4eg85nr1
swesmith/dask__dask.5f61e423
dask/dask
python
null
FromArray class missing partition filtering functionality #### Description When using `dd.from_array()` to create DataFrames from arrays, the resulting objects are missing partition filtering capabilities. This causes a `TypeError: 'NoneType' object is not callable` when trying to perform operations that rely on part...
diff --git a/dask/dataframe/dask_expr/io/io.py b/dask/dataframe/dask_expr/io/io.py index ab41615..21227e1 100644 --- a/dask/dataframe/dask_expr/io/io.py +++ b/dask/dataframe/dask_expr/io/io.py @@ -612,7 +612,7 @@ class FromScalars(IO): ) -class FromArray(PartitionsFiltered, BlockwiseIO): +class FromArr...
["dask/dataframe/io/tests/test_io.py::test_from_array", "dask/dataframe/io/tests/test_io.py::test_from_array_with_record_dtype", "dask/dataframe/io/tests/test_io.py::test_from_dask_array_compat_numpy_array", "dask/dataframe/io/tests/test_io.py::test_from_array_with_column_names", "dask/dataframe/io/tests/test_io.py::te...
["dask/dataframe/io/tests/test_io.py::test_meta_from_array", "dask/dataframe/io/tests/test_io.py::test_meta_from_1darray", "dask/dataframe/io/tests/test_io.py::test_meta_from_recarray", "dask/dataframe/io/tests/test_io.py::test_from_pandas_dataframe", "dask/dataframe/io/tests/test_io.py::test_from_pandas_small", "dask/...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
2
52
19
1,017
0
0.6
1
0.75
1
0.342833
81.3035
4,906
swe_smith::train::31152
swe_smith
train
31,152
scrapy__scrapy.35212ec5.combine_file__n0nmcrn3
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
Unexpected behavior in Crawler initialization I've encountered an issue with the Crawler class initialization after the recent changes. It seems that the order of attribute assignments has been altered, which is causing some unexpected behavior. Here's a simple way to reproduce the issue: ```python from scrapy.crawl...
diff --git a/scrapy/crawler.py b/scrapy/crawler.py index 1ec1e31..af7ab27 100644 --- a/scrapy/crawler.py +++ b/scrapy/crawler.py @@ -59,31 +59,30 @@ class Crawler: settings: dict[str, Any] | Settings | None = None, init_reactor: bool = False, ): + self.spider: Spider | None = 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::CrawlerLoggingTestCase::test_spider_custom_setting...
["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
52
33
1,017
0
0.6
1
0.75
1
0.342833
81.3035
4,907
swe_smith::train::3243
swe_smith
train
3,243
Suor__funcy.207a7810.lm_rewrite__7qswkxro
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
### Bug Report: `autocurry` Function Fails with Specific Argument Combinations **Bug Summary** The `autocurry` function seems to be misbehaving when handling certain combinations of named and keyword arguments. This issue arises when the function is expected to handle various argument types but fails to do so correct...
diff --git a/funcy/funcs.py b/funcy/funcs.py index 0a235bb..5d8ff9e 100644 --- a/funcy/funcs.py +++ b/funcy/funcs.py @@ -73,22 +73,18 @@ def autocurry(func, n=EMPTY, _spec=None, _args=(), _kwargs={}): @wraps(func) def autocurried(*a, **kw): + """A function returning its partial applications until suf...
["tests/test_funcs.py::test_autocurry_named", "tests/test_funcs.py::test_autocurry_kwargs", "tests/test_funcs.py::test_autocurry_kwonly", "tests/test_funcs.py::test_autocurry_posonly", "tests/test_funcs.py::test_autocurry_builtin", "tests/test_funcs.py::test_autocurry_hard", "tests/test_funcs.py::test_autocurry_class"]
["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_cal...
jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810
true
null
1
18
7
1,695
0
0.6
1
0.75
1
0.3425
81.3025
4,908
swe_smith::train::26635
swe_smith
train
26,635
pylint-dev__astroid.b114f6b5.lm_rewrite__zjvqolnc
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
# Property getter function incorrectly handles arguments ### Bug description There appears to be an issue with how property getter functions handle arguments. When trying to access a property that has arguments, the error message is incorrect and the behavior doesn't match Python's standard property behavior. ### Ho...
diff --git a/astroid/interpreter/objectmodel.py b/astroid/interpreter/objectmodel.py index fd8c0c0..8cccb93 100644 --- a/astroid/interpreter/objectmodel.py +++ b/astroid/interpreter/objectmodel.py @@ -913,8 +913,9 @@ class PropertyModel(ObjectModel): @property def attr_fget(self): + """Return the get...
["tests/test_inference.py::test_property_inference"]
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
17
1
1,714
0
0.6
1
0.75
1
0.342333
81.302
4,909
swe_smith::train::31458
swe_smith
train
31,458
benoitc__gunicorn.bacbf8aa.combine_module__zhznem0c
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
ChunkedReader missing read method breaks HTTP request parsing #### Description After recent changes, HTTP requests with chunked transfer encoding fail to parse correctly. The ChunkedReader class appears to be missing its `read` method, causing AttributeError when trying to read chunked request bodies. #### Steps/Cod...
diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py index d7ee29e..b220c64 100644 --- a/gunicorn/http/body.py +++ b/gunicorn/http/body.py @@ -15,28 +15,6 @@ class ChunkedReader: self.parser = self.parse_chunked(unreader) self.buf = io.BytesIO() - def read(self, size): - if not isins...
["tests/test_http.py::test_http_invalid_response_header", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_10.http]", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_09.http]", "tests/test_invalid_requests.py::test_http_parser[/testbed/t...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
2
36
17
1,334
0
0.6
1
0.75
1
0.342333
81.302
4,910
swe_smith::train::28525
swe_smith
train
28,525
encode__starlette.db5063c2.func_basic__7z9x698e
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
StaticFiles html parameter inverted and directory validation broken When creating a StaticFiles instance, the `html` parameter behavior is inverted - passing `html=True` disables HTML mode instead of enabling it. Additionally, the directory validation logic is broken and only checks if the path is a file instead of ch...
diff --git a/starlette/staticfiles.py b/starlette/staticfiles.py index 746e740..9906820 100644 --- a/starlette/staticfiles.py +++ b/starlette/staticfiles.py @@ -49,10 +49,10 @@ class StaticFiles: self.directory = directory self.packages = packages self.all_directories = self.get_directories(d...
["tests/test_staticfiles.py::test_staticfiles_configured_with_missing_directory[asyncio]", "tests/test_staticfiles.py::test_staticfiles_configured_with_file_instead_of_directory[asyncio]", "tests/test_staticfiles.py::test_staticfiles_config_check_occurs_only_once[asyncio]", "tests/test_staticfiles.py::test_staticfiles_...
["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
6
15
1,934
0
0.6
1
0.75
1
0.342333
81.302
4,911
swe_smith::train::28029
swe_smith
train
28,029
jsvine__pdfplumber.02ff4313.lm_rewrite__6iq6rpwb
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
### Issue: PDF Loading Error with Specific Files #### Description It seems there's an issue with loading certain PDF files using the `pdfplumber` library. When attempting to open and process these files, an error is raised, indicating that the expected data structure is not being correctly handled. This problem appea...
diff --git a/pdfplumber/pdf.py b/pdfplumber/pdf.py index 9c42bc2..598c896 100644 --- a/pdfplumber/pdf.py +++ b/pdfplumber/pdf.py @@ -150,16 +150,9 @@ class PDF(Container): pp = self.pages_to_parse self._pages: List[Page] = [] - def iter_pages() -> Generator[PDFPage, None, None]: - ...
["tests/test_oss_fuzz.py::Test::test_load"]
["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
1
1,793
0
0.6
1
0.75
1
0.342167
81.3015
4,912
swe_smith::train::1921
swe_smith
train
1,921
agronholm__typeguard.b6a7e438.func_pm_remove_cond__yqkah0ut
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking for class types is broken in typeguard Description I've found an issue with typeguard's type checking functionality when checking class types. The `check_class` function seems to be missing its implementation for handling various type checking scenarios. Here's a simple reproduction: ```python from ty...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..954008a 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -471,39 +471,6 @@ def check_class( else: expected_class = args[0] - if expected_class is Any: - return - elif expected_clas...
["tests/test_checkers.py::TestType::test_parametrized_fail", "tests/test_checkers.py::TestType::test_union_fail", "tests/test_typechecked.py::TestSelf::test_self_type_invalid"]
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
33
3
1,393
0
0.6
1
0.75
1
0.342167
81.3015
4,913
swe_smith::train::24589
swe_smith
train
24,589
marshmallow-code__marshmallow.9716fc62.combine_module__dp2codi1
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
# Two issues with marshmallow decorators and ContainsOnly validator ## Issue 1: Decorators `pre_dump` and `pre_load` not working correctly with `pass_many` parameter When using the `pre_dump` and `pre_load` decorators with the `pass_many` parameter, they behave opposite to what's expected. The `pass_many` parameter s...
diff --git a/src/marshmallow/decorators.py b/src/marshmallow/decorators.py index 965edb6..a28d791 100644 --- a/src/marshmallow/decorators.py +++ b/src/marshmallow/decorators.py @@ -138,7 +138,7 @@ def pre_dump( .. versionchanged:: 3.0.0 ``many`` is always passed as a keyword arguments to the decorated met...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_validate.py::test_containsonly_in_list", "tests/test_validate.py::test_contains_only_unhashable_types", "tests/test_validate.py::test_containsonly_in_tuple", "tests/test_validate.py::t...
["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_decorated_processor_returning_none[raise]", "tests/test_decorators.py::TestPassOriginal::test_pass_original_single", "tests/test_de...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
2
10
6
1,852
0
0.6
1
0.75
1
0.342
81.301
4,914
swe_smith::train::31811
swe_smith
train
31,811
davidhalter__parso.338a5760.combine_file__v9lb4yq7
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Diff parser broken for indentation and position handling I've discovered several issues with the diff parser in parso. The parser is completely broken when trying to parse Python code with indentation. #### Reproduction ```python from parso import load_grammar # Create a simple Python file with indentation code1 = ...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..77ec595 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -65,11 +65,11 @@ def _get_next_leaf_if_indentation(leaf): def _get_suite_indentation(tree_node): - return _get_indentation(tree_node.children[1]) + return _get_inden...
["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
21
81
1,632
0
0.6
1
0.75
1
0.342
81.301
4,915
r2e_gym::train::4881
r2e_gym
train
4,881
numpy__ebe2cfb68586208bb096a575a603d00da5ee3887
numpy
numpy/numpy
python
ebe2cfb68586208bb096a575a603d00da5ee3887
**[ISSUE]** **Title:** Missing `ARRAY_ALIGN` Attribute Causes Header Alignment Checks to Fail **Description:** When attempting to write array headers, the code references `numpy.lib.format.ARRAY_ALIGN` to ensure the header length is properly aligned. However, the `ARRAY_ALIGN` attribute is not defined in the `numpy.li...
diff --git a/doc/release/1.14.0-notes.rst b/doc/release/1.14.0-notes.rst --- a/doc/release/1.14.0-notes.rst +++ b/doc/release/1.14.0-notes.rst @@ -221,6 +221,17 @@ ------------------------------------------------ Previously it was limited to a single 2d array. +``numpy.save`` aligns data to 64 bytes instead of 16 +...
diff --git a/numpy/lib/tests/test_format.py b/numpy/lib/tests/test_format.py --- a/numpy/lib/tests/test_format.py +++ b/numpy/lib/tests/test_format.py @@ -615,6 +615,11 @@ format.write_array(f, d) assert_(w[0].category is UserWarning) + # check alignment of data portion + f.seek(0) + header...
null
null
namanjain12/numpy_final:ebe2cfb68586208bb096a575a603d00da5ee3887
true
null
3
74
null
1,284
0
0.75
1
0.6375
1
0.460667
81.30075
4,916
swe_smith::train::1942
swe_smith
train
1,942
agronholm__typeguard.b6a7e438.lm_rewrite__3wwei82g
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Generator send() type checking is broken ### What happened? When using a generator with type annotations for the send value, the type checking for the send value is not working correctly. The error message is also confusing. ```python from typing import Generator, NoReturn from typeguard import typechecked @typec...
diff --git a/src/typeguard/_functions.py b/src/typeguard/_functions.py index ca21c14..b089b0b 100644 --- a/src/typeguard/_functions.py +++ b/src/typeguard/_functions.py @@ -182,19 +182,14 @@ def check_return_type( return retval -def check_send_type( - func_name: str, - sendval: T, - annotation: Any, -...
["tests/test_typechecked.py::TestGenerator::test_generator_bad_send", "tests/test_typechecked.py::TestAsyncGenerator::test_async_generator_bad_send"]
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
16
2
1,731
0
0.6
1
0.75
1
0.341833
81.3005
4,917
swe_smith::train::45383
swe_smith
train
45,383
dask__dask.5f61e423.lm_rewrite__28qw31xi
swesmith/dask__dask.5f61e423
dask/dask
python
null
# linspace() function fails with TypeError when creating evenly spaced values ## Current problem When trying to use the `linspace()` function to create evenly spaced values, it fails with a TypeError indicating that the function is receiving multiple values for the `endpoint` argument. ## Steps to reproduce ```pyth...
diff --git a/dask/array/creation.py b/dask/array/creation.py index b906bc4..450462a 100644 --- a/dask/array/creation.py +++ b/dask/array/creation.py @@ -303,9 +303,8 @@ def _get_like_function_shapes_chunks(a, chunks, shape): return shape, chunks -def linspace( - start, stop, num=50, endpoint=True, retstep=F...
["dask/array/tests/test_creation.py::test_linspace[True]", "dask/array/tests/test_creation.py::test_linspace[False]"]
["dask/array/tests/test_creation.py::test_arr_like[i4-C-None-shape0-chunks0-tuple-tuple-empty_like-numpy]", "dask/array/tests/test_creation.py::test_arr_like[i4-C-None-shape0-chunks0-tuple-tuple-empty-numpy]", "dask/array/tests/test_creation.py::test_arr_like[i4-C-None-shape0-chunks0-tuple-tuple-ones_like-numpy]", "das...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
58
2
890
0
0.6
1
0.75
1
0.341667
81.3
4,918
swe_smith::train::22494
swe_smith
train
22,494
tweepy__tweepy.91a41c6e.func_pm_ctrl_shuffle__xtsmcyqi
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Bug Report: UnboundLocalError in Tweepy Client Methods #### Description After applying the recent patch, several methods in the Tweepy client are raising an `UnboundLocalError`. This seems to occur when attempting to access certain Twitter API endpoints using the client. #### Steps to Reproduce 1. Set up a Pyth...
diff --git a/tweepy/client.py b/tweepy/client.py index d463129..584b857 100644 --- a/tweepy/client.py +++ b/tweepy/client.py @@ -124,21 +124,20 @@ class BaseClient: self, method, route, params={}, endpoint_parameters=(), json=None, data_type=None, user_auth=False ): - request_params = self...
["tests/test_client.py::TweepyClientTests::test_bookmarks", "tests/test_client.py::TweepyClientTests::test_create_and_delete_tweet", "tests/test_client.py::TweepyClientTests::test_create_and_get_compliance_job_and_jobs", "tests/test_client.py::TweepyClientTests::test_follow_and_unfollow_list", "tests/test_client.py::Tw...
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
9
39
1,870
0
0.6
1
0.75
1
0.341667
81.3
4,919
swe_smith::train::9759
swe_smith
train
9,759
marshmallow-code__webargs.dbde72fe.lm_rewrite__4yc0e6bz
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
# Regression in webargs: Schema class not properly handled in Parser._get_schema I found a regression in the latest version of webargs where passing a Schema class (not an instance) to the parser no longer works. ## Reproduction Here's a minimal example that demonstrates the issue: ```python from marshmallow import...
diff --git a/src/webargs/core.py b/src/webargs/core.py index 44294e9..92c1e5b 100644 --- a/src/webargs/core.py +++ b/src/webargs/core.py @@ -324,23 +324,16 @@ class Parser(typing.Generic[Request]): :rtype: marshmallow.Schema """ if isinstance(argmap, ma.Schema): - schema: ma.Schema...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_schema_as_kwargs_view", "tests/test_core.py::TestPassingSchema::test_parse_does_not_add_missing_values_to_schema_validator", "tests/test_core.py::test_whitespace_stripping_parser_example", "tests/test_core.py::test_parse_rejects_unknown_argmap_type", "tests/test_co...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
23
5
1,589
0
0.6
1
0.75
1
0.3415
81.2995
4,920
swe_smith::train::45729
swe_smith
train
45,729
conan-io__conan.86f29e13.func_pm_class_rm_funcs__yihzxfqh
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### Unexpected Behavior in Settings Handling ### What happened? After applying recent changes, there seems to be an issue with how settings are being processed in the Conan package manager. Specifically, when attempting to create a package with certain settings, the expected behavior is not being met, leading to erro...
diff --git a/conan/api/model/list.py b/conan/api/model/list.py index c7149e1..b23beda 100644 --- a/conan/api/model/list.py +++ b/conan/api/model/list.py @@ -263,11 +263,6 @@ class ListPattern: if "*" in self.ref or not self.version or (self.package_id is None and self.rrev is None): return self.re...
["test/unittests/model/other_settings_test.py::SettingsTest::test_invalid_settings4", "test/unittests/model/other_settings_test.py::SettingsTest::test_settings_as_a_str"]
["test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming_complete", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_new_print", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanf...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
7
2
1,909
0
0.6
1
0.75
1
0.3415
81.2995
4,921
swe_smith::train::32657
swe_smith
train
32,657
pydantic__pydantic.acb0f10f.func_pm_remove_cond__2gbgmzli
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
KeyError when applying constraints to schema with unknown constraint types #### Description When using Field constraints on certain type combinations, a KeyError is raised during schema generation instead of the expected TypeError for incompatible constraints. #### Steps/Code to Reproduce ```python from pydantic im...
diff --git a/pydantic/_internal/_known_annotated_metadata.py b/pydantic/_internal/_known_annotated_metadata.py index 463d8a7..6705305 100644 --- a/pydantic/_internal/_known_annotated_metadata.py +++ b/pydantic/_internal/_known_annotated_metadata.py @@ -203,8 +203,6 @@ def apply_known_metadata(annotation: Any, schema: C...
["tests/test_annotated.py::test_merge_field_infos_ordering", "tests/test_annotated.py::test_validate_float_inf_nan_python", "tests/test_annotated.py::test_decimal_constraints_after_annotation", "tests/test_docs.py::test_docstrings_examples[pydantic/_internal/_known_annotated_metadata.py:346-353]", "tests/test_forward_r...
["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
41
45
1,229
0
0.6
1
0.75
1
0.3415
81.2995
4,922
swe_smith::train::10067
swe_smith
train
10,067
paramiko__paramiko.23f92003.combine_file__6to1x565
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH key exchange fails with AttributeError during GEX negotiation #### Description When attempting to establish SSH connections using Diffie-Hellman Group Exchange (GEX), the key exchange process fails with an AttributeError. This affects both client and server modes during the cryptographic parameter negotiation pha...
diff --git a/paramiko/kex_gex.py b/paramiko/kex_gex.py index baa0803..5ab1d59 100644 --- a/paramiko/kex_gex.py +++ b/paramiko/kex_gex.py @@ -67,25 +67,21 @@ class KexGex: self.old_style = False def start_kex(self, _test_old_style=False): - if self.transport.server_mode: + if not self.trans...
["tests/test_kex.py::KexTest::test_gex_client", "tests/test_kex.py::KexTest::test_gex_old_client", "tests/test_kex.py::KexTest::test_gex_server", "tests/test_kex.py::KexTest::test_gex_server_with_old_client", "tests/test_kex.py::KexTest::test_gex_sha256_client", "tests/test_kex.py::KexTest::test_gex_sha256_old_client",...
["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
39
8
1,269
0
0.6
1
0.75
1
0.3415
81.2995
4,923
swe_smith::train::18515
swe_smith
train
18,515
HIPS__autograd.ac044f0d.lm_rewrite__5apwybyw
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Unexpected Behavior in `rfft` and `irfft` Functions #### Description It seems there is an issue with the `rfft` and `irfft` functions in the `autograd` library. After a recent update, several functions related to real FFT transformations are not behaving as expected. Specifically, the `irfft` function is throwing...
diff --git a/autograd/numpy/fft.py b/autograd/numpy/fft.py index e401b4c..16fa8ed 100644 --- a/autograd/numpy/fft.py +++ b/autograd/numpy/fft.py @@ -29,28 +29,26 @@ defvjp(ifftn, lambda *args, **kwargs: fft_grad(get_fft_args, ifftn, *args, **kwa def rfft_grad(get_args, irfft_fun, ans, x, *args, **kwargs): + """...
["tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_fft.py::test_rfftn_subset", "tests/test_fft.py::test_rfftn_axes", "tests/test_fft.py::test_rfft2_s", "tests/test_fft.py::test_irfftn", "tests/test_fft.py::test_irfft2_s", "tests/test_fft.py::test_irfftn_subset", "tests/test_fft.py::test_rfftn_s", "tests/...
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_direct.py::test_grad_complex_output", "tests/test_fft...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
24
21
1,568
0
0.6
1
0.75
1
0.341333
81.299
4,924
swe_smith::train::35847
swe_smith
train
35,847
stanfordnlp__dspy.651a4c71.func_pm_remove_wrapper__d3rilph0
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# NameError in majority function when using signature ## Description I've encountered an issue with the `majority` function in the `dspy.predict.aggregation` module. The function fails with a `NameError` when trying to access the `signature` variable, which seems to be undefined in certain cases. When using the `maj...
diff --git a/dspy/predict/aggregation.py b/dspy/predict/aggregation.py index c65badd..6e15632 100644 --- a/dspy/predict/aggregation.py +++ b/dspy/predict/aggregation.py @@ -21,11 +21,6 @@ def majority(prediction_or_completions, normalize=default_normalize, field=None) else: completions = prediction_or_com...
["tests/predict/test_aggregation.py::test_majority_with_prediction", "tests/predict/test_aggregation.py::test_majority_with_completions", "tests/predict/test_aggregation.py::test_majority_with_list", "tests/predict/test_aggregation.py::test_majority_with_normalize", "tests/predict/test_aggregation.py::test_majority_wit...
["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
6
6
1,927
0
0.6
1
0.75
1
0.341167
81.2985
4,925
swe_smith::train::38462
swe_smith
train
38,462
amueller__word_cloud.ec24191c.combine_file__qo0x5ack
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
Collocation detection broken after recent changes #### Description The collocation detection in wordcloud seems to be completely broken. When generating word clouds with collocations enabled, the expected bigrams are not being detected and individual words that should be filtered out are missing from the results. ##...
diff --git a/wordcloud/tokenization.py b/wordcloud/tokenization.py index 0d461ff..935eb90 100644 --- a/wordcloud/tokenization.py +++ b/wordcloud/tokenization.py @@ -13,19 +13,18 @@ def l(k, n, x): # noqa: E741, E743 def score(count_bigram, count1, count2, n_words): """Collocation score""" - if n_words <= co...
["test/test_wordcloud.py::test_collocations", "test/test_wordcloud.py::test_collocation_stopwords", "test/test_wordcloud.py::test_collocation_stopwords_uppercase", "test/test_wordcloud.py::test_plurals_numbers", "test/test_wordcloud.py::test_default", "test/test_wordcloud.py::test_stopwords_lowercasing", "test/test_wor...
["test/test_wordcloud.py::test_multiple_s", "test/test_wordcloud.py::test_empty_text", "test/test_wordcloud.py::test_check_errors", "test/test_wordcloud.py::test_single_color_func", "test/test_wordcloud.py::test_single_color_func_grey", "test/test_wordcloud.py::test_process_text_default_patterns", "test/test_wordcloud....
jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c
true
null
1
38
27
1,287
0
0.6
1
0.75
1
0.341167
81.2985
4,926
swe_smith::train::2975
swe_smith
train
2,975
Suor__funcy.207a7810.combine_file__8y50osx1
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Multiple issues with collection manipulation functions I've discovered several bugs in the collection manipulation functions that are causing unexpected behavior. ## Issue 1: `walk_keys` function is broken When trying to use the `walk_keys` function to transform dictionary keys, I'm getting a TypeError about unhas...
diff --git a/funcy/colls.py b/funcy/colls.py index 6acfd53..bbce344 100644 --- a/funcy/colls.py +++ b/funcy/colls.py @@ -132,12 +132,11 @@ def walk(f, coll): def walk_keys(f, coll): """Walks keys of the collection, mapping them with f.""" f = make_func(f) - # NOTE: we use this awkward construct instead of...
["tests/test_colls.py::test_walk_keys", "tests/test_colls.py::test_zipdict", "tests/test_colls.py::test_flip"]
["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
11
3
1,826
0
0.6
1
0.75
1
0.341
81.298
4,927
swe_smith::train::10031
swe_smith
train
10,031
google__textfsm.c31b6007.pr_127
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
AttributeError in Terminal Functions After Recent Update #### Description After the recent update, several terminal-related functions are throwing `AttributeError`. This seems to be affecting the handling of ANSI escape sequences and terminal size calculations. #### Steps/Code to Reproduce ```python import terminal ...
diff --git a/textfsm/terminal.py b/textfsm/terminal.py index 32252a4..47b096b 100755 --- a/textfsm/terminal.py +++ b/textfsm/terminal.py @@ -18,8 +18,9 @@ """Simple terminal related routines.""" import getopt +import os import re -import shutil +import struct import sys import time @@ -31,6 +32,8 @@ try: exce...
["tests/terminal_test.py::TerminalTest::testAnsiCmd", "tests/terminal_test.py::TerminalTest::testAnsiText", "tests/terminal_test.py::TerminalTest::testEncloseAnsi", "tests/terminal_test.py::TerminalTest::testIssue1", "tests/terminal_test.py::TerminalTest::testLineWrap", "tests/terminal_test.py::TerminalTest::testStripA...
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.p...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
41
6
1,224
0
0.6
1
0.75
1
0.340667
81.297
4,928
swe_smith::train::24755
swe_smith
train
24,755
marshmallow-code__marshmallow.9716fc62.func_basic__q6jiaaya
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
# UUID field in marshmallow returns random UUIDs instead of validating input #### Description I noticed that the `UUID` field in marshmallow is not properly validating input values. Instead of validating and raising errors for invalid UUIDs, it's returning random UUIDs for string inputs and returning `None` for inval...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..5861fdf 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -918,15 +918,17 @@ class UUID(String): def _validated(self, value) -> uuid.UUID | None: """Format the value or raise a :exc:`ValidationError` ...
["tests/test_deserialization.py::TestFieldDeserialization::test_uuid_field_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::test_invalid_uuid_deserialization[malformed]", "tests/test_deserialization.py::TestFieldDeserialization::test_invalid_uuid_deserialization[123]", "tests/test_deserializa...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
8
5
1,884
0
0.6
1
0.75
1
0.340667
81.297
4,929
swe_smith::train::43962
swe_smith
train
43,962
pydata__patsy.a5d16484.func_basic__al6kmrbh
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
CategoricalSniffer returns wrong confidence for boolean data When processing boolean data, the CategoricalSniffer's sniff method returns incorrect confidence values. The method should return True when it's confident it has found all levels, but it's returning False for cases where it should be confident. #### Steps/C...
diff --git a/patsy/categorical.py b/patsy/categorical.py index c88ecd5..c949ac9 100644 --- a/patsy/categorical.py +++ b/patsy/categorical.py @@ -189,44 +189,36 @@ class CategoricalSniffer(object): def sniff(self, data): if hasattr(data, "contrast"): self._contrast = data.contrast - # r...
["patsy/build.py::test__examine_factor_types", "patsy/categorical.py::test_CategoricalSniffer"]
["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
42
2
1,202
0
0.6
1
0.75
1
0.340333
81.296
4,930
swe_smith::train::42407
swe_smith
train
42,407
r1chardj0n3s__parse.30da9e4f.func_pm_remove_cond__dt543ok3
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
# Date parsing broken in date_convert function I've discovered a serious issue with the date parsing functionality in the `date_convert` function. After a recent change, the function no longer properly handles date components. ## Description When trying to parse dates in various formats, I'm getting `UnboundLocalErr...
diff --git a/parse.py b/parse.py index 80242e1..0e9f6e6 100644 --- a/parse.py +++ b/parse.py @@ -192,42 +192,15 @@ def date_convert( """ groups = match.groups() time_only = False - if mm and dd: - y = datetime.today().year - m = groups[mm] - d = groups[dd] - elif ymd is not Non...
["README.rst::README.rst", "tests/test_bugs.py::test_named_date_issue7", "tests/test_bugs.py::test_pm_overflow_issue16", "tests/test_bugs.py::test_pm_handling_issue57", "tests/test_parse.py::test_two_datetimes", "tests/test_parse.py::test_datetimes", "tests/test_parse.py::test_datetime_group_count", "tests/test_parse.p...
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "tests/test_bugs.py::test_dotted_type_conversion_pull_8", "tests/test_bugs.py::test_user_type_with_group_count_issue60", "tests/test_bugs.py::test_unmatched_brace_doesnt_match", "tests/test_bugs.py::test_pickling_bug_110", "tests/test_bugs....
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
34
9
1,362
0
0.6
1
0.75
1
0.340333
81.296
4,931
swe_smith::train::32774
swe_smith
train
32,774
pydantic__pydantic.acb0f10f.lm_rewrite__atgxganp
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
UrlConstraints annotation breaks URL validation #### Description When using `UrlConstraints` to annotate URL types, validation fails unexpectedly. The constraints are not being applied correctly to the URL schema. #### Steps/Code to Reproduce ```python from typing import Annotated from pydantic import ValidationErr...
diff --git a/pydantic/networks.py b/pydantic/networks.py index cae8238..c99dd51 100644 --- a/pydantic/networks.py +++ b/pydantic/networks.py @@ -104,22 +104,47 @@ class UrlConstraints: """Fetch a key / value mapping of constraints to values that are not None. Used for core schema updates.""" return {f...
["tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:562-591]", "tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:599-614]", "tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:686-733]", "tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:955-963]", "tests/...
["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
53
9
981
0
0.6
1
0.75
1
0.340167
81.2955
4,932
swe_smith::train::32805
swe_smith
train
32,805
pydantic__pydantic.acb0f10f.lm_rewrite__p5fzwcha
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Email validation error messages changed unexpectedly #### Description After a recent update, email validation error messages have changed format and are no longer providing detailed error reasons. The error messages now show generic text instead of the specific validation failure reasons. #### Steps/Code to Reproduc...
diff --git a/pydantic/networks.py b/pydantic/networks.py index cae8238..f0df6a0 100644 --- a/pydantic/networks.py +++ b/pydantic/networks.py @@ -1267,32 +1267,28 @@ def validate_email(value: str) -> tuple[str, str]: if email_validator is None: import_email_validator() + value = value.strip() + i...
["tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:955-963]", "tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:1004-1021]", "tests/test_docs.py::test_docs_examples[docs/concepts/fields.md:113-125]", "tests/test_networks.py::test_address_valid[foobar@example.com-foobar-foobar@example.c...
["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
34
32
1,361
0
0.6
1
0.75
1
0.340167
81.2955
4,933
swe_smith::train::6877
swe_smith
train
6,877
joke2k__faker.8b401a7d.lm_rewrite__nojl4mvb
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
SSN Provider Missing Method Description The Latvian SSN provider seems to be missing a crucial method, causing issues when generating SSNs. When attempting to generate a social security number with the `ssn` method, an `AttributeError` is raised due to the absence of the `date_of_birth` method. This is impacting the ...
diff --git a/faker/providers/ssn/lv_LV/__init__.py b/faker/providers/ssn/lv_LV/__init__.py index 49e7d4a..e19caef 100644 --- a/faker/providers/ssn/lv_LV/__init__.py +++ b/faker/providers/ssn/lv_LV/__init__.py @@ -4,7 +4,7 @@ from .. import Provider as SsnProvider class Provider(SsnProvider): - def ssn(self, min...
["tests/providers/test_ssn.py::TestLvLV::test_century_code", "tests/providers/test_ssn.py::TestLvLV::test_ssn_sanity", "tests/providers/test_ssn.py::TestLvLV::test_vat_id"]
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
56
3
920
0
0.6
1
0.75
1
0.34
81.295
4,934
swe_smith::train::48106
swe_smith
train
48,106
sqlfluff__sqlfluff.50a1c4b6.func_pm_class_rm_funcs__g4rj2yva
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
BaseRule missing _process_lint_result method causes AttributeError #### Description After recent changes, the `BaseRule` class is missing the `_process_lint_result` method, causing `AttributeError` when linting SQL files. This affects the core linting functionality. #### Steps/Code to Reproduce ```python from sqlfl...
diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py index 1f00fb3..a7794b8 100644 --- a/src/sqlfluff/core/rules/base.py +++ b/src/sqlfluff/core/rules/base.py @@ -611,55 +611,6 @@ class BaseRule(metaclass=RuleMetaclass): """This method is monkey patched into a "raise" for certain test...
["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
50
8
1,039
0
0.6
1
0.75
1
0.339833
81.2945
4,935
swe_smith::train::6988
swe_smith
train
6,988
cantools__cantools.0c6a7871.combine_file__eeycx29k
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
CAN log parsing broken with incorrect base conversion and variable scoping #### Description The CAN log reader is failing to parse candump format logs correctly. Multiple parsing patterns are broken due to incorrect base conversions and variable scoping issues. #### Steps/Code to Reproduce ```python import cantools...
diff --git a/src/cantools/logreader.py b/src/cantools/logreader.py index 67943e0..2f75f3d 100644 --- a/src/cantools/logreader.py +++ b/src/cantools/logreader.py @@ -57,12 +57,12 @@ class CandumpDefaultPattern(BasePattern): @staticmethod def unpack(match_object): channel = match_object.group('channel'...
["tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_log_format", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_muxed_data", "tests/test_comman...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
21
17
1,618
0
0.6
1
0.75
1
0.339667
81.294
4,936
swe_smith::train::1169
swe_smith
train
1,169
jd__tenacity.0d40e76f.lm_rewrite__0siuyh3e
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
# before_sleep_log function not handling retry state correctly I'm experiencing some strange behavior with the `before_sleep_log` function. It seems like it's not properly handling the retry state in certain scenarios. ## Reproduction Here's a simple example that demonstrates the issue: ```python import logging imp...
diff --git a/tenacity/before_sleep.py b/tenacity/before_sleep.py index 153edb7..b6fd15d 100644 --- a/tenacity/before_sleep.py +++ b/tenacity/before_sleep.py @@ -35,38 +35,18 @@ def before_sleep_log( ) -> typing.Callable[["RetryCallState"], None]: """Before sleep strategy that logs to some logger the attempt.""" ...
["tests/test_tenacity.py::TestBeforeAfterAttempts::test_before_sleep_log_raises", "tests/test_tenacity.py::TestBeforeAfterAttempts::test_before_sleep_log_raises_with_exc_info", "tests/test_tenacity.py::TestBeforeAfterAttempts::test_before_sleep_log_returns", "tests/test_tenacity.py::TestBeforeAfterAttempts::test_before...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
40
4
1,238
0
0.6
1
0.75
1
0.339667
81.294
4,937
swe_smith::train::22485
swe_smith
train
22,485
tweepy__tweepy.91a41c6e.func_pm_ctrl_shuffle__jphonofx
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Issue with `chunked_upload` Method in Tweepy API #### Description It seems there's an issue with the `chunked_upload` method in the Tweepy API when attempting to upload MP4 media files. The method throws an error during the upload process, which prevents the media from being successfully uploaded. #### Steps to ...
diff --git a/tweepy/api.py b/tweepy/api.py index 37caf07..819270d 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -3538,6 +3538,20 @@ class API: def chunked_upload(self, filename, *, file=None, file_type=None, wait_for_async_finalize=True, media_category=None, addi...
["tests/test_api.py::TweepyAPITests::testmediauploadmp4"]
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
51
1
1,018
0
0.6
1
0.75
1
0.339667
81.294
4,938
swe_smith::train::18164
swe_smith
train
18,164
pndurette__gTTS.dbcda4f3.lm_rewrite__817sej9o
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
Tokenization and Minimization Issue in gTTS Description It seems there's a problem with the tokenization and minimization process in the gTTS library after the recent changes. The `_tokenize` method is not handling text as expected, leading to errors when processing various languages. The issue appears to be related ...
diff --git a/gtts/tts.py b/gtts/tts.py index eae351f..e178226 100644 --- a/gtts/tts.py +++ b/gtts/tts.py @@ -165,34 +165,33 @@ class gTTS: self.timeout = timeout def _tokenize(self, text): - # Pre-clean - text = text.strip() - - # Apply pre-processors - for pp in self.pre_pro...
["gtts/tests/test_cli.py::test_lang_nocheck", "gtts/tests/test_cli.py::test_params_set", "gtts/tests/test_cli.py::test_stdin_text", "gtts/tests/test_cli.py::test_stdin_text_unicode", "gtts/tests/test_cli.py::test_stdin_file", "gtts/tests/test_cli.py::test_stdin_file_unicode", "gtts/tests/test_cli.py::test_text", "gtts/...
["gtts/tests/test_cli.py::test_text_no_text_or_file", "gtts/tests/test_cli.py::test_text_text_and_file", "gtts/tests/test_cli.py::test_text_empty", "gtts/tests/test_cli.py::test_file_not_exists", "gtts/tests/test_cli.py::test_all", "gtts/tests/test_cli.py::test_lang_not_valid", "gtts/tests/test_lang.py::test_main_langs...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
true
null
1
49
78
1,057
0
0.6
1
0.75
1
0.3395
81.2935
4,939
swe_bench::test::10
swe_bench
test
10
astropy__astropy-13032
astropy/astropy
astropy/astropy
python
d707b792d3ca45518a53b4a395c81ee86bd7b451
Incorrect ignored usage in `ModelBoundingBox` ### Description Providing `ignored` inputs to `ModelBoundingBox` does not always work as expected. Running the following code: ```python from astropy.modeling.bounding_box import ModelBoundingBox from astropy.modeling import models as astropy_models bbox = ModelBounding...
You just can't differentiate between a robot and the very best of humans. *(A special day message.)*
diff --git a/astropy/modeling/bounding_box.py b/astropy/modeling/bounding_box.py --- a/astropy/modeling/bounding_box.py +++ b/astropy/modeling/bounding_box.py @@ -694,6 +694,12 @@ def _validate_dict(self, bounding_box: dict): for key, value in bounding_box.items(): self[key] = value + @proper...
diff --git a/astropy/modeling/tests/test_bounding_box.py b/astropy/modeling/tests/test_bounding_box.py --- a/astropy/modeling/tests/test_bounding_box.py +++ b/astropy/modeling/tests/test_bounding_box.py @@ -12,7 +12,7 @@ _ignored_interval, _Interval, _SelectorArgument, ...
["astropy/modeling/tests/test_bounding_box.py::TestModelBoundingBox::test_bounding_box_ignore", "astropy/modeling/tests/test_bounding_box.py::TestCompoundBoundingBox::test___repr__"]
["astropy/modeling/tests/test_bounding_box.py::Test_Interval::test_create", "astropy/modeling/tests/test_bounding_box.py::Test_Interval::test_copy", "astropy/modeling/tests/test_bounding_box.py::Test_Interval::test__validate_shape", "astropy/modeling/tests/test_bounding_box.py::Test_Interval::test__validate_bounds", "a...
null
true
2022-03-31T16:32:46Z
1
12
2
1,596
0
0.8
1
0.55
1
0.306
81.293
4,940
swe_smith::train::18199
swe_smith
train
18,199
msiemens__tinydb.10644a0e.combine_file__sabkycds
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Table operations fail with TypeError when using document values as keys #### Description When performing update or remove operations on a table, the code incorrectly attempts to use document values as dictionary keys, causing TypeErrors for unhashable types like dictionaries. #### Steps/Code to Reproduce ```python ...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..cc69038 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -448,10 +448,10 @@ class Table: # Process all documents for doc_id in list(table.keys()): # Add ID to list of updated documents - ...
["tests/test_storages.py::test_json_readwrite", "tests/test_storages.py::test_yaml", "tests/test_tinydb.py::test_remove[memory]", "tests/test_tinydb.py::test_remove[json]", "tests/test_tinydb.py::test_remove_multiple[memory]", "tests/test_tinydb.py::test_remove_multiple[json]", "tests/test_tinydb.py::test_remove_return...
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
26
12
1,515
0
0.6
1
0.75
1
0.339167
81.2925
4,941
swe_smith::train::18043
swe_smith
train
18,043
pyasn1__pyasn1.0f07d724.lm_rewrite__ieqtgst5
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
### RecursionError in Character String Initialization ### What happened? After a recent change, initializing certain character string types results in a `RecursionError`. This seems to occur when attempting to handle specific input values, particularly when dealing with ASN.1 string types. ### What did you expect to...
diff --git a/pyasn1/type/char.py b/pyasn1/type/char.py index ec65f00..6538a08 100644 --- a/pyasn1/type/char.py +++ b/pyasn1/type/char.py @@ -66,24 +66,25 @@ class AbstractCharacterString(univ.OctetString): ) def prettyIn(self, value): - try: - if isinstance(value, str): - ...
["tests/codec/cer/test_encoder.py::GeneralizedTimeEncoderTestCase::testWithSubsecondsDanglingDot", "tests/codec/cer/test_encoder.py::GeneralizedTimeEncoderTestCase::testWithSubsecondsMin", "tests/codec/cer/test_encoder.py::GeneralizedTimeEncoderTestCase::testWithSubsecondsWithZeros", "tests/codec/cer/test_encoder.py::U...
["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
35
14
1,335
0
0.6
1
0.75
1
0.339167
81.2925
4,942
swe_smith::train::10940
swe_smith
train
10,940
paramiko__paramiko.23f92003.lm_rewrite__u92vz6uj
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
### Issue: RSAKey.sign_ssh_data returns bytes instead of Message object #### Description After updating the `sign_ssh_data` method in the `RSAKey` class, it seems that the method now returns a `bytes` object instead of a `Message` object. This change is causing issues when attempting to call methods that are expected...
diff --git a/paramiko/rsakey.py b/paramiko/rsakey.py index b7ad3ce..a90b893 100644 --- a/paramiko/rsakey.py +++ b/paramiko/rsakey.py @@ -120,21 +120,40 @@ class RSAKey(PKey): return isinstance(self.key, rsa.RSAPrivateKey) def sign_ssh_data(self, data, algorithm=None): + """ + Sign data wit...
["tests/pkey.py::PKey_::load_certificate::rsa_public_cert_blobs", "tests/test_pkey.py::KeyTest::test_generate_rsa", "tests/test_pkey.py::KeyTest::test_sign_and_verify_rsa_sha2_256", "tests/test_pkey.py::KeyTest::test_sign_and_verify_rsa_sha2_512", "tests/test_pkey.py::KeyTest::test_sign_and_verify_ssh_rsa"]
["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
37
5
1,294
0
0.6
1
0.75
1
0.339
81.292
4,943
swe_smith::train::30972
swe_smith
train
30,972
mido__mido.a0158ff9.pr_571
swesmith/mido__mido.a0158ff9
mido/mido
python
null
# [Bug]: MetaMessage constructor breaks when passing time parameter ## Description I've discovered an issue with the `MetaMessage` constructor in the `mido` library. When creating a `MetaMessage` with a `time` parameter, it raises a `ValueError` stating that `time` is not a valid argument for the message type. This ...
diff --git a/mido/midifiles/meta.py b/mido/midifiles/meta.py index 0a7e2ba..973c62e 100644 --- a/mido/midifiles/meta.py +++ b/mido/midifiles/meta.py @@ -465,7 +465,7 @@ def build_meta_message(meta_type, data, delta=0): except KeyError: return UnknownMetaMessage(meta_type, data) else: - msg = M...
["../dev/tests/midifiles/test_tracks.py::test_merge_large_midifile"]
["../dev/tests/test_frozen.py::test_hashability", "../dev/tests/test_frozen.py::test_freeze_and_thaw", "../dev/tests/test_frozen.py::test_thawed_message_is_copy", "../dev/tests/test_frozen.py::test_is_frozen", "../dev/tests/test_frozen.py::test_frozen_repr", "../dev/tests/test_frozen.py::test_frozen_meta_repr", "../dev...
jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9
true
null
1
19
1
1,653
0
0.6
1
0.75
1
0.338833
81.2915
4,944
swe_smith::train::22493
swe_smith
train
22,493
tweepy__tweepy.91a41c6e.func_pm_ctrl_shuffle__ws3q69of
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Bug Report: UnboundLocalError in ModelParser #### Description After the recent changes in the `ModelParser` class, several methods are encountering an `UnboundLocalError`. This seems to be related to the handling of the `json` variable within the `parse` method. The error occurs when attempting to process API res...
diff --git a/tweepy/parsers.py b/tweepy/parsers.py index 2aee1a5..f032b38 100644 --- a/tweepy/parsers.py +++ b/tweepy/parsers.py @@ -61,20 +61,8 @@ class ModelParser(JSONParser): def parse(self, payload, *, api=None, payload_list=False, payload_type=None, return_cursors=False): - try: - ...
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
["tests/test_api.py::TweepyAPITests::testparserargumenthastobeaparserinstance", "tests/test_api.py::TweepyCacheTests::testfilecache", "tests/test_api.py::TweepyCacheTests::testmemorycache", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_bookmarks", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_crea...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
24
62
1,553
0
0.6
1
0.75
1
0.338833
81.2915
4,945
swe_smith::train::20395
swe_smith
train
20,395
tobymao__sqlglot.036601ba.combine_file__6lmz4ssr
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Subquery unnesting fails with AttributeError on certain SQL patterns #### Description The subquery unnesting optimizer is throwing an `AttributeError` when processing certain SQL queries. This appears to be related to the `_other_operand` function returning `None` in cases where it should continue processing other op...
diff --git a/sqlglot/optimizer/unnest_subqueries.py b/sqlglot/optimizer/unnest_subqueries.py index dcb2f59..4e02c96 100644 --- a/sqlglot/optimizer/unnest_subqueries.py +++ b/sqlglot/optimizer/unnest_subqueries.py @@ -42,9 +42,9 @@ def unnest(select, parent_select, next_alias_name): predicate = select.find_ancest...
["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
34
4
1,352
0
0.6
1
0.75
1
0.338667
81.291
4,946
swe_smith::train::28946
swe_smith
train
28,946
encode__starlette.db5063c2.pr_2050
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
# Bug: url_for() method fails when used outside of Starlette application context ### Bug summary I'm encountering an issue with the `url_for()` method when trying to use it outside of a Starlette application context. The method is failing with a KeyError instead of providing a helpful error message. ### Steps to rep...
diff --git a/starlette/applications.py b/starlette/applications.py index 0a717bb..a6fba97 100644 --- a/starlette/applications.py +++ b/starlette/applications.py @@ -102,7 +102,7 @@ class Starlette: def routes(self) -> list[BaseRoute]: return self.router.routes - def url_path_for(self, name: str, /, *...
["tests/test_requests.py::test_request_url_outside_starlette_context[asyncio]", "tests/test_requests.py::test_request_url_starlette_context[asyncio]", "tests/test_requests.py::test_request_url_outside_starlette_context[trio]", "tests/test_requests.py::test_request_url_starlette_context[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
3
28
4
1,472
0
0.6
1
0.75
1
0.338667
81.291
4,947
swe_smith::train::52583
swe_smith
train
52,583
pydicom__pydicom.7d361b3d.func_pm_remove_cond__igo826ca
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
JSON deserialization fails for BulkDataURI and empty value handling #### Description When deserializing DICOM JSON data, the conversion process fails to handle BulkDataURI attributes and empty values properly. The JSON converter appears to be missing validation and processing logic for these cases. #### Steps/Code t...
diff --git a/src/pydicom/jsonrep.py b/src/pydicom/jsonrep.py index 48fd36f..420ab06 100644 --- a/src/pydicom/jsonrep.py +++ b/src/pydicom/jsonrep.py @@ -153,16 +153,7 @@ class JsonDataElementConverter: """ from pydicom.dataelem import empty_value_for_VR - # An attribute with an empty value sh...
["tests/test_json.py::TestDataSetToJson::test_json_from_dicom_file", "tests/test_json.py::TestSequence::test_nested_sequences", "tests/test_json.py::TestBinary::test_valid_bulkdata_uri", "tests/test_json.py::TestBinary::test_invalid_bulkdata_uri", "tests/test_json.py::TestBinary::test_bulk_data_reader_is_called", "test...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
28
7
1,471
0
0.6
1
0.75
1
0.3385
81.2905
4,948
swe_smith::train::48352
swe_smith
train
48,352
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__7hladfzk
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
TemplatedFile.templated_slice_to_source_slice returns incorrect results due to undefined variables #### Description The `templated_slice_to_source_slice` method in `TemplatedFile` class is producing incorrect results when converting template slices to source slices. The method appears to be referencing undefined vari...
diff --git a/src/sqlfluff/core/templaters/base.py b/src/sqlfluff/core/templaters/base.py index fd043b6..e4f50a4 100644 --- a/src/sqlfluff/core/templaters/base.py +++ b/src/sqlfluff/core/templaters/base.py @@ -360,8 +360,6 @@ class TemplatedFile: # Do slice starts and ends: for slice_elem in ("...
["test/core/templaters/base_test.py::test__templated_file_templated_slice_to_source_slice[in_slice0-out_slice0-True-tf_kwargs0]", "test/core/templaters/base_test.py::test__templated_file_templated_slice_to_source_slice[in_slice1-out_slice1-True-tf_kwargs1]", "test/core/templaters/base_test.py::test__templated_file_temp...
["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
27
12
1,491
0
0.6
1
0.75
1
0.3385
81.2905
4,949
swe_smith::train::52651
swe_smith
train
52,651
pydicom__pydicom.7d361b3d.lm_rewrite__3zi899xg
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# AttributeError when using 'pydicom help' command with subcommand I'm trying to use the `pydicom help` command to get information about available subcommands, but I'm getting an AttributeError. ## Steps to reproduce 1. Install the latest version of pydicom 2. Try to run the help command with a subcommand: ``` pydi...
diff --git a/src/pydicom/cli/main.py b/src/pydicom/cli/main.py index 2f616ba..af02ea1 100644 --- a/src/pydicom/cli/main.py +++ b/src/pydicom/cli/main.py @@ -171,18 +171,37 @@ def filespec_parser(filespec: str) -> list[tuple[Dataset, Any]]: def help_command(args: argparse.Namespace) -> None: + """Display help fo...
["tests/test_cli.py::TestCLIcall::test_help"]
["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
37
1
1,291
0
0.6
1
0.75
1
0.3385
81.2905
4,950
swe_smith::train::36724
swe_smith
train
36,724
lincolnloop__python-qrcode.456b01d4.lm_rewrite__q74fnmez
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
# KeyError: 'manpage' when updating version in manpage document ## Description I'm getting a KeyError when trying to update the version in the manpage document. The error occurs in the `update_manpage` function in `qrcode/release.py`. ## How to reproduce 1. Create a dictionary with the necessary data: ```python fro...
diff --git a/qrcode/release.py b/qrcode/release.py index 208ac1e..0175e2b 100644 --- a/qrcode/release.py +++ b/qrcode/release.py @@ -12,31 +12,25 @@ def update_manpage(data): """ Update the version in the manpage document. """ - if data["name"] != "qrcode": - return - - base_dir = os.path.di...
["qrcode/tests/test_release.py::test_invalid_data", "qrcode/tests/test_release.py::test_not_qrcode", "qrcode/tests/test_release.py::test_no_change", "qrcode/tests/test_release.py::test_change"]
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
50
4
1,031
0
0.6
1
0.75
1
0.3385
81.2905
4,951
swe_smith::train::6800
swe_smith
train
6,800
joke2k__faker.8b401a7d.func_pm_remove_cond__6dk42x7r
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
DSV generation ignores include_row_ids parameter and header validation #### Description The `dsv()` method in the misc provider is not properly handling the `include_row_ids` parameter and has removed header validation, causing unexpected behavior when generating delimited separated values. #### Steps/Code to Reprod...
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py index 70f20ec..0eae011 100644 --- a/faker/providers/misc/__init__.py +++ b/faker/providers/misc/__init__.py @@ -424,10 +424,7 @@ class Provider(BaseProvider): if not isinstance(data_columns, (list, tuple)): raise Type...
["tests/providers/test_misc.py::TestMiscProvider::test_dsv_with_invalid_values", "tests/providers/test_misc.py::TestMiscProvider::test_dsv_with_row_ids"]
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
8
2
1,868
0
0.6
1
0.75
1
0.338
81.289
4,952
swe_smith::train::5234
swe_smith
train
5,234
PyCQA__flake8.cf1542ce.combine_file__a0r77ily
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
# Legacy API in flake8 is broken ## Description Hi, I've been using the flake8 legacy API in my project and noticed that it's completely broken in the latest version. I'm trying to use the `get_style_guide()` function and it's not working as expected. ## Current Behaviour When I try to use the legacy API like this...
diff --git a/src/flake8/api/legacy.py b/src/flake8/api/legacy.py index 446df29..3b269e9 100644 --- a/src/flake8/api/legacy.py +++ b/src/flake8/api/legacy.py @@ -137,9 +137,9 @@ class StyleGuide: exclude=self.options.exclude, ) ) - return not paths + ...
["tests/integration/test_api_legacy.py::test_legacy_api", "tests/unit/test_legacy_api.py::test_styleguide_excluded", "tests/unit/test_legacy_api.py::test_styleguide_input_file"]
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_gen]", "tests/in...
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
1
21
3
1,607
0
0.6
1
0.75
1
0.337833
81.2885
4,953
swe_smith::train::28204
swe_smith
train
28,204
Mimino666__langdetect.a1598f1a.combine_module__f2pi65s4
swesmith/Mimino666__langdetect.a1598f1a
mimino666/langdetect
python
null
# Language detection fails after recent changes ## Description I've discovered a critical issue with the language detection functionality. After some recent changes, the language detector is no longer correctly identifying languages. ## How to Reproduce The following simple code fails to correctly identify language...
diff --git a/langdetect/utils/lang_profile.py b/langdetect/utils/lang_profile.py index 118cff8..aeac463 100644 --- a/langdetect/utils/lang_profile.py +++ b/langdetect/utils/lang_profile.py @@ -27,13 +27,13 @@ class LangProfile(object): def add(self, gram): '''Add n-gram to profile.''' - if self.n...
["langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_detector4", "langdetect/tests/utils/test_lang_profile.py::LangP...
["langdetect/tests/test_detector.py::DetectorTest::test_factory_from_json_string", "langdetect/tests/test_detector.py::DetectorTest::test_lang_list", "langdetect/tests/test_language.py::LanguageTest::test_cmp", "langdetect/tests/test_language.py::LanguageTest::test_language", "langdetect/tests/utils/test_lang_profile.p...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
true
null
2
24
7
1,546
0
0.6
1
0.75
1
0.337667
81.288
4,954
swe_smith::train::18514
swe_smith
train
18,514
HIPS__autograd.ac044f0d.lm_rewrite__4lu7bc0z
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Unexpected Behavior in `np.diff` with VJP Calculation I've encountered an issue with the `np.diff` function when calculating the vector-Jacobian product (VJP). The function seems to produce incorrect derivatives under certain conditions, leading to an `AssertionError`. ### Description When using `np.diff` with s...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..360827d 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -273,12 +273,18 @@ def grad_diff(ans, a, n=1, axis=-1): sl2[axis] = slice(-1, None) def undiff(g): - if g.shape[axis] > 0: - ...
["tests/test_systematic.py::test_diff"]
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
18
1
1,666
0
0.6
1
0.75
1
0.337667
81.288
4,955
swe_smith::train::21058
swe_smith
train
21,058
tobymao__sqlglot.036601ba.func_pm_remove_loop__ulwxz6si
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Subquery unnesting optimization broken after recent changes #### Description The subquery unnesting optimization is failing with an `IndexError: list index out of range` error. This appears to be affecting multiple optimization scenarios including correlated subqueries and complex query transformations. #### Steps/C...
diff --git a/sqlglot/optimizer/unnest_subqueries.py b/sqlglot/optimizer/unnest_subqueries.py index dcb2f59..9de3404 100644 --- a/sqlglot/optimizer/unnest_subqueries.py +++ b/sqlglot/optimizer/unnest_subqueries.py @@ -161,19 +161,6 @@ def decorrelate(select, parent_select, external_columns, next_alias_name): key_al...
["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
38
4
1,265
0
0.6
1
0.75
1
0.3375
81.2875
4,956
swe_smith::train::17697
swe_smith
train
17,697
pyasn1__pyasn1.0f07d724.func_basic__lycgyvdm
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
OID decoder returns incorrect values and fails to validate input #### Description The ObjectIdentifier decoder is producing incorrect OID values and not properly validating input. When decoding certain OID byte sequences, the decoder returns malformed OIDs or fails to catch invalid encodings that should raise errors....
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index 7e69ca1..4970cea 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -413,20 +413,19 @@ class ObjectIdentifierPayloadDecoder(AbstractSimplePayloadDecoder): yield chunk if not chunk: - ...
["tests/codec/ber/test_decoder.py::ObjectIdentifierDecoderTestCase::testEdge1", "tests/codec/ber/test_decoder.py::ObjectIdentifierDecoderTestCase::testEdge2", "tests/codec/ber/test_decoder.py::ObjectIdentifierDecoderTestCase::testEdge3", "tests/codec/ber/test_decoder.py::ObjectIdentifierDecoderTestCase::testEdge4", "te...
["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
25
17
1,525
0
0.6
1
0.75
1
0.3375
81.2875
4,957
swe_smith::train::10153
swe_smith
train
10,153
paramiko__paramiko.23f92003.combine_file__m3jmrkrn
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH config canonicalization broken after recent changes #### Description SSH config hostname canonicalization is not working correctly. When trying to connect to hosts that should be canonicalized, the lookup fails with KeyError exceptions. #### Steps/Code to Reproduce ```python from paramiko.config import SSHConfi...
diff --git a/paramiko/config.py b/paramiko/config.py index 8ab55c6..47e6197 100644 --- a/paramiko/config.py +++ b/paramiko/config.py @@ -221,28 +221,21 @@ class SSHConfig: .. versionchanged:: 3.3 Added ``Match final`` support. """ - # First pass options = self._lookup(host...
["tests/test_config.py::TestSSHConfig::test_from_text", "tests/test_config.py::TestSSHConfig::test_from_file", "tests/test_config.py::TestSSHConfig::test_from_path", "tests/test_config.py::TestSSHConfig::test_host_config[irc.danger.com-values0]", "tests/test_config.py::TestSSHConfig::test_host_config[irc.example.com-va...
["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
45
82
1,125
0
0.6
1
0.75
1
0.3375
81.2875
4,958
swe_smith::train::20181
swe_smith
train
20,181
kurtmckee__feedparser.cad965a3.lm_rewrite__sytdbk6z
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
Category Parsing Issue in Namespace Class It seems there's a problem with how categories are being processed in the `Namespace` class. When parsing certain feeds, an error is raised due to unexpected handling of category elements. This issue appears to be related to the `_end_category` method, where the context for ca...
diff --git a/feedparser/namespaces/_base.py b/feedparser/namespaces/_base.py index 6299b02..2a92971 100644 --- a/feedparser/namespaces/_base.py +++ b/feedparser/namespaces/_base.py @@ -336,16 +336,29 @@ class Namespace: _start_keywords = _start_category def _end_category(self): - value = self.pop("ca...
["tests/test_well_formed.py::test_loose_parser[info1544]", "tests/test_well_formed.py::test_strict_parser[info1544]", "tests/test_well_formed.py::test_loose_parser[info1150]", "tests/test_well_formed.py::test_strict_parser[info1574]", "tests/test_well_formed.py::test_loose_parser[info1494]", "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
31
28
1,404
0
0.6
1
0.75
1
0.337333
81.287
4,959
swe_smith::train::42769
swe_smith
train
42,769
python-jsonschema__jsonschema.93e0caa5.func_pm_remove_cond__5sxb88a5
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
ImportError when importing deprecated classes from jsonschema package #### Description After upgrading, importing certain classes directly from the `jsonschema` package now raises `ImportError` instead of showing deprecation warnings as expected. #### Steps/Code to Reproduce ```python # These imports now fail with ...
diff --git a/jsonschema/__init__.py b/jsonschema/__init__.py index d8dec8c..e399fe2 100644 --- a/jsonschema/__init__.py +++ b/jsonschema/__init__.py @@ -44,44 +44,6 @@ def __getattr__(name): stacklevel=2, ) return _RefResolver - elif name == "ErrorTree": - warnings.warn( - ...
["jsonschema/tests/test_deprecations.py::TestDeprecations::test_RefResolutionError", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_WrappedReferencingError_hashability", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_catching_Unresolvable_via_RefResolutionError", "jsonschema/tests/test_d...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
39
6
1,244
0
0.6
1
0.75
1
0.337333
81.287
4,960
swe_smith::train::18530
swe_smith
train
18,530
HIPS__autograd.ac044f0d.lm_rewrite__fh3evj1w
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
Kronecker Product Reshape Error Description Encountered an issue with the Kronecker product operation that results in a reshape error. This seems to occur when attempting to compute the Kronecker product of two arrays with specific dimensions. Reproduction Steps: 1. Create two arrays, `A` and `B`, with the followin...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..fc60bff 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -380,20 +380,50 @@ def grad_kron(argnum, ans, orig_A, orig_B): orig_B_shape = anp.shape(orig_B) def vjp(G): - A, B = anp.atle...
["tests/test_systematic.py::test_kron"]
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
54
1
944
0
0.6
1
0.75
1
0.337333
81.287
4,961
swe_smith::train::27906
swe_smith
train
27,906
jsvine__pdfplumber.02ff4313.func_pm_ctrl_shuffle__y2t5fu7f
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
Page initialization fails with UnboundLocalError when accessing page attributes #### Description When trying to access basic page attributes or perform operations on PDF pages, an `UnboundLocalError` is raised for the local variable `value` in the `get_attr` function. This appears to affect most page operations inclu...
diff --git a/pdfplumber/page.py b/pdfplumber/page.py index 71330d8..39c42c4 100644 --- a/pdfplumber/page.py +++ b/pdfplumber/page.py @@ -219,39 +219,38 @@ class Page(Container): initial_doctop: T_num = 0, ): self.pdf = pdf - self.root_page = self - self.page_obj = page_obj - ...
["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_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::test_invalid_crops", "tests/test_basics.py::Test::...
["tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_metadata", "tests/test_convert.py::Test::test_cli_structure", "tests/test_issues.py::Test::test_issue_297", "tests/test_repair.py::Test::test_bad_repair_path", "tests/test_repair.py::Test::test_repair_setting", "tests/test_table.py::Test...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
39
118
1,244
0
0.6
1
0.75
1
0.337333
81.287
4,962
swe_smith::train::46568
swe_smith
train
46,568
python-trio__trio.cfbbe2c1.combine_file__59erzbqg
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SocketStream constructor accepts SOCK_DGRAM sockets when it should only accept SOCK_STREAM #### Description The SocketStream constructor is incorrectly accepting SOCK_DGRAM sockets instead of rejecting them. According to the class design, SocketStream should only work with SOCK_STREAM sockets, but the validation logi...
diff --git a/src/trio/_highlevel_socket.py b/src/trio/_highlevel_socket.py index c04e66e..116205b 100644 --- a/src/trio/_highlevel_socket.py +++ b/src/trio/_highlevel_socket.py @@ -37,10 +37,10 @@ def _translate_socket_errors_to_stream_errors() -> Generator[None, None, None]: try: yield except OSErro...
["src/trio/_tests/test_highlevel_socket.py::test_SocketStream_basics", "src/trio/_tests/test_highlevel_socket.py::test_SocketStream_generic"]
["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
39
2
1,243
0
0.6
1
0.75
1
0.337167
81.2865
4,963
swe_smith::train::33939
swe_smith
train
33,939
pallets__click.fde47b4b.pr_2555
swesmith/pallets__click.fde47b4b
pallets/click
python
null
Error in click.utils.echo() when console is unavailable The `click.utils.echo()` function does not seem to account for the case when the console is not available on Windows, i.e., when running under `pythonw.exe` interpreter instead of the `python.exe` one. Minimal example: ```python # program.py import sys import os...
diff --git a/src/click/_compat.py b/src/click/_compat.py index feb8366..2f80562 100644 --- a/src/click/_compat.py +++ b/src/click/_compat.py @@ -577,17 +577,13 @@ def isatty(stream: t.IO[t.Any]) -> bool: def _make_cached_stream_func( - src_func: t.Callable[[], t.TextIO | None], - wrapper_func: t.Callable[[],...
["tests/test_utils.py::test_echo_no_streams"]
["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
3
25
1
1,522
0
0.6
1
0.75
1
0.337
81.286
4,964
swe_smith::train::39165
swe_smith
train
39,165
pallets__jinja.ada0a9a6.func_basic__p4glgzie
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
select_template returns None instead of raising TemplatesNotFound When using `select_template` with a list of template names where none of the templates exist, the method returns `None` instead of raising a `TemplatesNotFound` exception as expected. #### Steps/Code to Reproduce ```python from jinja2 import Environme...
diff --git a/src/jinja2/environment.py b/src/jinja2/environment.py index 0b303d5..ea779a7 100644 --- a/src/jinja2/environment.py +++ b/src/jinja2/environment.py @@ -1021,52 +1021,26 @@ class Environment: parent: t.Optional[str] = None, globals: t.Optional[t.MutableMapping[str, t.Any]] = None, ) -...
["tests/test_api.py::TestExtendedAPI::test_get_template_undefined", "tests/test_async.py::TestAsyncIncludes::test_choice_includes", "tests/test_imports.py::TestIncludes::test_choice_includes"]
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
42
3
1,181
0
0.6
1
0.75
1
0.336833
81.2855
4,965
swe_smith::train::19447
swe_smith
train
19,447
seperman__deepdiff.ed252022.func_pm_remove_wrapper__ha5adquy
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepDiff crashes with TypeError when using iterable_compare_func #### Description When using `iterable_compare_func` parameter with DeepDiff, the comparison fails with a TypeError. This appears to affect various scenarios including nested data structures, custom operators, and delta operations. #### Steps/Code to Re...
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..628254b 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -770,51 +770,6 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): t1_from_index=t1_from_index, t1_to_index=t1_to_index, t2_from_index=t2_...
["tests/test_delta.py::TestDeltaCompareFunc::test_compare_func1", "tests/test_delta.py::TestDeltaCompareFunc::test_compare_func_with_duplicates_removed", "tests/test_delta.py::TestDeltaCompareFunc::test_compare_func_with_duplicates_added", "tests/test_delta.py::TestDeltaCompareFunc::test_compare_func_swap", "tests/test...
["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
45
7
1,121
0
0.6
1
0.75
1
0.336833
81.2855
4,966
swe_smith::train::1727
swe_smith
train
1,727
agronholm__typeguard.b6a7e438.combine_module__t51dpfs3
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Instrumented functions fail with AttributeError when using closures #### Description When using the `@typechecked` decorator on functions that capture variables from their enclosing scope (closures), the instrumented function fails with an `AttributeError` because the closure handling code was removed. #### Steps/Co...
diff --git a/src/typeguard/_decorators.py b/src/typeguard/_decorators.py index a6c20cb..0642f59 100644 --- a/src/typeguard/_decorators.py +++ b/src/typeguard/_decorators.py @@ -101,15 +101,6 @@ def instrument(f: T_CallableOrType) -> FunctionType | str: frame = cast(FrameType, frame.f_back) frame_local...
["tests/test_checkers.py::TestBytesLike::test_fail", "tests/test_checkers.py::TestFloat::test_bad_type", "tests/test_checkers.py::TestComplexNumber::test_bad_type", "tests/test_checkers.py::TestLiteral::test_literal_union", "tests/test_checkers.py::TestLiteral::test_literal_nested", "tests/test_checkers.py::TestMapping...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
2
44
148
1,141
0
0.6
1
0.75
1
0.336833
81.2855
4,967
swe_smith::train::34901
swe_smith
train
34,901
pyutils__line_profiler.a646bf0f.combine_module__0qe0up4e
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
Autoprofile functionality broken after recent changes #### Description The autoprofile feature is not working correctly. When running scripts with kernprof's `-p` flag to enable automatic profiling, the profiler fails to execute properly and produces errors. #### Steps/Code to Reproduce ```python # Create a simple ...
diff --git a/line_profiler/autoprofile/autoprofile.py b/line_profiler/autoprofile/autoprofile.py index 7331dcc..f8ae223 100644 --- a/line_profiler/autoprofile/autoprofile.py +++ b/line_profiler/autoprofile/autoprofile.py @@ -88,8 +88,8 @@ def run(script_file, ns, prof_mod, profile_imports=False): profile_impor...
["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
47
9
1,081
0
0.6
1
0.75
1
0.336833
81.2855
4,968
r2e_gym::train::300
r2e_gym
train
300
orange3__edd3a3045193f31a98b92eef5372aa328cf89737
orange3
biolab/orange3
python
edd3a3045193f31a98b92eef5372aa328cf89737
**Analysis:** - **Key Parts:** - **Commit Message:** Fix for Louvain clustering when input is a `Table` or `ndarray`. - **Test Results:** - Both tests (`test_orange_table` and `test_np_array`) failed in the old commit with `AttributeError: 'numpy.ndarray' object has no attribute 'X'`. - After the commit, b...
diff --git a/Orange/clustering/louvain.py b/Orange/clustering/louvain.py --- a/Orange/clustering/louvain.py +++ b/Orange/clustering/louvain.py @@ -41,8 +41,8 @@ """ # We do k + 1 because each point is closest to itself, which is not useful - knn = NearestNeighbors(n_neighbors=k_neighbors, metric=metric)....
diff --git a/Orange/tests/test_louvain.py b/Orange/tests/test_louvain.py --- a/Orange/tests/test_louvain.py +++ b/Orange/tests/test_louvain.py @@ -0,0 +1,26 @@ +# Test methods with long descriptive names can omit docstrings +# pylint: disable=missing-docstring + +import unittest +import numpy as np + +from Orange.data ...
null
null
namanjain12/orange3_final:edd3a3045193f31a98b92eef5372aa328cf89737
true
null
1
11
null
2,513
0
0.75
1
0.6375
1
0.4555
81.28525
4,969
swe_smith::train::18533
swe_smith
train
18,533
HIPS__autograd.ac044f0d.lm_rewrite__i3nen9x0
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
**Unexpected Behavior with np.repeat Functionality** **Describe the bug** Hello, I've encountered an issue with the `np.repeat` function in the latest version of the library. It seems that when using `np.repeat` with certain axis parameters, the function is unable to reshape the array as expected, resulting in a `Valu...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..68dede8 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -342,16 +342,27 @@ def grad_repeat(ans, x, repeats, axis=None): shape = anp.shape(x) def vjp(g): - if axis is None: # If axi...
["tests/test_linalg.py::test_eigvalh_lower", "tests/test_linalg.py::test_eigvalh_upper", "tests/test_linalg.py::test_eigvalh_lower_broadcasting", "tests/test_linalg.py::test_eigvalh_upper_broadcasting", "tests/test_linalg.py::test_eigvalh_lower_complex", "tests/test_linalg.py::test_eigvalh_upper_complex", "tests/test_n...
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
29
12
1,437
0
0.6
1
0.75
1
0.336167
81.2835
4,970
swe_smith::train::5893
swe_smith
train
5,893
mahmoud__boltons.3bfcfdd0.combine_file__wo79dyhv
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
# Callpoint.from_current() returns None and ExceptionInfo.from_current() swaps exception type and value **What happened**: When using `Callpoint.from_current()`, it returns `None` instead of a valid Callpoint object. Additionally, `ExceptionInfo.from_current()` swaps the exception type and value, causing incorrect exc...
diff --git a/boltons/tbutils.py b/boltons/tbutils.py index bfc4984..4b1a49e 100644 --- a/boltons/tbutils.py +++ b/boltons/tbutils.py @@ -111,8 +111,8 @@ class Callpoint: @classmethod def from_current(cls, level=1): "Creates a Callpoint from the location of the calling function." - frame = sys....
["tests/test_tbutils.py::test_exception_info", "tests/test_tbutils.py::test_contextual", "tests/test_tbutils_parsed_exc.py::test_parsed_exc_basic", "tests/test_tbutils_parsed_exc.py::test_parsed_exc_nosrcline", "tests/test_tbutils_parsed_exc.py::test_parsed_exc_with_anchor"]
["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac...
jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0
true
null
1
13
5
1,757
0
0.6
1
0.75
1
0.336167
81.2835
4,971
r2e_gym::train::4718
r2e_gym
train
4,718
numpy__9db6f384962e8ed75540f22f2e039ed6af1a4cbe
numpy
numpy/numpy
python
9db6f384962e8ed75540f22f2e039ed6af1a4cbe
**Analysis:** - **Key Parts of Commit Details and Test Results:** - **Commit Message:** ``` BUG: infinite recursion in str of 0d subclasses. ``` - **Test Results:** - **Old Commit:** - `TestArrayRepr.test_0d_object_subclass` failed with `RecursionError: maximum recursion depth exceeded`. ...
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -468,14 +468,17 @@ # gracefully handle recursive calls, when object arrays contain themselves @_recursive_guard() def _array2string(a, options, separator=' ', prefix=""): - # The forma...
diff --git a/numpy/core/tests/test_arrayprint.py b/numpy/core/tests/test_arrayprint.py --- a/numpy/core/tests/test_arrayprint.py +++ b/numpy/core/tests/test_arrayprint.py @@ -33,6 +33,55 @@ "sub([[(1,), (1,)],\n" " [(1,), (1,)]], dtype=[('a', '<i4')])" ) + + def test_0d_object_...
null
null
namanjain12/numpy_final:9db6f384962e8ed75540f22f2e039ed6af1a4cbe
true
null
1
20
null
2,328
0
0.75
1
0.6375
1
0.454667
81.28275
4,972
swe_smith::train::43024
swe_smith
train
43,024
gawel__pyquery.811cd048.func_basic__3say7vzw
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
Form element value handling broken after recent changes #### Description The `.val()` method is not working correctly for form elements. Getting and setting values for inputs, textareas, and select elements is producing unexpected results. #### Steps/Code to Reproduce ```python from pyquery import PyQuery as pq # ...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..adb60b2 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -1003,10 +1003,10 @@ class PyQuery(list): """ def _get_value(tag): # <textarea> - if tag.tag == 'textarea': + if tag.tag == 'select...
["pyquery/pyquery.py::pyquery.pyquery.PyQuery.serialize", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.serialize_array", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.serialize_dict", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.serialize_pairs", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.val", "tests/test_pyquery.py:...
["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
32
23
1,375
0
0.6
1
0.75
1
0.335833
81.2825
4,973
swe_smith::train::46173
swe_smith
train
46,173
conan-io__conan.86f29e13.pr_14063
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
[Bug]: Git clone fails with paths containing spaces ### Bug summary When using the Git tool to clone a repository to a target path that contains spaces, the clone operation fails. This is because the target path is not properly quoted when it contains spaces. ### Code for reproduction ```python from conan import Co...
diff --git a/conan/tools/scm/git.py b/conan/tools/scm/git.py index c7bcb6f..933b413 100644 --- a/conan/tools/scm/git.py +++ b/conan/tools/scm/git.py @@ -216,12 +216,9 @@ class Git: url = url.replace("\\", "/") # Windows local directory mkdir(self.folder) self._conanfile.output.info("Clon...
["test/functional/tools/scm/test_git.py::TestGitBasicClone::test_clone_checkout", "test/functional/tools/scm/test_git.py::TestGitBasicClone::test_clone_url_not_hidden", "test/functional/tools/scm/test_git.py::TestGitBasicClone::test_clone_target", "test/functional/tools/scm/test_git.py::TestGitShallowClone::test_clone_...
["test/functional/tools/scm/test_git.py::TestGitBasicCapture::test_capture_commit_local", "test/functional/tools/scm/test_git.py::TestGitBasicCapture::test_capture_remote_url", "test/functional/tools/scm/test_git.py::TestGitBasicCapture::test_capture_remote_pushed_commit", "test/functional/tools/scm/test_git.py::TestGi...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
11
4
1,794
0
0.6
1
0.75
1
0.335667
81.282
4,974
swe_smith::train::9463
swe_smith
train
9,463
marshmallow-code__webargs.dbde72fe.combine_file__0nt3a64o
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
MultiDictProxy constructor arguments swapped causing parsing failures #### Description The MultiDictProxy class has its constructor arguments mixed up, causing widespread parsing failures across all web framework parsers. When creating a MultiDictProxy instance, the multidict and schema parameters appear to be assign...
diff --git a/src/webargs/multidictproxy.py b/src/webargs/multidictproxy.py index de9b82b..4985749 100644 --- a/src/webargs/multidictproxy.py +++ b/src/webargs/multidictproxy.py @@ -25,18 +25,17 @@ class MultiDictProxy(MutableMapping): ma.fields.Tuple, ), ): - self.data = multidict - ...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_or_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_default", "tests/test_aioh...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_with_charset", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_with_vendor_media_type", "tests/...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
29
172
1,434
0
0.6
1
0.75
1
0.335667
81.282
4,975
swe_smith::train::1971
swe_smith
train
1,971
agronholm__typeguard.b6a7e438.lm_rewrite__nqrq3e2w
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
### TypeCheckError with TypeGuard in Optimized Mode #### Description I've encountered an issue when using the `typeguard` library in optimized mode. It seems that type checking is not functioning as expected, leading to unexpected behavior in certain scenarios. Specifically, when running scripts with optimization fla...
diff --git a/src/typeguard/_functions.py b/src/typeguard/_functions.py index ca21c14..1e30274 100644 --- a/src/typeguard/_functions.py +++ b/src/typeguard/_functions.py @@ -115,37 +115,36 @@ def check_type( return value -def check_argument_types( - func_name: str, - arguments: dict[str, tuple[Any, Any]],...
["tests/test_importhook.py::test_blanket_import", "tests/test_instrumentation.py::test_type_checked_func_error[typechecked]", "tests/test_instrumentation.py::test_type_checked_method[typechecked]", "tests/test_instrumentation.py::test_type_checked_classmethod[typechecked]", "tests/test_instrumentation.py::test_type_che...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
35
32
1,314
0
0.6
1
0.75
1
0.335667
81.282
4,976
swe_smith::train::22242
swe_smith
train
22,242
tweepy__tweepy.91a41c6e.combine_file__eh14dsvt
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
# Cursor in tweepy is not working correctly I'm trying to use the Cursor functionality in tweepy but it's not working as expected. When I try to iterate through items or pages, I get errors. ## Reproduction Here's a simple example that fails: ```python from tweepy import Cursor, API, OAuth1UserHandler # Setup auth...
diff --git a/tweepy/cursor.py b/tweepy/cursor.py index 1db73e1..6660ec1 100644 --- a/tweepy/cursor.py +++ b/tweepy/cursor.py @@ -53,7 +53,9 @@ class Cursor: PageIterator Iterator to iterate through pages """ - self.iterator.limit = limit + if limit < 0: + limit = ...
["tests/test_cursors.py::TweepyCursorTests::testcursorcursoritems", "tests/test_cursors.py::TweepyCursorTests::testcursorcursorpages", "tests/test_cursors.py::TweepyCursorTests::testcursornext", "tests/test_cursors.py::TweepyCursorTests::testidcursoritems", "tests/test_cursors.py::TweepyCursorTests::testidcursorpages"]
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
33
5
1,353
0
0.6
1
0.75
1
0.3355
81.2815
4,977
swe_smith::train::6902
swe_smith
train
6,902
joke2k__faker.8b401a7d.lm_rewrite__xipiflqy
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# SSN generator doesn't validate taxpayer_identification_number_type parameter ## Description The `ssn()` method in the US SSN provider doesn't properly validate the `taxpayer_identification_number_type` parameter. Instead of raising a `ValueError` when an invalid type is provided, it defaults to generating a regular...
diff --git a/faker/providers/ssn/en_US/__init__.py b/faker/providers/ssn/en_US/__init__.py index 66f2a32..380f5ac 100644 --- a/faker/providers/ssn/en_US/__init__.py +++ b/faker/providers/ssn/en_US/__init__.py @@ -202,12 +202,11 @@ class Provider(BaseProvider): invalid_ssn = f"{area:03d}-{group:02d}-{serial:04d...
["tests/providers/test_ssn.py::TestEnUS::test_bad_tin_type", "tests/providers/test_ssn.py::TestEnUS::test_wrong_tin_type_case"]
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
38
2
1,253
0
0.6
1
0.75
1
0.3355
81.2815
4,978
swe_smith::train::46588
swe_smith
train
46,588
python-trio__trio.cfbbe2c1.combine_file__9lwfedhv
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
spawn_system_task returns 0 instead of raising RuntimeError when called outside async context #### Description When `spawn_system_task` is called outside of an async context, it should raise a `RuntimeError` with the message "must be called from async context". However, it currently returns `0` instead. #### Steps/C...
diff --git a/src/trio/_core/_generated_run.py b/src/trio/_core/_generated_run.py index 67d70d9..cecfaa4 100644 --- a/src/trio/_core/_generated_run.py +++ b/src/trio/_core/_generated_run.py @@ -57,7 +57,7 @@ def current_statistics() -> RunStatistics: """ try: - return GLOBAL_RUN_CONTEXT.runner.current...
["src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_autojump_clock_threshold_changing", "src/trio/_core/_tests/test_io.py::test_io_manager_statistics", "src/trio/_core/_tests/test_mock_clock.py::test_mock_clock_autojump", "src/trio/_core/_tests/test_mock_clock.py::test_mock_clock_autojump_interference", "src/tr...
["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
63
63
753
0
0.6
1
0.75
1
0.3355
81.2815
4,979
swe_smith::train::33292
swe_smith
train
33,292
django-money__django-money.835c1ab8.lm_rewrite__vnsz7l68
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
# QuerySet methods not working after applying money comprehension ### Describe the problem I'm trying to use money fields with Django querysets, but I'm encountering issues with basic queryset operations. After applying the money comprehension to a queryset, methods like `filter`, `update`, and other queryset operati...
diff --git a/djmoney/models/managers.py b/djmoney/models/managers.py index d76f0c5..d3bb91f 100644 --- a/djmoney/models/managers.py +++ b/djmoney/models/managers.py @@ -215,14 +215,25 @@ EXPAND_EXCLUSIONS = {"get_or_create": ("defaults",)} def add_money_comprehension_to_queryset(qs): - # Decorate each relevant ...
["tests/test_form.py::test_save", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs0-expected0]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs1-expected1]", "tests/test_models.py::TestVanillaMoneyField::test_creat...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
1
23
177
1,552
0
0.6
1
0.75
1
0.335333
81.281
4,980
swe_smith::train::39565
swe_smith
train
39,565
pallets__jinja.ada0a9a6.lm_rewrite__24zueesh
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
### Issue: TypeError in Autoescape and Macro Handling #### Description Hello! I've encountered a peculiar issue with the autoescape and macro handling in Jinja2. It seems like there's a TypeError occurring when using certain autoescape settings in templates. This is causing unexpected behavior in template rendering, ...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..2eaf0c6 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1950,19 +1950,11 @@ class CodeGenerator(NodeVisitor): self.leave_frame(scope_frame) self.pop_context_reference() - def visit_EvalContextModifier...
["tests/test_ext.py::TestExtensions::test_extend_late", "tests/test_ext.py::TestNewstyleInternationalization::test_autoescape_support", "tests/test_ext.py::TestNewstyleInternationalization::test_autoescape_macros", "tests/test_ext.py::TestAutoEscape::test_scoped_setting", "tests/test_ext.py::TestAutoEscape::test_nonvol...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
18
9
1,651
0
0.6
1
0.75
1
0.335167
81.2805
4,981
r2e_gym::train::5239
r2e_gym
train
5,239
pyramid__b932a45f834ae6bdb5850a2c58d1317844b32914
pyramid
pylons/pyramid
python
b932a45f834ae6bdb5850a2c58d1317844b32914
**Analysis:** - **Key Parts:** - The commit modifies the `pshell.py` script to handle specific shells more gracefully. - Before the commit, the test `test_command_loads_default_shell_with_unknown_shell` failed because `command.run()` returned `None` instead of `1` when an unknown shell was specified. - The chang...
diff --git a/docs/narr/commandline.rst b/docs/narr/commandline.rst --- a/docs/narr/commandline.rst +++ b/docs/narr/commandline.rst @@ -245,7 +245,7 @@ .. code-block:: text $ $VENV/bin/pshell starter/development.ini - Python 2.6.5 (r265:79063, Apr 29 2010, 00:31:32) + Python 2.6.5 (r265:79063, Apr 29 2010...
diff --git a/pyramid/tests/test_scripts/test_pshell.py b/pyramid/tests/test_scripts/test_pshell.py --- a/pyramid/tests/test_scripts/test_pshell.py +++ b/pyramid/tests/test_scripts/test_pshell.py @@ -89,6 +89,13 @@ def test_command_loads_default_shell_with_unknown_shell(self): command = self._makeOne() +...
null
null
namanjain12/pyramid_final:b932a45f834ae6bdb5850a2c58d1317844b32914
true
null
2
37
null
1,983
0
0.75
1
0.6375
1
0.453833
81.28025
4,982
swe_smith::train::35099
swe_smith
train
35,099
django__daphne.32ac73e1.func_basic__1kncx1a3
swesmith/django__daphne.32ac73e1
django/daphne
python
null
# [Bug]: WebSocket messages not being sent correctly after recent changes ## Description I've discovered an issue with WebSocket communication in Daphne. When trying to send messages over a WebSocket connection, the messages are not being delivered to the client. This happens for both text and binary messages. ## St...
diff --git a/daphne/ws_protocol.py b/daphne/ws_protocol.py index b1e29c3..92cafd0 100755 --- a/daphne/ws_protocol.py +++ b/daphne/ws_protocol.py @@ -253,9 +253,9 @@ class WebSocketProtocol(WebSocketServerProtocol): Server-side channel message to send a message. """ if self.state == self.STATE...
["tests/test_websocket.py::TestWebsocket::test_binary_frames", "tests/test_websocket.py::TestWebsocket::test_http_timeout", "tests/test_websocket.py::TestWebsocket::test_text_frames"]
["tests/test_checks.py::test_check_daphne_installed", "tests/test_cli.py::TestEndpointDescriptions::testBasics", "tests/test_cli.py::TestEndpointDescriptions::testFileDescriptorBinding", "tests/test_cli.py::TestEndpointDescriptions::testMultipleEnpoints", "tests/test_cli.py::TestEndpointDescriptions::testTcpPortBinding...
jyangballin/swesmith.x86_64.django_1776_daphne.32ac73e1
true
null
1
6
3
1,890
0
0.6
1
0.75
1
0.335
81.28
4,983
swe_smith::train::35071
swe_smith
train
35,071
pyutils__line_profiler.a646bf0f.lm_rewrite__0oz7n2aa
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
# Bug: Generator profiling doesn't handle send() method correctly ## Description When profiling a generator function with `ContextualProfile`, the `send()` method doesn't work correctly. The profiler wrapper doesn't properly handle the generator protocol, causing generators that use `send()` to fail. ## Steps to rep...
diff --git a/kernprof.py b/kernprof.py index 6b4aa2b..5b900b0 100755 --- a/kernprof.py +++ b/kernprof.py @@ -165,28 +165,14 @@ class ContextualProfile(Profile): """ @functools.wraps(func) def wrapper(*args, **kwds): - g = func(*args, **kwds) - # The first iterate will no...
["tests/test_kernprof.py::TestKernprof::test_gen_decorator"]
["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...
jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f
true
null
1
20
1
1,610
0
0.6
1
0.75
1
0.335
81.28
4,984
r2e_gym::train::5392
r2e_gym
train
5,392
aiohttp__6e4e554781dce834f9a1298f36f9382e57d5276d
aiohttp
aio-libs/aiohttp
python
6e4e554781dce834f9a1298f36f9382e57d5276d
**Analysis:** - **Key Parts:** - **Commit Message:** "Allow multiple waiters on transport drain." - **Commit Changes:** Introduction of the `_make_drain_waiter` method in `StreamProtocol`. - **Test Results:** The test `test_drain_waiter` failed in the old commit with `AttributeError: 'StreamProtocol' object has ...
diff --git a/CHANGES.txt b/CHANGES.txt --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,11 @@ CHANGES ======= + +0.7.1 (Unreleased) +------------------ + +- Allow multple waiters on transport drain. + 0.7.0 (04-16-2014) ------------------ diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py --- a/aiohttp/__init__...
diff --git a/tests/test_parsers.py b/tests/test_parsers.py --- a/tests/test_parsers.py +++ b/tests/test_parsers.py @@ -490,6 +490,18 @@ proto.data_received(b'data') proto.reader.feed_data.assert_called_with(b'data') + def test_drain_waiter(self): + proto = parsers.StreamProtocol(loop=unitt...
null
null
namanjain12/aiohttp_final:6e4e554781dce834f9a1298f36f9382e57d5276d
true
null
3
17
null
2,382
0
0.75
1
0.6375
1
0.453667
81.27975
4,985
r2e_gym::train::4242
r2e_gym
train
4,242
numpy__0bd86db79b7a8000f9dbd401df722ffae9c2b33c
numpy
numpy/numpy
python
0bd86db79b7a8000f9dbd401df722ffae9c2b33c
**Title:** TypeError When Using `return_indices` Parameter with `np.intersect1d` **Description:** When attempting to use the `return_indices` parameter with the `np.intersect1d` function, a `TypeError` is raised because the function does not recognize this keyword argument. **Example Code:** ```python import numpy as...
diff --git a/doc/release/1.15.0-notes.rst b/doc/release/1.15.0-notes.rst --- a/doc/release/1.15.0-notes.rst +++ b/doc/release/1.15.0-notes.rst @@ -162,6 +162,11 @@ architectures supported by iOS (i386, x86_64, armv7, armv7s and arm64), and combining these 5 compiled builds products into a single "fat" binary. +``re...
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py --- a/numpy/lib/tests/test_arraysetops.py +++ b/numpy/lib/tests/test_arraysetops.py @@ -32,7 +32,46 @@ assert_array_equal(c, ed) assert_array_equal([], intersect1d([], [])) - + + def test_intersect1d_in...
null
null
namanjain12/numpy_final:0bd86db79b7a8000f9dbd401df722ffae9c2b33c
true
null
2
71
null
1,301
0
0.75
1
0.6375
1
0.4535
81.27925
4,986
swe_smith::train::19445
swe_smith
train
19,445
seperman__deepdiff.ed252022.func_pm_remove_wrapper__dkg2qybg
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
Delta operations fail with NameError when accessing undefined variable #### Description When applying delta operations, the code fails with a `NameError: name 'current_old_value' is not defined` error. This happens because the variable `current_old_value` is referenced at the end of the `_get_elem_and_compare_to_old_...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..24ec37d 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -235,46 +235,7 @@ class Delta: forced_old_value=None, next_element=None, ): - # if forced_old_value is not None: - try: - if action == GET: ...
["tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-args2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t2_json.csv-t1.json-args3-0]", "tests/test_command.py::TestCommands::test_deep...
["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
39
98
1,227
0
0.6
1
0.75
1
0.3345
81.2785
4,987
swe_smith::train::46190
swe_smith
train
46,190
conan-io__conan.86f29e13.pr_14190
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
Graph HTML Error Reporting Fails with Version Conflicts I've encountered an issue when generating HTML output for graphs with version conflicts. The error reporting seems to be malfunctioning, and the expected error messages are not being displayed correctly. Here's a minimal example to reproduce the issue: ```pytho...
diff --git a/conan/cli/formatters/graph/graph.py b/conan/cli/formatters/graph/graph.py index 6b174f6..0df3f76 100644 --- a/conan/cli/formatters/graph/graph.py +++ b/conan/cli/formatters/graph/graph.py @@ -117,15 +117,23 @@ def format_graph_html(result): template_folder = os.path.join(conan_api.cache_folder, "templ...
["test/integration/command/info/test_graph_info_graphical.py::test_graph_info_html_error_reporting_output", "test/integration/command/info/test_graph_info_graphical.py::test_graph_conflict_diamond"]
["test/integration/command/info/test_graph_info_graphical.py::InfoTest::test_graph", "test/integration/command/info/test_graph_info_graphical.py::InfoTest::test_graph_html", "test/integration/command/info/test_graph_info_graphical.py::test_user_templates"]
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
26
2
1,487
0
0.6
1
0.75
1
0.3345
81.2785
4,988
swe_smith::train::5759
swe_smith
train
5,759
luozhouyang__python-string-similarity.115acaac.func_basic__0w9pdflo
swesmith/luozhouyang__python-string-similarity.115acaac
luozhouyang/python-string-similarity
python
null
[Bug]: String similarity calculations broken in ShingleBased class ### Bug summary The string similarity calculations in the ShingleBased class are producing incorrect results, causing multiple similarity metrics to fail. Specifically, the Cosine similarity is throwing ZeroDivisionError and the OverlapCoefficient is ...
diff --git a/strsimpy/shingle_based.py b/strsimpy/shingle_based.py index de3ddb8..8318fb9 100644 --- a/strsimpy/shingle_based.py +++ b/strsimpy/shingle_based.py @@ -34,11 +34,11 @@ class ShingleBased: def get_profile(self, string): shingles = dict() no_space_str = _SPACE_PATTERN.sub(" ", string) ...
["strsimpy/cosine_test.py::TestCosine::test_cosine", "strsimpy/overlap_coefficient_test.py::TestOverlapCoefficient::test_overlap_coefficient_halfsimilar_return1", "strsimpy/overlap_coefficient_test.py::TestOverlapCoefficient::test_overlap_coefficient_onestringissubset_return1", "strsimpy/overlap_coefficient_test.py::Te...
["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_common_subsequence_test.py::LongestCommonSubsequenceTest...
jyangballin/swesmith.x86_64.luozhouyang_1776_python-string-similarity.115acaac
true
null
1
8
5
1,846
0
0.6
1
0.75
1
0.334333
81.278
4,989
swe_smith::train::4268
swe_smith
train
4,268
pygments__pygments.27649ebb.func_pm_class_rm_funcs__kjd5za8u
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
ShellSessionBaseLexer missing get_tokens_unprocessed method #### Description After recent changes, shell session lexers (BashSessionLexer, TcshSessionLexer, MSDOSSessionLexer, PowerShellSessionLexer) are throwing NotImplementedError when trying to tokenize text. #### Steps/Code to Reproduce ```python from pygments....
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index 8f074c9..d2d581a 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -158,68 +158,6 @@ class ShellSessionBaseLexer(Lexer): _bare_continuation = False _venv = re.compile(r'^(\([^)]*\))(\s*)') - def get_tokens_unproc...
["tests/test_basic_api.py::test_random_input[MSDOSSessionLexer]", "tests/test_basic_api.py::test_lexer_options[TcshSessionLexer]", "tests/test_basic_api.py::test_random_input[TcshSessionLexer]", "tests/test_basic_api.py::test_random_input[BashSessionLexer]", "tests/test_basic_api.py::test_random_input[PowerShellSession...
["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
62
25
766
0
0.6
1
0.75
1
0.334333
81.278
4,990
swe_smith::train::29070
swe_smith
train
29,070
tox-dev__pipdeptree.c31b6418.combine_module__w33n6x60
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
Package DAG operations returning incorrect results #### Description Several core operations on PackageDAG are producing incorrect results. The dependency tree structure appears to be corrupted, affecting text rendering, reverse operations, and package lookups. #### Steps/Code to Reproduce ```python from pipdeptree....
diff --git a/src/pipdeptree/_models/dag.py b/src/pipdeptree/_models/dag.py index 2f5df60..3ae3876 100644 --- a/src/pipdeptree/_models/dag.py +++ b/src/pipdeptree/_models/dag.py @@ -110,9 +110,9 @@ class PackageDAG(Mapping[DistPackage, List[ReqPackage]]): """ try: - return self._index[node...
["tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_package_dag_filter_packages_uses_pep503normalize", "tests/_models/test...
["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_a", "tests/_models/test_dag.py::test_package_dag_filter_include_exclude_both_used", "tests/_models/test_dag.py::test_package_dag_filter_nonexistent_packages", "tests/_models/test_dag.py...
jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418
true
null
2
29
37
1,426
0
0.6
1
0.75
1
0.334333
81.278
4,991
swe_smith::train::42312
swe_smith
train
42,312
scanny__python-pptx.278b47b1.lm_rewrite__n2tneu4a
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
# Shape.shape_type property doesn't handle placeholder and freeform shapes correctly I found an issue with the `shape_type` property in the `Shape` class. The current implementation doesn't properly handle placeholder and freeform shapes. ## Current behavior When working with placeholder or freeform shapes, the `sha...
diff --git a/src/pptx/shapes/autoshape.py b/src/pptx/shapes/autoshape.py index c7f8cd9..49fe354 100644 --- a/src/pptx/shapes/autoshape.py +++ b/src/pptx/shapes/autoshape.py @@ -314,16 +314,20 @@ class Shape(BaseShape): @property def shape_type(self) -> MSO_SHAPE_TYPE: """Unique integer identifying th...
["tests/shapes/test_autoshape.py::DescribeShape::it_knows_its_shape_type_when_its_a_placeholder", "tests/shapes/test_autoshape.py::DescribeShape::and_it_knows_its_shape_type_when_its_not_a_placeholder", "tests/shapes/test_autoshape.py::DescribeShape::but_it_raises_when_shape_type_called_on_unrecognized_shape"]
["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
18
3
1,645
0
0.6
1
0.75
1
0.334167
81.2775
4,992
swe_smith::train::24405
swe_smith
train
24,405
sunpy__sunpy.f8edfd5c.lm_rewrite__me7wytwn
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
### Bug: Incorrect Transformation in GeocentricSolarMagnetospheric to Other Frames #### Description There seems to be an issue with the transformation from the GeocentricSolarMagnetospheric (GSM) frame to other magnetic frames. The transformation does not yield the expected results, leading to discrepancies in the ca...
diff --git a/sunpy/coordinates/_transformations.py b/sunpy/coordinates/_transformations.py index 5b18d02..4e1e5ee 100644 --- a/sunpy/coordinates/_transformations.py +++ b/sunpy/coordinates/_transformations.py @@ -1270,15 +1270,17 @@ def sm_to_gsm(smcoord, gsmframe): # First transform the SM coord to the GSM obstim...
["sunpy/coordinates/tests/test_transformations.py::test_magnetic_franz_harper[GeocentricSolarMagnetospheric-end_vector3-ITRS-start_vector0]", "sunpy/coordinates/tests/test_transformations.py::test_magnetic_franz_harper[GeocentricSolarMagnetospheric-end_vector3-Geomagnetic-start_vector1]", "sunpy/coordinates/tests/test_...
["sunpy/coordinates/tests/test_transformations.py::test_hcc_to_hgs", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc_sc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc_null", "sunpy/coordinates/tests/test_transformations.py...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
6
8
1,884
0
0.6
1
0.75
1
0.334
81.277
4,993
swe_smith::train::24886
swe_smith
train
24,886
marshmallow-code__marshmallow.9716fc62.func_pm_remove_assign__822jpp6u
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
[Bug]: Mapping field deserialization broken ### Bug summary The `Mapping` field in marshmallow is not properly deserializing values. When trying to deserialize a dictionary with a `Mapping` field, the values are not being processed correctly, leading to a `NameError` for `deser_val`. ### Code for reproduction ```py...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..45b6708 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -1656,11 +1656,10 @@ class Mapping(Field): else: for key, val in value.items(): try: - deser_val =...
["tests/test_deserialization.py::TestFieldDeserialization::test_structured_dict_value_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::test_structured_dict_key_value_deserialization", "tests/test_fields.py::TestDictNested::test_dict_nested_partial_propagated_to_nested", "tests/test_schema.py:...
["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
4
1,884
0
0.6
1
0.75
1
0.334
81.277
4,994
swe_smith::train::38135
swe_smith
train
38,135
weaveworks__grafanalib.5c3b17ed.lm_rewrite__6kahl75w
swesmith/weaveworks__grafanalib.5c3b17ed
weaveworks/grafanalib
python
null
# Dashboard with LokiTarget fails to render properly ## Description When creating a dashboard with a TimeSeries panel that includes a LokiTarget, the dashboard fails to render properly. The issue appears to be related to how targets are processed in the Dashboard's `to_json_data()` method. ## Steps to Reproduce ```py...
diff --git a/grafanalib/core.py b/grafanalib/core.py index 79849fe..03e1b21 100644 --- a/grafanalib/core.py +++ b/grafanalib/core.py @@ -1855,13 +1855,21 @@ class Dashboard(object): return self._map_panels(set_id) def to_json_data(self): - if self.panels and self.rows: - print( - ...
["grafanalib/tests/test_core.py::test_loki_target"]
["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_logs_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_...
jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed
true
null
1
32
1
1,364
0
0.6
1
0.75
1
0.334
81.277
4,995
swe_smith::train::45222
swe_smith
train
45,222
dask__dask.5f61e423.combine_module__90by4qj8
swesmith/dask__dask.5f61e423
dask/dask
python
null
Ellipsis handling in array indexing broken with dask arrays When using Ellipsis (`...`) in array indexing with dask arrays, the indexing fails with a `ValueError: The truth value of a Array is ambiguous. Use a.any() or a.all()` error. #### Steps/Code to Reproduce ```python import dask.array as da import numpy as np ...
diff --git a/dask/array/fft.py b/dask/array/fft.py index 07aed2e..6f07c44 100644 --- a/dask/array/fft.py +++ b/dask/array/fft.py @@ -85,26 +85,20 @@ def _hfft_out_chunks(a, s, axes): def _ihfft_out_chunks(a, s, axes): + """For computing the output chunks of ihfft*""" assert len(axes) == 1 axis = axe...
["dask/array/tests/test_fft.py::test_fft_n_kwarg[ihfft]", "dask/array/tests/test_fft.py::test_wrap_ffts[float32-ihfft-numpy.fft]", "dask/array/tests/test_fft.py::test_wrap_ffts[float32-ihfft-scipy.fft]", "dask/array/tests/test_fft.py::test_wrap_ffts[float64-ihfft-numpy.fft]", "dask/array/tests/test_fft.py::test_wrap_ff...
["dask/array/tests/test_fft.py::test_cant_fft_chunked_axis[fft]", "dask/array/tests/test_fft.py::test_cant_fft_chunked_axis[ifft]", "dask/array/tests/test_fft.py::test_cant_fft_chunked_axis[rfft]", "dask/array/tests/test_fft.py::test_cant_fft_chunked_axis[irfft]", "dask/array/tests/test_fft.py::test_cant_fft_chunked_ax...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
2
44
56
1,123
0
0.6
1
0.75
1
0.333833
81.2765
4,996
swe_smith::train::10051
swe_smith
train
10,051
paramiko__paramiko.23f92003.combine_file__3lp0qguw
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP operations failing with unexpected errors after recent changes #### Description SFTP file operations are failing with various errors that seem to be related to message handling and packet transmission. Basic operations like creating files, reading directories, and file I/O are not working properly. #### Steps/C...
diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index cd3910d..b91110f 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -225,20 +225,17 @@ class SFTPServer(BaseSFTP, SubsystemHandler): msg = Message() msg.add_int(request_number) for item in args: - ...
["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_append", "tests/test_sftp.py::TestSFTP::test_rename", "tests/test_sftp.py::TestSFTP::testa_posix_rename", "tests/test...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
33
43
1,343
0
0.6
1
0.75
1
0.333833
81.2765
4,997
swe_smith::train::26542
swe_smith
train
26,542
pylint-dev__astroid.b114f6b5.lm_rewrite__6nid14xc
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
### Attribute Inference Error in BaseInstance #### Describe the bug After the recent changes, it seems that the `igetattr` method in the `BaseInstance` class is not handling attribute inference correctly. When attempting to infer attributes, an `AttributeInferenceError` is raised unexpectedly, particularly when deali...
diff --git a/astroid/bases.py b/astroid/bases.py index d91a4c9..79d9aa3 100644 --- a/astroid/bases.py +++ b/astroid/bases.py @@ -264,31 +264,20 @@ class BaseInstance(Proxy): pass return values - def igetattr( - self, name: str, context: InferenceContext | None = None - ) -> Iter...
["tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-True]", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-False]", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_where-True]", "t...
["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
35
175
1,303
0
0.6
1
0.75
1
0.333833
81.2765
4,998
swe_smith::train::17913
swe_smith
train
17,913
pyasn1__pyasn1.0f07d724.func_pm_ctrl_shuffle__46o8jsts
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
ConstructedAsn1Type.subtype() method broken due to code reorganization #### Description The `subtype()` method in `ConstructedAsn1Type` class appears to have been corrupted during a code reorganization. The method contains unreachable code and references undefined variables, causing `UnboundLocalError` when called. ...
diff --git a/pyasn1/type/base.py b/pyasn1/type/base.py index aa86e52..a637116 100644 --- a/pyasn1/type/base.py +++ b/pyasn1/type/base.py @@ -606,6 +606,19 @@ class ConstructedAsn1Type(Asn1Type): return clone def subtype(self, **kwargs): + + explicitTag = kwargs.pop('explicitTag', None) + + ...
["tests/codec/ber/test_decoder.py::ExpTaggedSequenceOfDecoderTestCase::testWithSchema", "tests/codec/ber/test_decoder.py::ExpTaggedSequenceOfDecoderTestCase::testWithoutSchema", "tests/codec/ber/test_decoder.py::ChoiceDecoderTestCase::testExplicitTag", "tests/codec/ber/test_decoder.py::ChoiceDecoderTestCase::testExplic...
["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
35
11
1,303
0
0.6
1
0.75
1
0.333833
81.2765
4,999
swe_bench::test::1109
swe_bench
test
1,109
matplotlib__matplotlib-26122
matplotlib/matplotlib
matplotlib/matplotlib
python
6391678cc16042ceebb1dec1a6e2aa224ce77366
imshow() should not modify axes aspect if transform != ax.transData. Currently, imshow() automatically updates the axes aspect via the `aspect` kwarg; its default, None, means `rcParams["image.aspect"]`, which is "equal" by default (i.e., square image pixels). If the `transform` kwarg is also passed, and set to someth...
Hi, If no one is working on this issue than i would like to give it a shot. Can you please guide how can i address this issue? Thanks. I honestly do not think that this is a "good first issue", especially due to the part about `transData` being a branch of some other transform. So in order not to confuse newcomers ...
diff --git a/galleries/examples/misc/demo_ribbon_box.py b/galleries/examples/misc/demo_ribbon_box.py --- a/galleries/examples/misc/demo_ribbon_box.py +++ b/galleries/examples/misc/demo_ribbon_box.py @@ -86,7 +86,7 @@ def main(): background_gradient[:, :, :3] = [1, 1, 0] background_gradient[:, :, 3] = [[0.1, 0...
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py --- a/lib/matplotlib/tests/test_image.py +++ b/lib/matplotlib/tests/test_image.py @@ -1491,3 +1491,14 @@ def test_axesimage_get_shape(): im.set_data(z) assert im.get_shape() == (4, 3) assert im.get_size() == im.get_shape...
["lib/matplotlib/tests/test_image.py::test_non_transdata_image_does_not_touch_aspect"]
["lib/matplotlib/tests/test_image.py::test_image_interps[png]", "lib/matplotlib/tests/test_image.py::test_image_interps[pdf]", "lib/matplotlib/tests/test_image.py::test_alpha_interp[png]", "lib/matplotlib/tests/test_image.py::test_interp_nearest_vs_none[pdf]", "lib/matplotlib/tests/test_image.py::test_figimage[png-Fals...
null
true
2023-06-14T09:23:45Z
2
25
1
1,302
0
0.8
1
0.55
1
0.300333
81.276