selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
5,100
swe_smith::train::24776
swe_smith
train
24,776
marshmallow-code__marshmallow.9716fc62.func_basic__uci75fg8
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Tuple field deserialization broken - returns list instead of tuple and incorrect validation behavior #### Description The Tuple field deserialization is completely broken. When deserializing valid tuple data, it returns a list instead of a tuple, and the validation logic is inverted causing errors to be raised when t...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..184c04c 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -862,25 +862,22 @@ class Tuple(Field): ) def _deserialize(self, value, attr, data, **kwargs) -> tuple: - if not utils.is_collection(v...
["tests/test_deserialization.py::TestFieldDeserialization::test_datetime_int_tuple_field_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::test_tuple_field_deserialize_invalid_item", "tests/test_deserialization.py::TestFieldDeserialization::test_tuple_field_deserialize_multiple_invalid_items",...
["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
13
8
1,689
0
0.6
1
0.75
1
0.324833
81.2495
5,101
swe_smith::train::29231
swe_smith
train
29,231
tox-dev__pipdeptree.c31b6418.lm_rewrite__cgt302ys
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
# DirectUrl property in PipBaseDistributionAdapter fails when read_text returns None #### Description I found an issue with the `direct_url` property in the `PipBaseDistributionAdapter` class. When `read_text()` returns `None` (which can happen when the direct URL metadata is not available), the code tries to parse `...
diff --git a/src/pipdeptree/_freeze.py b/src/pipdeptree/_freeze.py index e6aea91..073d881 100644 --- a/src/pipdeptree/_freeze.py +++ b/src/pipdeptree/_freeze.py @@ -57,19 +57,12 @@ class PipBaseDistributionAdapter: @property def direct_url(self) -> DirectUrl | None: - result = None - json_str ...
["tests/test_freeze.py::test_dist_to_frozen_repr"]
["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack...
jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418
true
null
1
17
1
1,609
0
0.6
1
0.75
1
0.324833
81.2495
5,102
r2e_gym::train::4015
r2e_gym
train
4,015
coveragepy__694435b844760ca0443cf87bf73a537f06c37d7d
coveragepy
nedbat/coveragepy
python
694435b844760ca0443cf87bf73a537f06c37d7d
**Title:** Syntax Error When Using `{% joined %}` Construct in Templite **Description:** When using the `{% joined %}` and `{% endjoined %}` tags in a template, a syntax error is raised, preventing the template from rendering correctly. This occurs even though the `{% joined %}` construct is intended to strip and join...
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -68,34 +68,34 @@ </div> <div id="source"> - {# These are the source lines, which are very sensitive to whitespace. -#} - {# The `{ # - # }` below are commen...
diff --git a/tests/test_templite.py b/tests/test_templite.py --- a/tests/test_templite.py +++ b/tests/test_templite.py @@ -270,6 +270,24 @@ ) self.try_render(" hello ", {}, " hello ") + def test_eat_whitespace(self): + self.try_render( + "Hey!\n" + "{% joined ...
null
null
namanjain12/coveragepy_final:694435b844760ca0443cf87bf73a537f06c37d7d
true
null
2
71
null
1,241
0
0.75
1
0.6375
1
0.4435
81.24925
5,103
swe_smith::train::919
swe_smith
train
919
oauthlib__oauthlib.1fd52536.lm_rewrite__uql5tgba
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
[Bug]: Custom validators not working for certain grant types ### Bug summary After recent changes to the `_setup_custom_validators` method in `GrantTypeBase`, authorization validators are no longer properly rejected for grant types that don't support them. ### Steps to reproduce ```python from oauthlib.oauth2 impor...
diff --git a/oauthlib/oauth2/rfc6749/grant_types/base.py b/oauthlib/oauth2/rfc6749/grant_types/base.py index d96a2db..4fbb8c4 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/base.py +++ b/oauthlib/oauth2/rfc6749/grant_types/base.py @@ -93,20 +93,25 @@ class GrantTypeBase: setattr(self, kw, val) def...
["tests/oauth2/rfc6749/grant_types/test_client_credentials.py::ClientCredentialsGrantTest::test_custom_auth_validators_unsupported", "tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::test_custom_auth_validators_unsupported", "tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
33
5
1,288
0
0.6
1
0.75
1
0.324667
81.249
5,104
swe_smith::train::28952
swe_smith
train
28,952
encode__starlette.db5063c2.pr_2141
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
### WebSocket: Unexpected Behavior with HTTP Response Start #### Description After a recent update, there seems to be an issue with handling WebSocket connections when sending HTTP response start messages. The application is not behaving as expected when multiple `websocket.http.response.start` messages are sent, lead...
diff --git a/starlette/websockets.py b/starlette/websockets.py index b7acaa3..7b7503d 100644 --- a/starlette/websockets.py +++ b/starlette/websockets.py @@ -61,15 +61,13 @@ class WebSocket(HTTPConnection): """ if self.application_state == WebSocketState.CONNECTING: message_type = message[...
["tests/test_websockets.py::test_send_denial_response[asyncio]", "tests/test_websockets.py::test_send_response_multi[asyncio]", "tests/test_websockets.py::test_send_response_duplicate_start[asyncio]", "tests/test_websockets.py::test_send_denial_response[trio]", "tests/test_websockets.py::test_send_response_multi[trio]"...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
8
6
1,788
0
0.6
1
0.75
1
0.324667
81.249
5,105
swe_smith::train::14452
swe_smith
train
14,452
caarlos0__env.56a09d29.lm_rewrite__94nubpc3
swesmith/caarlos0__env.56a09d29
caarlos0/env
go
null
AggregateError.Is() method breaks error checking with errors.Is() #### Description The `AggregateError.Is()` method implementation is causing `errors.Is()` to return `false` when it should return `true` for matching error types. This breaks error handling when using Go's standard error checking patterns. #### Steps/...
diff --git a/error.go b/error.go index d615912..099dcb1 100644 --- a/error.go +++ b/error.go @@ -48,11 +48,39 @@ func (e AggregateError) Unwrap() []error { // Is conforms with errors.Is. func (e AggregateError) Is(err error) bool { - for _, ie := range e.Errors { - if reflect.TypeOf(ie) == reflect.TypeOf(err) { + ...
["TestParsesEnvInvalidMap", "TestParseMapCustomKeyNoParser", "TestParseMapCustomValueNoParser", "TestParseMapCustomKeyTypeError", "TestParseMapCustomValueTypeError", "TestParsesEnvInnerFails", "TestParsesEnvInnerFailsMultipleErrors", "TestParsesEnvInnerInvalid", "TestInvalidBool", "TestInvalidInt", "TestInvalidUint", "...
["TestIssue245", "TestParsesEnv", "TestParsesEnv_Map", "TestParseCustomMapType", "TestParseMapCustomKeyType", "TestSetenvAndTagOptsChain", "TestJSONTag", "TestParsesEnvInner", "TestParsesEnvInner_WhenInnerStructPointerIsNil", "TestParsesEnvInnerNil", "TestParsesEnvNested", "TestEmptyVars", "TestPassAnInvalidPtr", "Test...
jyangballin/swesmith.x86_64.caarlos0_1776_env.56a09d29
true
null
1
32
49
1,307
0
0.6
1
0.75
1
0.3245
81.2485
5,106
swe_smith::train::5619
swe_smith
train
5,619
PyCQA__flake8.cf1542ce.lm_rewrite__fbj2cqze
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
ImportError not handled in multiprocessing pool initialization Description I noticed an issue with the multiprocessing pool initialization in flake8. When trying to run flake8 in an environment where multiprocessing is available but ImportError occurs during initialization, flake8 crashes instead of falling back to s...
diff --git a/src/flake8/checker.py b/src/flake8/checker.py index 329a2cc..66fe8f8 100644 --- a/src/flake8/checker.py +++ b/src/flake8/checker.py @@ -580,21 +580,28 @@ class FileChecker: self.run_physical_checks(line) -def _try_initialize_processpool( - job_count: int, - argv: Sequence[str], -...
["tests/integration/test_checker.py::test_acquire_when_multiprocessing_pool_can_initialize", "tests/integration/test_checker.py::test_acquire_when_multiprocessing_pool_can_not_initialize"]
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker....
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
1
31
2
1,326
0
0.6
1
0.75
1
0.324333
81.248
5,107
swe_smith::train::3347
swe_smith
train
3,347
pygments__pygments.27649ebb.combine_file__aft01d88
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
GroffFormatter broken after recent changes Description The GroffFormatter is completely broken and throws TypeErrors when trying to format code. Basic functionality like highlighting Python code fails with "list indices must be integers or slices, not Token" errors. Steps/Code to Reproduce ```python from pygments i...
diff --git a/pygments/formatters/groff.py b/pygments/formatters/groff.py index a9e0711..5a6d781 100644 --- a/pygments/formatters/groff.py +++ b/pygments/formatters/groff.py @@ -45,34 +45,34 @@ class GroffFormatter(Formatter): def __init__(self, **options): Formatter.__init__(self, **options) - se...
["tests/test_groff_formatter.py::test_inheritance_custom_tokens", "tests/test_groff_formatter.py::test_basic", "tests/test_basic_api.py::test_formatter_unicode_handling[GroffFormatter]", "tests/test_basic_api.py::test_formatter_public_api[GroffFormatter]"]
["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
52
4
906
0
0.6
1
0.75
1
0.324333
81.248
5,108
swe_smith::train::19498
swe_smith
train
19,498
seperman__deepdiff.ed252022.lm_rewrite__acqa538z
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
# Delta fails to properly handle iterable_item_moved when iterable_item_removed is None #### Minimal example ```python from deepdiff import DeepDiff, Delta # Create two lists with items that will be moved t1 = [{'id': 1, 'val': 1}, {'id': 2, 'val': 2}, {'id': 3, 'val': 3}] t2 = [{'id': 3, 'val': 3}, {'id': 2, 'val': ...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..193b062 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -661,17 +661,21 @@ class Delta: def _do_iterable_item_removed(self): - iterable_item_removed = self.diff.get('iterable_item_removed', {}) - + iterable_item_removed =...
["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_path_specific", "t...
["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
16
5
1,625
0
0.6
1
0.75
1
0.324167
81.2475
5,109
swe_smith::train::51725
swe_smith
train
51,725
pydicom__pydicom.7d361b3d.func_basic__33w4wfrz
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Codify utility swaps element and dataset variables causing AttributeError #### Description The codify utility is incorrectly swapping the `element` and `ds` variables, causing it to try to access attributes on the wrong objects. This results in `AttributeError` when trying to access `.filename` on an element instead ...
diff --git a/src/pydicom/util/codify.py b/src/pydicom/util/codify.py index 5cc9f4b..ff57010 100644 --- a/src/pydicom/util/codify.py +++ b/src/pydicom/util/codify.py @@ -466,37 +466,33 @@ def set_parser_arguments( def do_codify(args: argparse.Namespace) -> None: - # Convert the requested dataset to python/pydico...
["tests/test_cli.py::TestCLIcall::test_codify_command", "tests/test_cli.py::TestCLIcall::test_codify_data_element", "tests/test_cli.py::TestCLIcall::test_codify_UTF8", "tests/test_util.py::TestCodify::test_code_file", "tests/test_util.py::TestCodify::test_code_file_save_as", "tests/test_util.py::TestCodify::test_code_f...
["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
30
6
1,345
0
0.6
1
0.75
1
0.324167
81.2475
5,110
swe_smith::train::24584
swe_smith
train
24,584
marshmallow-code__marshmallow.9716fc62.combine_file__x2xypft4
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Error handling broken after recent changes #### Description Schema validation is not working properly - errors are not being stored or raised when they should be. When trying to validate invalid data, no ValidationError is raised and the errors dictionary comes back empty. #### Steps/Code to Reproduce ```python fro...
diff --git a/src/marshmallow/error_store.py b/src/marshmallow/error_store.py index 72b7037..419d43e 100644 --- a/src/marshmallow/error_store.py +++ b/src/marshmallow/error_store.py @@ -15,14 +15,11 @@ class ErrorStore: self.errors = {} def store_error(self, messages, field_name=SCHEMA, index=None): - ...
["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::TestValidatesDecorator::test_validates", "tests/test_decorat...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::TestPassOriginal::test_pass_original_single", "tests/test_decorators.py::TestPassOriginal::test_pass_original_many", "tests/test_decorators.py::test_decorated_processor_...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
37
185
1,205
0
0.6
1
0.75
1
0.324167
81.2475
5,111
swe_smith::train::20440
swe_smith
train
20,440
tobymao__sqlglot.036601ba.combine_module__o0tnv74o
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Teradata interval_sql function has undefined variable error #### Description When using Teradata dialect with WEEK or QUARTER intervals, the code throws an `UnboundLocalError` because the `unit` variable is referenced before being defined. #### Steps/Code to Reproduce ```python import sqlglot from sqlglot import tr...
diff --git a/sqlglot/dialects/hive.py b/sqlglot/dialects/hive.py index 6084d44..085dbdd 100644 --- a/sqlglot/dialects/hive.py +++ b/sqlglot/dialects/hive.py @@ -84,28 +84,34 @@ def _add_date_sql(self: Hive.Generator, expression: DATE_ADD_OR_SUB) -> str: def _date_diff_sql(self: Hive.Generator, expression: exp.Date...
["tests/dialects/test_hive.py::TestHive::test_time", "tests/dialects/test_teradata.py::TestTeradata::test_time"]
["tests/dialects/test_hive.py::TestHive::test_bits", "tests/dialects/test_hive.py::TestHive::test_cast", "tests/dialects/test_hive.py::TestHive::test_data_type", "tests/dialects/test_hive.py::TestHive::test_ddl", "tests/dialects/test_hive.py::TestHive::test_escapes", "tests/dialects/test_hive.py::TestHive::test_hive", ...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
2
54
2
865
0
0.6
1
0.75
1
0.324167
81.2475
5,112
swe_smith::train::27667
swe_smith
train
27,667
arrow-py__arrow.1d70d009.func_pm_class_rm_funcs__5sfhrvtq
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
Czech locale humanize/dehumanize broken after timeframe formatting changes #### Description When using Czech locale (`cs` or `cs-cz`) with Arrow's humanize/dehumanize functionality, an AttributeError is raised: `'dict' object has no attribute 'format'`. This affects all timeframe operations including seconds, minutes...
diff --git a/arrow/locales.py b/arrow/locales.py index 63b2d48..645d2b5 100644 --- a/arrow/locales.py +++ b/arrow/locales.py @@ -3291,34 +3291,6 @@ class CzechLocale(Locale): ] day_abbreviations = ["", "po", "út", "st", "čt", "pá", "so", "ne"] - def _format_timeframe(self, timeframe: TimeFrameLiteral, de...
["tests/test_arrow.py::TestArrowDehumanize::test_seconds", "tests/test_arrow.py::TestArrowDehumanize::test_minute", "tests/test_arrow.py::TestArrowDehumanize::test_minutes", "tests/test_arrow.py::TestArrowDehumanize::test_hour", "tests/test_arrow.py::TestArrowDehumanize::test_hours", "tests/test_arrow.py::TestArrowDehu...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
28
18
1,385
0
0.6
1
0.75
1
0.324167
81.2475
5,113
swe_smith::train::21367
swe_smith
train
21,367
rubik__radon.54b88e58.combine_module__q52zeeu8
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
Cyclomatic complexity output format broken after recent changes #### Description The cyclomatic complexity analysis is producing incorrect output formats. When running radon on code files, the JSON and XML outputs contain malformed data structures and incorrect field mappings. #### Steps/Code to Reproduce ```python...
diff --git a/radon/cli/harvest.py b/radon/cli/harvest.py index ac14fe5..5e02c08 100644 --- a/radon/cli/harvest.py +++ b/radon/cli/harvest.py @@ -157,7 +157,7 @@ class Harvester(object): def as_md(self): '''Format the results as Markdown.''' - raise NotImplementedError + return "" de...
["radon/tests/test_cli_harvest.py::test_base_as_md_not_implemented", "radon/tests/test_cli_harvest.py::test_cc_as_json_xml", "radon/tests/test_cli_tools.py::test_cc_to_dict[blocks0-dict_result0]", "radon/tests/test_cli_tools.py::test_cc_to_dict[blocks1-dict_result1]", "radon/tests/test_cli_tools.py::test_cc_to_dict[blo...
["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te...
jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58
true
null
2
24
9
1,464
0
0.6
1
0.75
1
0.324
81.247
5,114
swe_smith::train::27818
swe_smith
train
27,818
arrow-py__arrow.1d70d009.lm_rewrite__tco3uerq
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
# ISO week validation is missing in iso_to_gregorian function ## Describe the bug When using the `iso_to_gregorian` function with invalid ISO week values (like 0 or values greater than 53), the function doesn't validate these inputs properly. ## To Reproduce I was trying to convert ISO week dates to Gregorian dates...
diff --git a/arrow/util.py b/arrow/util.py index f3eaa21..321d5db 100644 --- a/arrow/util.py +++ b/arrow/util.py @@ -83,7 +83,8 @@ def normalize_timestamp(timestamp: float) -> float: # Credit to https://stackoverflow.com/a/1700069 -def iso_to_gregorian(iso_year: int, iso_week: int, iso_day: int) -> datetime.date: ...
["tests/test_factory.py::TestGet::test_one_arg_iso_calendar", "tests/test_util.py::TestUtil::test_iso_gregorian"]
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
34
2
1,264
0
0.6
1
0.75
1
0.324
81.247
5,115
swe_smith::train::52650
swe_smith
train
52,650
pydicom__pydicom.7d361b3d.lm_rewrite__3i3m6f54
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Issue: Registering Transfer Syntax Without Encoding Raises Unexpected Error #### Description When attempting to register a transfer syntax without specifying the encoding parameters, an unexpected `ValueError` is raised. This behavior seems inconsistent with the expected functionality, where the encoding should b...
diff --git a/src/pydicom/uid.py b/src/pydicom/uid.py index 173a77b..ad68708 100644 --- a/src/pydicom/uid.py +++ b/src/pydicom/uid.py @@ -459,11 +459,8 @@ PrivateTransferSyntaxes = [] """ -def register_transfer_syntax( - uid: str | UID, - implicit_vr: bool | None = None, - little_endian: bool | None = None...
["tests/test_uid.py::TestRegisterTransferSyntax::test_no_encoding_raises"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
37
1
1,204
0
0.6
1
0.75
1
0.324
81.247
5,116
swe_smith::train::7641
swe_smith
train
7,641
cantools__cantools.0c6a7871.func_basic__lp7ttp9k
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML loader returns empty messages list and swapped buses/nodes #### Description When loading ARXML files, the system loader is returning an empty messages list and the buses and nodes are swapped in the returned database object. #### Steps/Code to Reproduce ```python import cantools # Load any ARXML file db = ca...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..59201ec 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -142,41 +142,32 @@ class SystemL...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_database.py::CanToolsDataba...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
27
15
1,404
0
0.6
1
0.75
1
0.324
81.247
5,117
r2e_gym::train::4399
r2e_gym
train
4,399
numpy__bab798db40b1bd8e520fc884fab15fac83174114
numpy
numpy/numpy
python
bab798db40b1bd8e520fc884fab15fac83174114
**Title:** `numpy.linalg.pinv` Raises ValueError When Handling Stacks of Matrices **Description:** When using `numpy.linalg.pinv` to compute the pseudo-inverse of a stack of matrices, a `ValueError` is raised. This prevents the function from processing multiple matrices simultaneously. **Example Code:** ```python imp...
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 @@ -217,6 +217,10 @@ supported; by default a gfortran-compatible static archive ``openblas.a`` is looked for. +``np.linalg.pinv`` now works on stacked matrices +------------...
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py --- a/numpy/linalg/tests/test_linalg.py +++ b/numpy/linalg/tests/test_linalg.py @@ -712,12 +712,16 @@ assert_almost_equal(linalg.cond(A, inf), 3.) -class TestPinv(LinalgSquareTestCase, LinalgNonsquareTestCase): +class TestPi...
null
null
namanjain12/numpy_final:bab798db40b1bd8e520fc884fab15fac83174114
true
null
2
79
null
1,076
0
0.75
1
0.6375
1
0.442667
81.24675
5,118
swe_smith::train::2799
swe_smith
train
2,799
pudo__dataset.5c2dc8d3.combine_file__o64flik6
swesmith/pudo__dataset.5c2dc8d3
pudo/dataset
python
null
# Chunked operations not working correctly ## Description The chunked operations in the dataset module are not working correctly. When trying to use `ChunkedInsert` or `ChunkedUpdate`, the operations fail with various errors. ## To Reproduce Here's a simple example that demonstrates the issue with `ChunkedUpdate`: ...
diff --git a/dataset/chunked.py b/dataset/chunked.py index a5ca158..f772624 100644 --- a/dataset/chunked.py +++ b/dataset/chunked.py @@ -8,11 +8,11 @@ class InvalidCallback(ValueError): class _Chunker(object): def __init__(self, table, chunksize, callback): self.queue = [] - self.table = table - ...
["test/test_dataset.py::TableTestCase::test_chunked_insert", "test/test_dataset.py::TableTestCase::test_chunked_insert_callback", "test/test_dataset.py::TableTestCase::test_chunked_update"]
["test/test_dataset.py::DatabaseTestCase::test_contains", "test/test_dataset.py::DatabaseTestCase::test_create_table", "test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id1", "test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id2", "test/test_dataset.py::DatabaseTestCase::test_create_tabl...
jyangballin/swesmith.x86_64.pudo_1776_dataset.5c2dc8d3
true
null
1
34
3
1,263
0
0.6
1
0.75
1
0.323833
81.2465
5,119
r2e_gym::train::5476
r2e_gym
train
5,476
aiohttp__af647c3cfc86920aa8303e1357a5dc21b88b7f9f
aiohttp
aio-libs/aiohttp
python
af647c3cfc86920aa8303e1357a5dc21b88b7f9f
**Analysis:** - **Key Parts:** - **Commit Message:** "Add runtime type check for `ClientSession` `timeout` param." - **Changes in `client.py`:** Added a check to ensure that the `timeout` parameter is either `None` or an instance of `ClientTimeout`. If not, it raises a `ValueError`. - **Changes in Tests:** Remov...
diff --git a/CHANGES/8021.bugfix b/CHANGES/8021.bugfix --- a/CHANGES/8021.bugfix +++ b/CHANGES/8021.bugfix @@ -0,0 +1 @@ +Add runtime type check for ``ClientSession`` ``timeout`` parameter. diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -143,6 +143,7 @@ Hugo van Kemen...
diff --git a/tests/test_client_session.py b/tests/test_client_session.py --- a/tests/test_client_session.py +++ b/tests/test_client_session.py @@ -814,12 +814,6 @@ await session1.close() -async def test_client_session_timeout_argument() -> None: - session = ClientSession(timeout=500) - assert session.tim...
null
null
namanjain12/aiohttp_final:af647c3cfc86920aa8303e1357a5dc21b88b7f9f
true
null
3
11
null
2,435
0
0.75
1
0.6375
1
0.4425
81.24625
5,120
swe_smith::train::24566
swe_smith
train
24,566
marshmallow-code__marshmallow.9716fc62.combine_file__3v78pmpu
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Tuple field deserialization broken - returns list instead of tuple and inverts validation logic #### Description The Tuple field deserialization is completely broken. When deserializing valid tuple data, it raises ValidationError instead of returning the expected tuple. Additionally, it returns a list instead of a tu...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..a05ccf5 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -862,25 +862,22 @@ class Tuple(Field): ) def _deserialize(self, value, attr, data, **kwargs) -> tuple: - if not utils.is_collection(v...
["tests/test_deserialization.py::TestFieldDeserialization::test_custom_date_format_datetime_field_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::test_iso_datetime_field_deserialization[2013-11-10T01:23:45-expected0-False-iso]", "tests/test_deserialization.py::TestFieldDeserialization::test_...
["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
27
33
1,402
0
0.6
1
0.75
1
0.323667
81.246
5,121
swe_smith::train::14564
swe_smith
train
14,564
hukkin__tomli.443a0c1b.lm_rewrite__xukqe6wu
swesmith/hukkin__tomli.443a0c1b
hukkin/tomli
python
null
# Multiline strings in keys are incorrectly parsed ### Describe the bug When using multiline strings as keys in TOML, the parser incorrectly handles them. The current implementation of `parse_key_part` doesn't properly detect and parse multiline string keys (triple-quoted strings like `"""key"""` or `'''key'''`). ##...
diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index 16c76cd..aece428 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -459,20 +459,33 @@ def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]: def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]: + """Parse a single part of a key (e...
["tests/test_data.py::TestData::test_invalid"]
["tests/test_data.py::TestData::test_valid", "tests/test_error.py::TestError::test_deprecated_tomldecodeerror", "tests/test_error.py::TestError::test_invalid_char_quotes", "tests/test_error.py::TestError::test_invalid_parse_float", "tests/test_error.py::TestError::test_line_and_col", "tests/test_error.py::TestError::te...
jyangballin/swesmith.x86_64.hukkin_1776_tomli.443a0c1b
true
null
1
33
1
1,282
0
0.6
1
0.75
1
0.323667
81.246
5,122
swe_smith::train::11845
swe_smith
train
11,845
andialbrecht__sqlparse.e57923b3.func_pm_class_rm_funcs__z0ck46rd
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
Case statement formatting broken after method removal #### Description CASE statements are no longer being formatted correctly. When trying to format SQL with CASE statements, an AttributeError is raised indicating that the `get_cases` method is missing from the Case class. #### Steps/Code to Reproduce ```python im...
diff --git a/sqlparse/sql.py b/sqlparse/sql.py index 1037375..5fe951c 100644 --- a/sqlparse/sql.py +++ b/sqlparse/sql.py @@ -575,54 +575,6 @@ class Case(TokenList): M_OPEN = T.Keyword, 'CASE' M_CLOSE = T.Keyword, 'END' - def get_cases(self, skip_ws=False): - """Returns a list of 2-tuples (conditio...
["tests/test_format.py::TestFormatReindentAligned::test_case_statement", "tests/test_format.py::TestFormatReindentAligned::test_case_statement_with_between", "tests/test_format.py::TestFormatReindent::test_case", "tests/test_format.py::TestFormatReindent::test_case2"]
["tests/test_cli.py::test_cli_main_empty", "tests/test_cli.py::test_parser_empty", "tests/test_cli.py::test_main_help", "tests/test_cli.py::test_valid_args", "tests/test_cli.py::test_invalid_choice", "tests/test_cli.py::test_invalid_args", "tests/test_cli.py::test_invalid_infile", "tests/test_cli.py::test_invalid_outfi...
jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3
true
null
1
48
4
981
0
0.6
1
0.75
1
0.3235
81.2455
5,123
swe_smith::train::31398
swe_smith
train
31,398
benoitc__gunicorn.bacbf8aa.combine_file__s5i83zs6
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
# [Bug]: IPv6 address validation incorrectly accepts invalid addresses ### Bug summary I've discovered that the `is_ipv6()` function in Gunicorn is incorrectly validating IPv6 addresses. It's returning `True` for invalid IPv6 addresses, which could lead to connection issues when binding to these addresses. ### Steps...
diff --git a/gunicorn/util.py b/gunicorn/util.py index e66dbeb..0abb32c 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -212,11 +212,11 @@ def unlink(filename): def is_ipv6(addr): try: socket.inet_pton(socket.AF_INET6, addr) - except OSError: # not a valid address - return False - e...
["tests/test_reload.py::test_reload_on_syntax_error", "tests/test_reload.py::test_start_reloader_after_load_wsgi", "tests/test_util.py::test_is_ipv6[1200::AB00:1234::2552:7777:1313-False]", "tests/test_util.py::test_is_ipv6[1200:0000:AB00:1234:O000:2552:7777:1313-False]"]
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
10
4
1,741
0
0.6
1
0.75
1
0.3235
81.2455
5,124
swe_smith::train::9211
swe_smith
train
9,211
Knio__dominate.9082227e.combine_file__c41n4t58
swesmith/Knio__dominate.9082227e
knio/dominate
python
null
# [Bug]: Multiple issues with dominate library after recent changes ## Bug summary After recent changes to the dominate library, several critical functionalities are broken: 1. Decorators no longer work correctly 2. Attribute setting is broken 3. Async context handling is malfunctioning ## Code for reproduction ##...
diff --git a/dominate/dom_tag.py b/dominate/dom_tag.py index 44ca8ba..4ba6698 100644 --- a/dominate/dom_tag.py +++ b/dominate/dom_tag.py @@ -58,9 +58,11 @@ except ImportError: async_context_id = ContextVar('async_context_id', default = None) def _get_async_context_id(): - if async_context_id.get() is None: - as...
["tests/test_document.py::test_decorator", "tests/test_dom_tag_async.py::test_async_bleed", "tests/test_html.py::test_decorator", "tests/test_html.py::test_nested_decorator", "tests/test_html.py::test_attributes", "tests/test_html.py::test_nested_decorator_2"]
["tests/test_document.py::test_doc", "tests/test_document.py::test_bare_decorator", "tests/test_document.py::test_title", "tests/test_document.py::test_containers", "tests/test_document.py::test_attributes", "tests/test_document.py::test_repr", "tests/test_dom1core.py::test_dom", "tests/test_dom1core.py::test_element",...
jyangballin/swesmith.x86_64.knio_1776_dominate.9082227e
true
null
1
16
6
1,620
0
0.6
1
0.75
1
0.323333
81.245
5,125
swe_smith::train::9209
swe_smith
train
9,209
Knio__dominate.9082227e.combine_file__2zd38qg5
swesmith/Knio__dominate.9082227e
knio/dominate
python
null
# HTML escape function in dominate.util is broken The `escape` function in dominate.util has several issues that cause HTML escaping to fail in unexpected ways. I noticed that when trying to escape HTML content, the characters are not being properly escaped. This leads to potential security issues and incorrect rende...
diff --git a/dominate/util.py b/dominate/util.py index 1d730b3..6f3b5bd 100644 --- a/dominate/util.py +++ b/dominate/util.py @@ -52,7 +52,7 @@ def system(cmd, data=None): return out.decode('utf8') -def escape(data, quote=True): # stolen from std lib cgi +def escape(data, quote=True): ''' Escapes special c...
["tests/test_html.py::test_text", "tests/test_html.py::test_escape", "tests/test_html.py::test_verbatim_attributes", "tests/test_svg.py::test_linear_gradient", "tests/test_utils.py::test_url"]
["tests/test_document.py::test_doc", "tests/test_document.py::test_decorator", "tests/test_document.py::test_bare_decorator", "tests/test_document.py::test_title", "tests/test_document.py::test_containers", "tests/test_document.py::test_attributes", "tests/test_document.py::test_repr", "tests/test_dom1core.py::test_dom...
jyangballin/swesmith.x86_64.knio_1776_dominate.9082227e
true
null
1
10
5
1,739
0
0.6
1
0.75
1
0.323167
81.2445
5,126
swe_smith::train::9866
swe_smith
train
9,866
keleshev__schema.24a30457.lm_rewrite__rrsc35n6
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
Or with only_one=True doesn't raise an error when multiple keys match Description I found a bug in the `Or` class when using it with `only_one=True`. When validating data against a schema with an `Or` condition that has `only_one=True`, it should raise a `SchemaOnlyOneAllowedError` if multiple keys from the condition...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..075b47c 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -190,14 +190,13 @@ class Or(And[TSchema]): self.match_count: int = 0 super().__init__(*args, **kwargs) - def reset(self) -> None: - failed: bool = self.ma...
["test_schema.py::test_or_only_one"]
["test_schema.py::test_schema", "test_schema.py::test_validate_file", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_test", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema.py::test_strictly", "test_schema.py:...
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
13
1
1,679
0
0.6
1
0.75
1
0.323167
81.2445
5,127
swe_smith::train::49197
swe_smith
train
49,197
mozilla__bleach.73871d76.combine_module__ki23lppp
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parsing and tree building broken after recent changes #### Description Something's gone wrong with the HTML parsing. Basic operations like cleaning HTML and linkifying text are failing with various errors. The tree builder seems to be returning None instead of proper fragment objects, and there are issues with a...
diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py index 2869da0..99109f9 100644 --- a/bleach/_vendor/html5lib/treebuilders/base.py +++ b/bleach/_vendor/html5lib/treebuilders/base.py @@ -195,8 +195,6 @@ class TreeBuilder(object): def elementInScope(self, targ...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
2
41
183
1,118
0
0.6
1
0.75
1
0.323
81.244
5,128
swe_smith::train::28934
swe_smith
train
28,934
encode__starlette.db5063c2.lm_rewrite__udynhudj
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
# Using both lifespan and on_startup/on_shutdown handlers doesn't raise an error **Describe the bug** When initializing a Starlette application with both `lifespan` and `on_startup`/`on_shutdown` handlers, the application doesn't raise an error as expected. These options should be mutually exclusive. **To Reproduce**...
diff --git a/starlette/applications.py b/starlette/applications.py index 0a717bb..951038b 100644 --- a/starlette/applications.py +++ b/starlette/applications.py @@ -27,16 +27,13 @@ P = ParamSpec("P") class Starlette: """Creates an Starlette application.""" - def __init__( - self: AppType, - deb...
["tests/test_applications.py::test_app_add_event_handler[asyncio]", "tests/test_applications.py::test_app_add_event_handler[trio]", "tests/test_testclient.py::test_error_on_startup[asyncio]", "tests/test_testclient.py::test_error_on_startup[trio]"]
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
43
4
1,078
0
0.6
1
0.75
1
0.323
81.244
5,129
swe_smith::train::27142
swe_smith
train
27,142
tkrajina__gpxpy.09fc46b3.func_pm_ctrl_shuffle__6396edzh
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPXTrackSegment._get_interval_distances_ratios method broken due to variable scope issues #### Description The `_get_interval_distances_ratios` method in `GPXTrackSegment` class has variable scope issues that cause `UnboundLocalError` when trying to access local variables before they are defined. #### Steps/Code to ...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..a72d7b9 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -1091,14 +1091,16 @@ class GPXTrackSegment: previous_point = track_point def _get_interval_distances_ratios(self, interval: List[GPXTrackPoint], start: GPXTrackPoint, end: GPXTrackPoint) -...
["test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_add_missing_elevations", "test.py::GPXTests::test_add_missing_elevations_without_ele", "test.py::GPXTests::test_add_missing_speeds", "test.py::GPX...
["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_adjust_time_all", "test.py::GPXTests::test_adjust_time_tracks_only", "test.py::GPXTests::test_angle", "test.py::GPXTests::test_angle_0", "test.py::GP...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
27
7
1,397
0
0.6
1
0.75
1
0.322833
81.2435
5,130
swe_smith::train::39620
swe_smith
train
39,620
pallets__jinja.ada0a9a6.lm_rewrite__tanf892m
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
### Issue: TypeError in For Loop Parsing #### Description After the recent changes, there seems to be an issue with parsing `for` loops in templates. The `For` node is not being constructed correctly, leading to a `TypeError` when attempting to render templates that include `for` loops. This error occurs across vario...
diff --git a/src/jinja2/parser.py b/src/jinja2/parser.py index 817abec..0143201 100644 --- a/src/jinja2/parser.py +++ b/src/jinja2/parser.py @@ -235,23 +235,29 @@ class Parser: def parse_for(self) -> nodes.For: """Parse a for loop.""" - lineno = self.stream.expect("name:for").lineno - targ...
["tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_sandbox_max_range", "tests/test_api.py::TestMeta::test_find_undeclared_variables", "tests/test_api.py::TestStreaming::test_basic_streaming", "tests/test_api.py::TestStreaming::test_buffered_streaming", "tests/test_async.py::...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize", "tests/test_api.py::TestExtendedAPI::test_eval_final...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
32
153
1,297
0
0.6
1
0.75
1
0.322833
81.2435
5,131
r2e_gym::train::4899
r2e_gym
train
4,899
datalad__f2029223d9f6d87b56e194794b9ffa0486546625
datalad
datalad/datalad
python
f2029223d9f6d87b56e194794b9ffa0486546625
**Analysis** - **Key Parts of Commit Details and Test Results:** - **Commit Message:** "ENH: Allow borrowkwargs to work on only method too." - **Change in `borrowkwargs` Definition:** Made the `cls` parameter optional by setting `cls=None`. - **Test Results:** Previously, `test_borrow_kwargs` failed with a `Type...
diff --git a/datalad/dochelpers.py b/datalad/dochelpers.py --- a/datalad/dochelpers.py +++ b/datalad/dochelpers.py @@ -224,7 +224,7 @@ return _borrowdoc -def borrowkwargs(cls, methodname=None, exclude=None): +def borrowkwargs(cls=None, methodname=None, exclude=None): """Return a decorator which would bor...
diff --git a/datalad/tests/test_dochelpers.py b/datalad/tests/test_dochelpers.py --- a/datalad/tests/test_dochelpers.py +++ b/datalad/tests/test_dochelpers.py @@ -15,7 +15,7 @@ from ..dochelpers import single_or_plural, borrowdoc, borrowkwargs from ..dochelpers import exc_str -from .utils import assert_equal, asser...
null
null
namanjain12/datalad_final:f2029223d9f6d87b56e194794b9ffa0486546625
true
null
1
14
null
2,369
0
0.75
1
0.6375
1
0.4415
81.24325
5,132
swe_smith::train::35712
swe_smith
train
35,712
stanfordnlp__dspy.651a4c71.func_pm_remove_assign__m8m89mce
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Bug: StreamListener fails to process JSON streaming responses When using the StreamListener class with a JSONAdapter, the streaming functionality breaks due to missing variable definitions and incomplete handling of stream end conditions. ## Reproduction Steps Here's a minimal example to reproduce the issue: ```p...
diff --git a/dspy/streaming/streaming_listener.py b/dspy/streaming/streaming_listener.py index 67370dd..aac5813 100644 --- a/dspy/streaming/streaming_listener.py +++ b/dspy/streaming/streaming_listener.py @@ -46,8 +46,6 @@ class StreamListener: if isinstance(settings.adapter, JSONAdapter): start_i...
["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"]
["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
6
4
1,816
0
0.6
1
0.75
1
0.322667
81.243
5,133
swe_smith::train::49150
swe_smith
train
49,150
mozilla__bleach.73871d76.combine_file__snjcg4hw
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTMLUnicodeInputStream character reading broken after reset #### Description After calling `reset()` on an HTMLUnicodeInputStream instance, character reading becomes completely broken. The stream returns characters in reverse order, skips characters, or throws IndexError exceptions. #### Steps/Code to Reproduce ```...
diff --git a/bleach/_vendor/html5lib/_inputstream.py b/bleach/_vendor/html5lib/_inputstream.py index 0976251..86bb6a8 100644 --- a/bleach/_vendor/html5lib/_inputstream.py +++ b/bleach/_vendor/html5lib/_inputstream.py @@ -190,16 +190,16 @@ class HTMLUnicodeInputStream(object): def reset(self): self.chunk =...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
38
182
1,175
0
0.6
1
0.75
1
0.3225
81.2425
5,134
swe_smith::train::49155
swe_smith
train
49,155
mozilla__bleach.73871d76.combine_file__vw5eq076
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
URL parsing returns string instead of ParseResult object #### Description The `urlparse` function is returning a string representation instead of a proper ParseResult object, causing attribute access to fail. #### Steps/Code to Reproduce ```python from bleach._vendor.parse import urlparse # Basic URL parsing resul...
diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py index ac6e7a9..87ca60c 100644 --- a/bleach/_vendor/parse.py +++ b/bleach/_vendor/parse.py @@ -369,13 +369,13 @@ def urlparse(url, scheme='', allow_fragments=True): (e.g. netloc is a single string) and we don't expand % escapes.""" url, scheme, _co...
["tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_disallowed_attr", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_invalid_filter_attr", "tests/test_clean.py::test_poster_attribute", "tests/test_clean.py::test_attributes_wildcard", "tests/test_clean.p...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
49
25
954
0
0.6
1
0.75
1
0.322333
81.242
5,135
swe_smith::train::51524
swe_smith
train
51,524
pydicom__pydicom.7d361b3d.combine_file__me6rd7wj
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Hook registration swaps callbacks and silently ignores unknown hooks #### Description When registering hooks using `hooks.register_callback()`, the function incorrectly swaps the callbacks for `raw_element_value` and `raw_element_vr` hooks. Additionally, unknown hook names are silently ignored instead of raising an e...
diff --git a/src/pydicom/hooks.py b/src/pydicom/hooks.py index 106b001..d7169c5 100644 --- a/src/pydicom/hooks.py +++ b/src/pydicom/hooks.py @@ -86,14 +86,14 @@ class Hooks: see the documentation for the corresponding calling function. """ if not callable(func): - raise TypeErr...
["tests/test_config.py::TestSettings::test_reading_validation_mode_with_enforce_valid_values", "tests/test_dataelem.py::TestDataElement::test_private_tag_in_repeater_range", "tests/test_dataelem.py::TestDataElement::test_private_repeater_tag", "tests/test_dataelem.py::TestDataElement::test_reading_ds_with_known_tags_wi...
["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
27
20
1,394
0
0.6
1
0.75
1
0.322333
81.242
5,136
swe_smith::train::5301
swe_smith
train
5,301
PyCQA__flake8.cf1542ce.combine_module__a7f2sl8j
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
# [Bug]: Flake8 plugin loading issues ## Bug summary There are two issues with the plugin loading functionality in Flake8: 1. The `extend_default_select` method is being called with a string instead of a list, causing a type error 2. The plugin version reporting is incorrectly filtering out flake8 and local plugins ...
diff --git a/src/flake8/options/manager.py b/src/flake8/options/manager.py index 4fd26b2..1ccd3ea 100644 --- a/src/flake8/options/manager.py +++ b/src/flake8/options/manager.py @@ -259,10 +259,10 @@ class OptionManager: add_options(self) if loaded.plugin.entry_point.group == "flake8.exte...
["tests/integration/test_plugins.py::test_local_plugin_can_add_option", "tests/unit/plugins/finder_test.py::test_plugins_versions_str"]
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker....
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
2
6
2
1,814
0
0.6
1
0.75
1
0.322333
81.242
5,137
swe_smith::train::28409
swe_smith
train
28,409
encode__starlette.db5063c2.combine_module__70nqu4fx
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
ServerErrorMiddleware returns wrong status code and traceback order #### Description The ServerErrorMiddleware is returning a 404 "Not Found" response instead of the expected 500 "Internal Server Error" when handling exceptions. Additionally, the traceback frames appear to be displayed in the wrong order and some HTM...
diff --git a/starlette/middleware/base.py b/starlette/middleware/base.py index f51b13f..a828cb4 100644 --- a/starlette/middleware/base.py +++ b/starlette/middleware/base.py @@ -25,9 +25,10 @@ class _CachedRequest(Request): def __init__(self, scope: Scope, receive: Receive): super().__init__(scope, recei...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
["tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTTPMiddleware]", "tests/middleware/test_base.py::test_contextvars[trio-CustomMiddlewareWithoutBaseHTTPMiddleware]", "tests/middleware/test_cors.py::test_cors_allow_all[asyncio]", "tests/middleware/test_cors.py::test_cors_allow_all_exc...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
2
19
57
1,554
0
0.6
1
0.75
1
0.322333
81.242
5,138
swe_smith::train::18216
swe_smith
train
18,216
msiemens__tinydb.10644a0e.func_basic__37ggiioh
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Insert operations silently fail when document is not a Mapping #### Description When trying to insert documents that are not Mapping instances, the insert operation silently fails instead of raising an error or inserting the document. This causes unexpected behavior where documents are simply ignored without any indi...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..88ad483 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -190,30 +190,19 @@ class Table: def updater(table: dict): for document in documents: - # Make sure the document implements the ``Mapping`` interface ...
["tests/test_tinydb.py::test_custom_mapping_type_with_json", "tests/test_tinydb.py::test_unique_ids", "tests/test_tinydb.py::test_lastid_after_open", "tests/test_tinydb.py::test_doc_ids_json", "tests/test_tinydb.py::test_insert_string", "tests/test_tinydb.py::test_insert_invalid_dict", "tests/test_tinydb.py::test_query...
["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
23
7
1,474
0
0.6
1
0.75
1
0.322333
81.242
5,139
swe_smith::train::10690
swe_smith
train
10,690
paramiko__paramiko.23f92003.func_pm_class_rm_funcs__b1liiwib
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
KexGex missing parse_next method after refactoring #### Description After some recent changes, the `KexGex` class is missing the `parse_next` method which is required for key exchange operations. This causes SSH connections using Diffie-Hellman group exchange to fail. #### Steps/Code to Reproduce ```python import p...
diff --git a/paramiko/kex_gex.py b/paramiko/kex_gex.py index baa0803..018c6c0 100644 --- a/paramiko/kex_gex.py +++ b/paramiko/kex_gex.py @@ -89,40 +89,6 @@ class KexGex: self.transport._send_message(m) self.transport._expect_packet(_MSG_KEXDH_GEX_GROUP) - def parse_next(self, ptype, m): - ...
["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
35
8
1,233
0
0.6
1
0.75
1
0.322167
81.2415
5,140
swe_smith::train::10107
swe_smith
train
10,107
paramiko__paramiko.23f92003.combine_file__fd9pxaxk
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
RSAKey.get_name() method missing after refactoring #### Description After some recent changes to the RSAKey class, the `get_name()` method appears to have been accidentally removed, causing widespread failures across the codebase. Many components that rely on RSA key operations are now broken. #### Steps/Code to Rep...
diff --git a/paramiko/rsakey.py b/paramiko/rsakey.py index b7ad3ce..d3a3147 100644 --- a/paramiko/rsakey.py +++ b/paramiko/rsakey.py @@ -89,10 +89,10 @@ class RSAKey(PKey): @property def public_numbers(self): - if isinstance(self.key, rsa.RSAPrivateKey): + if not isinstance(self.key, rsa.RSAPu...
["tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::AgentKey_::fields::defers_to_inner_key_when_present[rsa]", "tests/agent.py::AgentKey_::asbytes::defers_to_inner_key_when_present[rsa]", "tests/pkey.py::PKey_::from_type_string::loads_from_type_and_bytes[rsa]", "tests/pkey.py::PKey...
["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_::get_bits::defers_to_inner_key_when_present[rsa]", "tests/pkey.p...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
46
110
1,013
0
0.6
1
0.75
1
0.322167
81.2415
5,141
swe_smith::train::47045
swe_smith
train
47,045
python-trio__trio.cfbbe2c1.func_pm_class_rm_funcs__0p0jewb0
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
WorkerThread missing __init__ method causes TypeError #### Description After recent changes, WorkerThread class is missing its `__init__` method, causing a TypeError when trying to instantiate worker threads. #### Steps/Code to Reproduce ```python import trio async def main(): # This will fail when trio tries ...
diff --git a/src/trio/_core/_thread_cache.py b/src/trio/_core/_thread_cache.py index 189d5a5..9013fc2 100644 --- a/src/trio/_core/_thread_cache.py +++ b/src/trio/_core/_thread_cache.py @@ -131,32 +131,6 @@ name_counter = count() class WorkerThread(Generic[RetT]): __slots__ = ("_default_name", "_job", "_thread", "...
["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_host_wakeup_doesnt_trigger_wait_all_tasks_blocked", "src/trio/_core/_tests/test_guest_mode.py::test_...
["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
49
121
953
0
0.6
1
0.75
1
0.322167
81.2415
5,142
swe_smith::train::45403
swe_smith
train
45,403
dask__dask.5f61e423.lm_rewrite__9q463451
swesmith/dask__dask.5f61e423
dask/dask
python
null
Binary Operator Method Issue with DataFrame Hello, I've encountered an issue with the binary operator methods for DataFrame in the latest update. It seems that when using certain operators with a `fill_value`, the operation does not behave as expected. Specifically, when attempting to perform operations like `radd`, ...
diff --git a/dask/dataframe/dask_expr/_collection.py b/dask/dataframe/dask_expr/_collection.py index 7aa07d4..a8a207c 100644 --- a/dask/dataframe/dask_expr/_collection.py +++ b/dask/dataframe/dask_expr/_collection.py @@ -193,24 +193,35 @@ def _wrap_expr_method_operator(name, class_): """ if class_ == DataFram...
["dask/dataframe/dask_expr/tests/test_collection.py::test_method_operators[series-True-add-None-None-columns]", "dask/dataframe/dask_expr/tests/test_collection.py::test_method_operators[series-True-add-None-None-1]", "dask/dataframe/dask_expr/tests/test_collection.py::test_method_operators[series-True-add-1-None-column...
["dask/dataframe/dask_expr/tests/test_collection.py::test_del", "dask/dataframe/dask_expr/tests/test_collection.py::test_info[True-None-True]", "dask/dataframe/dask_expr/tests/test_collection.py::test_info[True-None-False]", "dask/dataframe/dask_expr/tests/test_collection.py::test_info[True-None-None]", "dask/dataframe...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
40
136
1,133
0
0.6
1
0.75
1
0.322167
81.2415
5,143
swe_smith::train::39560
swe_smith
train
39,560
pallets__jinja.ada0a9a6.lm_rewrite__0poae8k5
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
### Unexpected AttributeError with Range and Loop Variables I've encountered an issue where using the `range` function in templates results in an `AttributeError`. This seems to occur when attempting to use `range` within loops or when dealing with loop variables. The error message indicates that an attribute is missi...
diff --git a/src/jinja2/parser.py b/src/jinja2/parser.py index 817abec..3355013 100644 --- a/src/jinja2/parser.py +++ b/src/jinja2/parser.py @@ -644,39 +644,42 @@ class Parser: return node def parse_primary(self) -> nodes.Expr: + """Parse a primary expression.""" token = self.stream.curr...
["tests/test_api.py::TestExtendedAPI::test_sandbox_max_range", "tests/test_api.py::TestMeta::test_find_undeclared_variables", "tests/test_async.py::TestAsyncForLoop::test_loop_filter", "tests/test_core_tags.py::TestForLoop::test_loop_filter", "tests/test_core_tags.py::TestSet::test_namespace_loop", "tests/test_lexnpars...
["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
43
14
1,072
0
0.6
1
0.75
1
0.322
81.241
5,144
swe_smith::train::5879
swe_smith
train
5,879
mahmoud__boltons.3bfcfdd0.combine_file__ozufqtez
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
# Bug: Issues with asciify and parse_int_list functions ## Description I've found two issues in the `strutils.py` module: ### Issue 1: asciify function doesn't properly handle non-ASCII characters When trying to convert text with non-ASCII characters to ASCII, the function fails with a UnicodeDecodeError. Steps to...
diff --git a/boltons/strutils.py b/boltons/strutils.py index 60f4652..8795bf1 100644 --- a/boltons/strutils.py +++ b/boltons/strutils.py @@ -424,16 +424,15 @@ def asciify(text, ignore=False): """ try: try: - return text.encode('ascii') + return text.encode('utf-8') exce...
["tests/test_strutils.py::test_asciify", "tests/test_strutils.py::test_parse_int_list"]
["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
2
1,672
0
0.6
1
0.75
1
0.322
81.241
5,145
swe_smith::train::49096
swe_smith
train
49,096
mozilla__bleach.73871d76.combine_file__4fxi6u9l
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
URL parsing broken after recent changes #### Description The URL parsing functionality appears to be completely broken. When trying to parse URLs, I'm getting `UnboundLocalError` exceptions indicating that local variables are being referenced before assignment. #### Steps/Code to Reproduce ```python from bleach._ve...
diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py index ac6e7a9..4ba9e84 100644 --- a/bleach/_vendor/parse.py +++ b/bleach/_vendor/parse.py @@ -362,21 +362,20 @@ _fix_result_transcoding() del _fix_result_transcoding def urlparse(url, scheme='', allow_fragments=True): - """Parse a URL into 6 componen...
["tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_disallowed_attr", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_invalid_filter_attr", "tests/test_clean.py::test_poster_attribute", "tests/test_clean.py::test_attributes_wildcard", "tests/test_clean.p...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
49
25
952
0
0.6
1
0.75
1
0.322
81.241
5,146
swe_smith::train::6523
swe_smith
train
6,523
mahmoud__boltons.3bfcfdd0.lm_rewrite__g0i2qs98
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
### Issue with FilePerms Permission Setting #### Description There seems to be an issue with the `FilePerms` class when setting permissions. The permissions are not being set correctly, leading to unexpected behavior. This might be related to recent changes in the permission handling logic. #### How to Reproduce He...
diff --git a/boltons/fileutils.py b/boltons/fileutils.py index 18c6656..c3126ac 100644 --- a/boltons/fileutils.py +++ b/boltons/fileutils.py @@ -125,25 +125,27 @@ class FilePerms: return getattr(fp_obj, self.attribute) def __set__(self, fp_obj, value): - cur = getattr(fp_obj, self.att...
["tests/test_fileutils.py::test_fileperms"]
["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
40
1
1,132
0
0.6
1
0.75
1
0.322
81.241
5,147
swe_smith::train::51506
swe_smith
train
51,506
pydicom__pydicom.7d361b3d.combine_file__hlm75eok
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
FileSet hierarchy traversal broken after recent changes #### Description The FileSet class is not properly building the directory record hierarchy when loading DICOMDIR files. The tree structure appears to be corrupted, causing issues with finding and accessing file instances. #### Steps/Code to Reproduce ```python...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..6f0313a 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -1733,26 +1733,26 @@ class FileSet: # Records not in the hierarchy will be ignored # Branches without a valid leaf node File ID will be removed ...
["tests/test_fileset.py::TestRecordNode::test_root", "tests/test_fileset.py::TestRecordNode::test_leaf", "tests/test_fileset.py::TestRecordNode::test_add", "tests/test_fileset.py::TestRecordNode::test_key", "tests/test_fileset.py::TestRecordNode::test_encoding", "tests/test_fileset.py::TestRecordNode::test_remove_raise...
["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
95
1,372
0
0.6
1
0.75
1
0.322
81.241
5,148
swe_smith::train::22384
swe_smith
train
22,384
tweepy__tweepy.91a41c6e.func_basic__pgj80icy
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### JSONParser returns unexpected results #### Description After applying the recent changes, the `JSONParser` in the `tweepy` library is returning unexpected results when parsing JSON payloads. This seems to affect various API interactions, leading to unexpected `NoneType` errors and `AttributeError` exceptions. ##...
diff --git a/tweepy/parsers.py b/tweepy/parsers.py index 2aee1a5..2a328ea 100644 --- a/tweepy/parsers.py +++ b/tweepy/parsers.py @@ -34,14 +34,14 @@ class JSONParser(Parser): def parse(self, payload, *, return_cursors=False, **kwargs): if not payload: - return + return [] ...
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
["tests/test_api.py::TweepyAPITests::testparserargumenthastobeaparserinstance", "tests/test_api.py::TweepyAPITests::testratelimitstatus", "tests/test_api.py::TweepyAPITests::testupdateprofilebannerimage", "tests/test_api.py::TweepyCacheTests::testfilecache", "tests/test_api.py::TweepyCacheTests::testmemorycache", "test...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
8
60
1,771
0
0.6
1
0.75
1
0.321833
81.2405
5,149
swe_smith::train::46632
swe_smith
train
46,632
python-trio__trio.cfbbe2c1.combine_file__jqcvcfi2
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
# UnboundedQueue implementation has several bugs causing incorrect behavior ## Description I've discovered several issues with the `UnboundedQueue` implementation that cause incorrect behavior: 1. The `qsize()` method incorrectly returns the length minus 1, which means it will report one less item than actually in t...
diff --git a/src/trio/_core/_unbounded_queue.py b/src/trio/_core/_unbounded_queue.py index b9e7974..d261058 100644 --- a/src/trio/_core/_unbounded_queue.py +++ b/src/trio/_core/_unbounded_queue.py @@ -79,7 +79,7 @@ class UnboundedQueue(Generic[T]): def qsize(self) -> int: """Returns the number of items ...
["src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_basic", "src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_blocking", "src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_fairness", "src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_trivial_yields", ...
["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
15
5
1,631
0
0.6
1
0.75
1
0.321833
81.2405
5,150
swe_smith::train::45173
swe_smith
train
45,173
modin-project__modin.8c7799fd.func_pm_remove_loop__q4zoiei2
swesmith/modin-project__modin.8c7799fd
modin-project/modin
python
null
# NumPy ufunc operations broken in Modin array implementation ## Description I've encountered a regression in the Modin NumPy array implementation where basic NumPy ufunc operations are no longer working. This is blocking my data processing pipeline that relies on these operations. ## Procedure to reproduce the prob...
diff --git a/modin/numpy/arr.py b/modin/numpy/arr.py index ab40eca..4fbe516 100644 --- a/modin/numpy/arr.py +++ b/modin/numpy/arr.py @@ -345,14 +345,6 @@ class array(object): f"{ufunc} method {method} is not yet supported in Modin. Defaulting to NumPy." ) args = []...
["modin/tests/numpy/test_array.py::test_array_ufunc[100]", "modin/tests/numpy/test_array.py::test_array_ufunc[size1]", "modin/tests/numpy/test_array.py::test_array_ufunc[size2]", "modin/tests/numpy/test_array.py::test_array_ufunc[size3]", "modin/tests/numpy/test_array.py::test_array_ufunc[size4]"]
["modin/tests/numpy/test_array.py::test_shape[100]", "modin/tests/numpy/test_array.py::test_shape[size1]", "modin/tests/numpy/test_array.py::test_shape[size2]", "modin/tests/numpy/test_array.py::test_shape[size3]", "modin/tests/numpy/test_array.py::test_shape[size4]", "modin/tests/numpy/test_array.py::test_dtype", "mod...
jyangballin/swesmith.x86_64.modin-project_1776_modin.8c7799fd
true
null
1
24
5
1,451
0
0.6
1
0.75
1
0.321833
81.2405
5,151
swe_smith::train::9218
swe_smith
train
9,218
Knio__dominate.9082227e.combine_file__n1qm27ke
swesmith/Knio__dominate.9082227e
knio/dominate
python
null
# Multiple issues with HTML escaping and file inclusion in dominate I've found several issues with the latest version of dominate that are causing unexpected behavior: ## Issue 1: HTML escaping is broken The `escape()` function in `util.py` is not properly escaping HTML entities. The order of replacements is incorre...
diff --git a/dominate/util.py b/dominate/util.py index 1d730b3..dc66746 100644 --- a/dominate/util.py +++ b/dominate/util.py @@ -37,9 +37,9 @@ def include(f): takes a filename ''' fl = open(f, 'r') - data = fl.read() + data = fl.readline() fl.close() - return raw(data) + return raw(data[::-1]) def ...
["tests/test_html.py::test_text", "tests/test_html.py::test_escape", "tests/test_html.py::test_verbatim_attributes", "tests/test_svg.py::test_linear_gradient", "tests/test_utils.py::test_include", "tests/test_utils.py::test_url"]
["tests/test_document.py::test_doc", "tests/test_document.py::test_decorator", "tests/test_document.py::test_bare_decorator", "tests/test_document.py::test_title", "tests/test_document.py::test_containers", "tests/test_document.py::test_attributes", "tests/test_document.py::test_repr", "tests/test_dom1core.py::test_dom...
jyangballin/swesmith.x86_64.knio_1776_dominate.9082227e
true
null
1
14
6
1,650
0
0.6
1
0.75
1
0.321667
81.24
5,152
swe_smith::train::5886
swe_smith
train
5,886
mahmoud__boltons.3bfcfdd0.combine_file__t1ybp4kc
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
PriorityQueue implementation in queueutils.py is broken Description I found several issues with the PriorityQueue implementation in boltons/queueutils.py that cause it to behave incorrectly. When using either HeapPriorityQueue or SortedPriorityQueue, the following issues occur: 1. The pop() method returns the wrong...
diff --git a/boltons/queueutils.py b/boltons/queueutils.py index f6e4e4c..af089af 100644 --- a/boltons/queueutils.py +++ b/boltons/queueutils.py @@ -176,17 +176,17 @@ class BasePriorityQueue: """ try: self._cull() - _, _, task = self._pop_entry(self._pq) + _, task, _...
["tests/test_queueutils.py::test_heap_queue", "tests/test_queueutils.py::test_sorted_queue"]
["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac...
jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0
true
null
1
18
2
1,570
0
0.6
1
0.75
1
0.321667
81.24
5,153
swe_smith::train::32787
swe_smith
train
32,787
pydantic__pydantic.acb0f10f.lm_rewrite__gxd24dci
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
PathLike validation ignores type parameter constraints #### Description When using `os.PathLike` with type parameters like `os.PathLike[str]` or `os.PathLike[bytes]`, the validation logic doesn't respect the type constraints and accepts any string or bytes input regardless of the specified type parameter. #### Steps...
diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py index 9ec8a61..62cbcc2 100644 --- a/pydantic/_internal/_generate_schema.py +++ b/pydantic/_internal/_generate_schema.py @@ -488,23 +488,27 @@ class GenerateSchema: ) lax_inner_schema = core_schema.bytes_schema...
["tests/test_types.py::test_path_like_extra_subtype"]
["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
36
1
1,210
0
0.6
1
0.75
1
0.321667
81.24
5,154
swe_smith::train::7634
swe_smith
train
7,634
cantools__cantools.0c6a7871.func_basic__l3p0kmnh
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML reference handling broken after recent changes #### Description After some recent changes to the ARXML system loader, loading ARXML files is failing with various errors related to reference handling. The system is now returning `None` instead of proper error messages or handling references correctly. #### Step...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..be0a2c5 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -2207,26 +2207,19 @@ class Syste...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_database.py::CanToolsDataba...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
29
19
1,350
0
0.6
1
0.75
1
0.321667
81.24
5,155
r2e_gym::train::5058
r2e_gym
train
5,058
datalad__0498f372313e3a25c0b1cd2b3ffdac4c0ce351ae
datalad
datalad/datalad
python
0498f372313e3a25c0b1cd2b3ffdac4c0ce351ae
**Issue Title:** `download_url` Function Returns Unexpected Structure After Interface Update **Description:** After updating the `download_url` interface to use the `eval_results` system, the function no longer returns a simple list of downloaded file paths as previously expected. Instead, it yields dictionaries conta...
diff --git a/datalad/interface/base.py b/datalad/interface/base.py --- a/datalad/interface/base.py +++ b/datalad/interface/base.py @@ -317,8 +317,7 @@ _OLDSTYLE_COMMANDS = ( 'AddArchiveContent', 'CrawlInit', 'Crawl', 'CreateSiblingGithub', - 'CreateTestDataset', 'DownloadURL', 'Export', 'Ls', 'Mo...
diff --git a/datalad/interface/tests/test_download_url.py b/datalad/interface/tests/test_download_url.py --- a/datalad/interface/tests/test_download_url.py +++ b/datalad/interface/tests/test_download_url.py @@ -15,22 +15,23 @@ from os.path import join as opj from ...api import download_url -from ...tests.utils impo...
null
null
namanjain12/datalad_final:0498f372313e3a25c0b1cd2b3ffdac4c0ce351ae
true
null
2
60
null
1,442
0
0.75
1
0.6375
1
0.440333
81.23975
5,156
swe_smith::train::1593
swe_smith
train
1,593
Cog-Creators__Red-DiscordBot.33e0eac7.func_pm_ctrl_shuffle__cbmk35lk
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
NameError in ensure_python_version_info function when processing version information #### Description When processing Python version information in JSON files, the `ensure_python_version_info` function throws a `NameError` because it references undefined variables in the wrong order. #### Steps/Code to Reproduce ``...
diff --git a/redbot/cogs/downloader/info_schemas.py b/redbot/cogs/downloader/info_schemas.py index 8033d13..4a2926d 100644 --- a/redbot/cogs/downloader/info_schemas.py +++ b/redbot/cogs/downloader/info_schemas.py @@ -98,41 +98,40 @@ def ensure_red_version_info( def ensure_python_version_info( info_file: Path, key...
["tests/cogs/downloader/test_downloader.py::test_update_available_modules"]
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
1
39
1
1,149
0
0.6
1
0.75
1
0.3215
81.2395
5,157
swe_smith::train::5121
swe_smith
train
5,121
agronholm__exceptiongroup.0b4f4937.func_basic__4njcbj1q
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
ExceptionGroup constructor arguments swapped causing TypeError #### Description When creating an ExceptionGroup, the constructor arguments appear to be swapped internally, causing TypeErrors when trying to create exception groups with valid arguments. #### Steps/Code to Reproduce ```python from exceptiongroup impor...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..3d260fe 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -61,40 +61,36 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]): __message: str, __e...
["tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_no_match", "tests/test_catch.py::test_catch_single_no_match", "tests/test_catch.py::test_catch_full_match", "tests/test_catch.py::test_catch_handler_rai...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
30
72
1,329
0
0.6
1
0.75
1
0.3215
81.2395
5,158
swe_smith::train::21348
swe_smith
train
21,348
rubik__radon.54b88e58.combine_module__1jw8uyxo
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
# CCHarvester class not inheriting from Harvester causes TypeError I'm experiencing an issue with the CCHarvester class in radon. After a recent change, the CCHarvester class no longer inherits from the Harvester base class, which is causing multiple errors when trying to use it. ## Description The CCHarvester class...
diff --git a/radon/cli/harvest.py b/radon/cli/harvest.py index ac14fe5..c840772 100644 --- a/radon/cli/harvest.py +++ b/radon/cli/harvest.py @@ -172,7 +172,7 @@ class Harvester(object): raise NotImplementedError -class CCHarvester(Harvester): +class CCHarvester(): '''A class that analyzes Python modul...
["radon/tests/test_cli.py::test_encoding", "radon/tests/test_cli_harvest.py::test_cc_gobble", "radon/tests/test_cli_harvest.py::test_cc_to_dicts", "radon/tests/test_cli_harvest.py::test_cc_as_json_xml", "radon/tests/test_cli_harvest.py::test_cc_as_md", "radon/tests/test_cli_harvest.py::test_cc_to_terminal", "radon/test...
["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te...
jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58
true
null
2
13
10
1,669
0
0.6
1
0.75
1
0.3215
81.2395
5,159
swe_smith::train::22234
swe_smith
train
22,234
tweepy__tweepy.91a41c6e.combine_file__6j4qwyaj
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
# Cursor pagination broken in Tweepy ## Description I'm experiencing issues with the Cursor class in Tweepy when trying to paginate through Twitter API results. The pagination functionality seems to be completely broken after a recent update. ## Steps to Reproduce The following code used to work fine but now fails: ...
diff --git a/tweepy/cursor.py b/tweepy/cursor.py index 1db73e1..e0864dd 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::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
25
3
1,428
0
0.6
1
0.75
1
0.321333
81.239
5,160
swe_smith::train::26294
swe_smith
train
26,294
pylint-dev__astroid.b114f6b5.func_pm_ctrl_shuffle__m2irsxet
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Property inference fails with UnboundLocalError #### Description When using the `property()` builtin with function arguments, astroid fails to infer the property correctly and raises an `UnboundLocalError` for variables that should be accessible. #### Steps/Code to Reproduce ```python import astroid code = ''' cla...
diff --git a/astroid/brain/brain_builtin_inference.py b/astroid/brain/brain_builtin_inference.py index a56b152..797a4c8 100644 --- a/astroid/brain/brain_builtin_inference.py +++ b/astroid/brain/brain_builtin_inference.py @@ -623,6 +623,9 @@ def infer_callable(node, context: InferenceContext | None = None): def infer_p...
["tests/brain/test_builtin.py::BuiltinsTest::test_infer_property", "tests/test_inference.py::test_property_callable_inference", "tests/test_regrtest.py::test_regression_missing_callcontext"]
["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
29
3
1,348
0
0.6
1
0.75
1
0.321333
81.239
5,161
swe_smith::train::1042
swe_smith
train
1,042
jd__tenacity.0d40e76f.combine_file__c4q32ads
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
Wait strategies returning incorrect values after recent changes #### Description The wait strategies in tenacity are not working as expected. Fixed wait times are being scaled down by a factor of 10, and wait chains are throwing IndexError exceptions. #### Steps/Code to Reproduce ```python import tenacity from tena...
diff --git a/tenacity/wait.py b/tenacity/wait.py index dc3c850..c3e776d 100644 --- a/tenacity/wait.py +++ b/tenacity/wait.py @@ -35,8 +35,7 @@ class wait_base(abc.ABC): return wait_combine(self, other) def __radd__(self, other: "wait_base") -> typing.Union["wait_combine", "wait_base"]: - # make i...
["tests/test_tenacity.py::TestWaitConditions::test_fixed_sleep", "tests/test_tenacity.py::TestWaitConditions::test_wait_arbitrary_sum", "tests/test_tenacity.py::TestWaitConditions::test_wait_chain", "tests/test_tenacity.py::TestWaitConditions::test_wait_chain_multiple_invocations", "tests/test_tenacity.py::TestWaitCond...
["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
19
14
1,548
0
0.6
1
0.75
1
0.321333
81.239
5,162
swe_smith::train::45673
swe_smith
train
45,673
conan-io__conan.86f29e13.combine_module__sk6z2vju
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
#### Description It seems there's an issue with the configuration handling in the latest patch. When attempting to retrieve boolean-like configuration values, the system does not correctly interpret certain string representations of boolean values. This results in unexpected exceptions being raised when the configurat...
diff --git a/conan/internal/model/conf.py b/conan/internal/model/conf.py index 335d7c0..dd49d33 100644 --- a/conan/internal/model/conf.py +++ b/conan/internal/model/conf.py @@ -329,10 +329,6 @@ class Conf: raise ConanException(f"Unknown value '{v}' for '{conf_name}'") # Some smart conversi...
["test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming_complete", "test/unittests/model/other_settings_test.py::SettingsTest::test_invalid_settings4", "test/unittests/model/other_settings_test.py::SettingsTest::test_settings_as_a_dict_conanfile", "test/unittests/model/other_settings_test.py::Set...
["test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_new_print", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_new_print_save", "test/unittests/model/info_test.py::test_false_values_affect_none", ...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
13
8
1,667
0
0.6
1
0.75
1
0.321167
81.2385
5,163
swe_smith::train::39815
swe_smith
train
39,815
tornadoweb__tornado.d5ac65c1.func_pm_ctrl_shuffle__bk6nxw57
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
WebSocket client connection fails with UnboundLocalError on scheme variable #### Description When creating a WebSocket client connection, the code throws an `UnboundLocalError: local variable 'scheme' referenced before assignment` error. This happens because the scheme variable is being used before it's defined in th...
diff --git a/tornado/websocket.py b/tornado/websocket.py index 1e0161e..d5c6f9e 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -1355,22 +1355,10 @@ class WebSocketClientConnection(simple_httpclient._HTTPConnection): subprotocols: Optional[List[str]] = None, resolver: Optional[Resolver...
["test_message_sizes (tornado.test.websocket_test.ClientOnlyCompressionTest)", "test_size_limit (tornado.test.websocket_test.ClientOnlyCompressionTest)", "test_client_ping (tornado.test.websocket_test.ClientPeriodicPingTest)", "test_message_sizes (tornado.test.websocket_test.DefaultCompressionTest)", "test_size_limit (...
["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header...
jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1
true
null
1
39
44
1,146
0
0.6
1
0.75
1
0.321
81.238
5,164
swe_smith::train::2400
swe_smith
train
2,400
pdfminer__pdfminer.six.1a8bd2f7.func_pm_class_rm_funcs__z4yifegf
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFStandardSecurityHandler missing __init__ method breaks encrypted PDF processing #### Description When trying to process encrypted PDF files, the PDFStandardSecurityHandler class fails to initialize properly because the `__init__` method has been removed. This causes a TypeError when attempting to create instances ...
diff --git a/pdfminer/pdfdocument.py b/pdfminer/pdfdocument.py index 1c06335..405153c 100644 --- a/pdfminer/pdfdocument.py +++ b/pdfminer/pdfdocument.py @@ -333,17 +333,6 @@ class PDFStandardSecurityHandler: ) supported_revisions: Tuple[int, ...] = (2, 3) - def __init__( - self, - docid: Se...
["tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_625_identity_cmap", "tests/test_pdfdocument.py::TestPdfDocument::test_encrypted_no_id", "tests/test_tools_dumppdf.py::TestDumpPDF::test_2", "tests/test_tools_dumppdf.py::TestDumpPDF::test_5", "tests...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
39
18
1,146
0
0.6
1
0.75
1
0.321
81.238
5,165
swe_smith::train::29042
swe_smith
train
29,042
tox-dev__pipdeptree.c31b6418.combine_module__68t1qyy3
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
Package DAG reverse() method returns incorrect type When calling the `reverse()` method on a `PackageDAG` instance, it returns a plain dictionary instead of a `ReversedPackageDAG` object. This breaks functionality that expects the reversed DAG to maintain the same interface as the original DAG. #### Steps/Code to Rep...
diff --git a/src/pipdeptree/_models/dag.py b/src/pipdeptree/_models/dag.py index 2f5df60..eb98ba1 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_reverse", "tests/_models/test_package.py::test_dist_packag...
["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
39
39
1,145
0
0.6
1
0.75
1
0.320833
81.2375
5,166
swe_smith::train::52356
swe_smith
train
52,356
pydicom__pydicom.7d361b3d.func_pm_class_rm_funcs__ouhkgb71
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
IS class constructor broken after removing __new__ method #### Description The IS class is no longer working properly. When trying to create IS instances, it fails with various errors depending on the input type. #### Steps/Code to Reproduce ```python from pydicom.valuerep import IS # This should work but now fail...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..2ed951b 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -1343,46 +1343,6 @@ class IS(int): originally read or stored. """ - def __new__( # type: ignore[misc] - cls: type["IS"], - val: None |...
["tests/pixels/test_decoder_base.py::TestDecodeRunner::test_set_source_dataset", "tests/pixels/test_encoder_base.py::TestEncodeRunner::test_set_source_dataset", "tests/pixels/test_utils.py::TestGetExpectedLength::test_length_in_bytes[shape25-1-length25]", "tests/pixels/test_utils.py::TestGetExpectedLength::test_length_...
["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
41
151
1,105
0
0.6
1
0.75
1
0.320833
81.2375
5,167
swe_smith::train::28275
swe_smith
train
28,275
Mimino666__langdetect.a1598f1a.lm_rewrite__h3ztb6y5
swesmith/Mimino666__langdetect.a1598f1a
mimino666/langdetect
python
null
Language Detection Fails with ZeroDivisionError #### Description When using the language detection feature, a `ZeroDivisionError` is encountered under certain conditions. This seems to occur when processing specific language profiles, leading to an unexpected termination of the detection process. #### Steps/Code to R...
diff --git a/langdetect/detector_factory.py b/langdetect/detector_factory.py index e026161..471351f 100644 --- a/langdetect/detector_factory.py +++ b/langdetect/detector_factory.py @@ -78,19 +78,21 @@ class DetectorFactory(object): raise LangDetectException(ErrorCode.FormatError, 'Profile format error....
["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/test_detector.py::DetectorTest::t...
["langdetect/tests/test_language.py::LanguageTest::test_cmp", "langdetect/tests/test_language.py::LanguageTest::test_language", "langdetect/tests/utils/test_lang_profile.py::LangProfileText::test_add", "langdetect/tests/utils/test_lang_profile.py::LangProfileText::test_add_illegally1", "langdetect/tests/utils/test_lang...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
true
null
1
16
6
1,605
0
0.6
1
0.75
1
0.320833
81.2375
5,168
swe_smith::train::38147
swe_smith
train
38,147
termcolor__termcolor.3a42086f.combine_file__jvn23aeb
swesmith/termcolor__termcolor.3a42086f
termcolor/termcolor
python
null
#### Description The `__ALL__` attribute access is broken and returns incorrect values without issuing deprecation warnings. #### Steps/Code to Reproduce ```python import termcolor # This should issue a deprecation warning and return ["colored", "cprint"] # but instead returns ["colored", "cprint", "highlight"] wit...
diff --git a/src/termcolor/termcolor.py b/src/termcolor/termcolor.py index 91f155a..8755383 100644 --- a/src/termcolor/termcolor.py +++ b/src/termcolor/termcolor.py @@ -36,15 +36,10 @@ from ._types import Attribute, Color, Highlight def __getattr__(name: str) -> list[str]: if name == "__ALL__": - warning...
["tests/test_termcolor.py::test_basic", "tests/test_termcolor.py::test_color[black-\\x1b[30mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[grey-\\x1b[30mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[red-\\x1b[31mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[green-\\x1b[32mtext\\x1b[0m]", "tests/test...
["tests/test_termcolor.py::test_sanity", "tests/test_termcolor.py::test_environment_variables_disable_color[true-ANSI_COLORS_DISABLED]", "tests/test_termcolor.py::test_environment_variables_disable_color[false-ANSI_COLORS_DISABLED]", "tests/test_termcolor.py::test_environment_variables_disable_color[1-ANSI_COLORS_DISAB...
jyangballin/swesmith.x86_64.termcolor_1776_termcolor.3a42086f
true
null
1
49
51
945
0
0.6
1
0.75
1
0.320833
81.2375
5,169
swe_smith::train::2986
swe_smith
train
2,986
Suor__funcy.207a7810.combine_file__fhtvhqfu
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Lookuper functions not working correctly after v1.8.0 I've noticed that the `make_lookuper` and `silent_lookuper` functions are not working as expected in the latest version. ## Issue Description When using `make_lookuper` or `silent_lookuper`, the lookup table is being cleared on every call, causing unexpected be...
diff --git a/funcy/calc.py b/funcy/calc.py index 2966bdd..c84d264 100644 --- a/funcy/calc.py +++ b/funcy/calc.py @@ -64,7 +64,10 @@ def _memory_decorator(memory, key_func): wrapper.invalidate = invalidate def invalidate_all(): - memory.clear() + # Reordering operations and intr...
["tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_calc.py::test_silent_lookuper", "tests/test_calc.py::test_silnent_lookuper_nested", "tests/test_calc.py::test_cache_invalidate"]
["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_cache[int]", "tests/test_calc.py::test_cache[timedelta]", "tests/test_calc.py::t...
jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810
true
null
1
12
5
1,684
0
0.6
1
0.75
1
0.320667
81.237
5,170
swe_smith::train::3265
swe_smith
train
3,265
Suor__funcy.207a7810.lm_rewrite__x0oxx2nx
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Double decorator on retry function causes unexpected behavior While working with the retry function, I noticed that it's not working as expected. The function is supposed to retry a callable up to a specified number of times when it encounters certain errors, but it seems to be failing. ## Description The retry fu...
diff --git a/funcy/flow.py b/funcy/flow.py index 85c5a8e..1e9622f 100644 --- a/funcy/flow.py +++ b/funcy/flow.py @@ -88,6 +88,7 @@ def reraise(errors, into): raise into from e +@decorator @decorator def retry(call, tries, errors=Exception, timeout=0, filter_errors=None): """Makes decorated function ...
["tests/test_flow.py::test_retry", "tests/test_flow.py::test_retry_timeout", "tests/test_flow.py::test_retry_many_errors", "tests/test_flow.py::test_retry_filter"]
["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
22
4
1,484
0
0.6
1
0.75
1
0.320667
81.237
5,171
swe_smith::train::47099
swe_smith
train
47,099
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__3aaykqt5
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
TaskStatus.started() can be called multiple times without error #### Description The `TaskStatus.started()` method no longer raises a `RuntimeError` when called multiple times on the same task status object. This breaks the expected behavior where calling `started()` twice should be an error. #### Steps/Code to Repr...
diff --git a/src/trio/_core/_run.py b/src/trio/_core/_run.py index bfb38f4..911b8ac 100644 --- a/src/trio/_core/_run.py +++ b/src/trio/_core/_run.py @@ -943,30 +943,12 @@ class _TaskStatus(TaskStatus[StatusT]): def started(self: _TaskStatus[StatusT], value: StatusT) -> None: ... def started(self, value: Sta...
["src/trio/_core/_tests/test_parking_lot.py::test_parking_lot_breaker_registration", "src/trio/_core/_tests/test_parking_lot.py::test_parking_lot_breaker_rebreak", "src/trio/_core/_tests/test_parking_lot.py::test_parking_lot_multiple_breakers_exit", "src/trio/_core/_tests/test_parking_lot.py::test_parking_lot_breaker_r...
["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
51
49
902
0
0.6
1
0.75
1
0.320333
81.236
5,172
swe_smith::train::31184
swe_smith
train
31,184
scrapy__scrapy.35212ec5.combine_module__l3e3u698
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
`scrapy genspider --list` command broken after recent changes #### Description The `scrapy genspider --list` command is no longer working and throws a `FileNotFoundError` when trying to list available spider templates. #### Steps/Code to Reproduce ```bash scrapy genspider --list ``` This should display available s...
diff --git a/scrapy/commands/genspider.py b/scrapy/commands/genspider.py index 6d4aec3..3724f25 100644 --- a/scrapy/commands/genspider.py +++ b/scrapy/commands/genspider.py @@ -92,9 +92,6 @@ class Command(ScrapyCommand): ) def run(self, args: list[str], opts: argparse.Namespace) -> None: - if opt...
["tests/test_commands.py::StartprojectTest::test_existing_project_dir", "tests/test_commands.py::StartprojectTest::test_startproject", "tests/test_commands.py::StartprojectTest::test_startproject_with_project_dir", "tests/test_commands.py::StartprojectTemplatesTest::test_startproject_permissions_from_read_only", "tests...
["tests/test_commands.py::CommandSettings::test_help_formatter", "tests/test_commands.py::CommandSettings::test_settings_json_string", "tests/test_commands.py::MiscCommandsTest::test_command_not_found", "tests/test_commands.py::ViewCommandTest::test_methods", "tests/test_commands.py::PopCommandNameTest::test_no_command...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
2
53
55
862
0
0.6
1
0.75
1
0.320333
81.236
5,173
swe_smith::train::9212
swe_smith
train
9,212
Knio__dominate.9082227e.combine_file__d7fon4r9
swesmith/Knio__dominate.9082227e
knio/dominate
python
null
**Multiple issues with dominate library after recent changes** **Describe the bug** After recent changes to the dominate library, several core functionalities are broken. The library no longer properly handles decorators, context management, attribute setting, and async contexts. **To Reproduce** Here's a simple exam...
diff --git a/dominate/dom_tag.py b/dominate/dom_tag.py index 44ca8ba..3a5856a 100644 --- a/dominate/dom_tag.py +++ b/dominate/dom_tag.py @@ -58,9 +58,11 @@ except ImportError: async_context_id = ContextVar('async_context_id', default = None) def _get_async_context_id(): - if async_context_id.get() is None: - as...
["tests/test_document.py::test_decorator", "tests/test_dom_tag_async.py::test_async_bleed", "tests/test_html.py::test_decorator", "tests/test_html.py::test_nested_decorator", "tests/test_html.py::test_get_context", "tests/test_html.py::test_attributes", "tests/test_html.py::test_nested_decorator_2"]
["tests/test_document.py::test_doc", "tests/test_document.py::test_bare_decorator", "tests/test_document.py::test_title", "tests/test_document.py::test_containers", "tests/test_document.py::test_attributes", "tests/test_document.py::test_repr", "tests/test_dom1core.py::test_dom", "tests/test_dom1core.py::test_element",...
jyangballin/swesmith.x86_64.knio_1776_dominate.9082227e
true
null
1
24
7
1,442
0
0.6
1
0.75
1
0.320333
81.236
5,174
swe_smith::train::30948
swe_smith
train
30,948
mido__mido.a0158ff9.func_pm_remove_loop__n65ov8a8
swesmith/mido__mido.a0158ff9
mido/mido
python
null
# ALSA port name expansion not working correctly ## Bug description When trying to connect to ALSA MIDI ports by name, the port name expansion functionality is not working. This means that when I try to connect to a port using a simplified name (without client numbers or port numbers), the connection fails. ## Steps...
diff --git a/mido/backends/rtmidi_utils.py b/mido/backends/rtmidi_utils.py index e541267..0883a8e 100644 --- a/mido/backends/rtmidi_utils.py +++ b/mido/backends/rtmidi_utils.py @@ -31,21 +31,4 @@ def expand_alsa_port_name(port_names, name): passed name so the caller can deal with it. """ if name is None:...
["../dev/tests/backends/test_rtmidi.py::test_expand_alsa_port_name"]
["../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,541
0
0.6
1
0.75
1
0.320167
81.2355
5,175
swe_smith::train::6956
swe_smith
train
6,956
cantools__cantools.0c6a7871.combine_file__8gd81g33
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Data object initialization corrupts field values When creating Data objects in the diagnostics module, several field values are getting corrupted or swapped during initialization. This affects both the data representation and the string representation of diagnostic data. #### Steps/Code to Reproduce ```python import...
diff --git a/src/cantools/database/diagnostics/data.py b/src/cantools/database/diagnostics/data.py index 3c97eec..b35542e 100644 --- a/src/cantools/database/diagnostics/data.py +++ b/src/cantools/database/diagnostics/data.py @@ -22,33 +22,23 @@ class Data: maximum: Optional[float] = None, ...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_le_example_cdd", "tests/test_diagnostics_database.py::C...
["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
28
4
1,360
0
0.6
1
0.75
1
0.32
81.235
5,176
swe_smith::train::33298
swe_smith
train
33,298
pallets__click.fde47b4b.combine_file__0hwbui3e
swesmith/pallets__click.fde47b4b
pallets/click
python
null
[Bug]: Parameter name and error message swapped in MissingParameter and FileError ### Bug summary There are two issues with the error message formatting in Click's exception classes: 1. In `MissingParameter.__str__()`, the parameter name logic is reversed, causing incorrect error messages when a parameter is missing...
diff --git a/src/click/exceptions.py b/src/click/exceptions.py index c41c206..b3d1fe3 100644 --- a/src/click/exceptions.py +++ b/src/click/exceptions.py @@ -196,8 +196,8 @@ class MissingParameter(BadParameter): return f"{missing}{param_hint}.{msg}" def __str__(self) -> str: - if not self.message:...
["tests/test_arguments.py::test_missing_argument_string_cast", "tests/test_options.py::test_missing_option_string_cast", "tests/test_types.py::test_file_error_surrogates"]
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
1
6
3
1,799
0
0.6
1
0.75
1
0.319833
81.2345
5,177
swe_smith::train::26608
swe_smith
train
26,608
pylint-dev__astroid.b114f6b5.lm_rewrite__opg5hie2
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
### Unary Operator Type Error Handling Issue I encountered an issue with the handling of unary operators on certain data types, which seems to be causing unexpected behavior. Specifically, when applying unary operations on empty or unsupported types, the expected type errors are not being raised correctly. #### Steps...
diff --git a/astroid/protocols.py b/astroid/protocols.py index 8a837b8..1243265 100644 --- a/astroid/protocols.py +++ b/astroid/protocols.py @@ -50,12 +50,18 @@ def _infer_unary_op(obj: Any, op: str) -> ConstFactoryResult: Can raise TypeError if operation is unsupported. """ if obj is NotImplemented: - ...
["tests/test_inference.py::InferenceTest::test_unary_empty_type_errors", "tests/test_inference.py::InferenceTest::test_unary_op_leaks_stop_iteration", "tests/test_inference.py::InferenceTest::test_unary_type_errors"]
["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
18
3
1,558
0
0.6
1
0.75
1
0.319667
81.234
5,178
swe_smith::train::32438
swe_smith
train
32,438
pydantic__pydantic.acb0f10f.combine_module__pv80xq13
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Model copy operations broken after recent changes #### Description The `deprecated_copy` function is not working correctly. When copying models with include/exclude parameters, the copied models are missing expected fields or have incorrect structure. #### Steps/Code to Reproduce ```python from pydantic import Base...
diff --git a/pydantic/deprecated/class_validators.py b/pydantic/deprecated/class_validators.py index ad92864..452bd21 100644 --- a/pydantic/deprecated/class_validators.py +++ b/pydantic/deprecated/class_validators.py @@ -246,11 +246,9 @@ def root_validator( wrap = partial(_decorators_v1.make_v1_generic_root_valida...
["tests/test_construction.py::test_copy_exclude", "tests/test_construction.py::test_copy_include", "tests/test_construction.py::test_copy_include_exclude", "tests/test_construction.py::test_copy_advanced_exclude", "tests/test_construction.py::test_copy_advanced_include", "tests/test_construction.py::test_copy_advanced_...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
2
21
10
1,498
0
0.6
1
0.75
1
0.319667
81.234
5,179
swe_smith::train::5142
swe_smith
train
5,142
agronholm__exceptiongroup.0b4f4937.func_basic__qnbdkttr
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
# suppress context manager in exceptiongroup has incorrect exception handling logic #### Description I've found an issue with the `suppress` context manager in the exceptiongroup package. It seems to be handling exceptions incorrectly, causing it to suppress exceptions it shouldn't and let through exceptions it shoul...
diff --git a/src/exceptiongroup/_suppress.py b/src/exceptiongroup/_suppress.py index 11467ee..35bc6da 100644 --- a/src/exceptiongroup/_suppress.py +++ b/src/exceptiongroup/_suppress.py @@ -30,26 +30,15 @@ class suppress(BaseClass): excinst: Optional[BaseException], exctb: Optional[TracebackType], ...
["tests/test_suppress.py::test_suppress_exception"]
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
23
1
1,458
0
0.6
1
0.75
1
0.319667
81.234
5,180
swe_smith::train::49560
swe_smith
train
49,560
mozilla__bleach.73871d76.lm_rewrite__zknjzsgb
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
AttributeError in Element Initialization It seems there's an issue with the recent changes in the `Element` class within the `etree.py` file. The modifications have introduced an `AttributeError` when certain functions are called, particularly those related to link handling and HTML cleaning. For instance, when attem...
diff --git a/bleach/_vendor/html5lib/treebuilders/etree.py b/bleach/_vendor/html5lib/treebuilders/etree.py index 5ccfc4d..8e26633 100644 --- a/bleach/_vendor/html5lib/treebuilders/etree.py +++ b/bleach/_vendor/html5lib/treebuilders/etree.py @@ -22,18 +22,13 @@ def getETreeBuilder(ElementTreeImplementation, fullTree=Fal...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_stripping_tags[<ul><li><script></li></ul>-kwargs4-<ul><li></li></ul>]", "tests/test_clean.py::test_escaping_tags[<ul><li><script></li></ul>-<ul><li>&lt;script&gt;</li></ul>]", "tests/test_...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
9
28
1,738
0
0.6
1
0.75
1
0.319667
81.234
5,181
swe_smith::train::5740
swe_smith
train
5,740
hjson__hjson-go.f3219653.lm_rewrite__ijnam43z
swesmith/hjson__hjson-go.f3219653
hjson/hjson-go
go
null
Error handling causes slice bounds panic when parsing invalid HJSON #### Description When parsing invalid HJSON input, the error handling code can cause a slice bounds out of range panic instead of returning a proper error message. #### Steps/Code to Reproduce ```go package main import ( "fmt" "github.com/...
diff --git a/decode.go b/decode.go index 06b0a16..b0f9956 100644 --- a/decode.go +++ b/decode.go @@ -108,25 +108,35 @@ func isPunctuatorChar(c byte) bool { } func (p *hjsonParser) errAt(message string) error { - if p.at <= len(p.data) { - var i int - col := 0 - line := 1 - for i = p.at - 1; i > 0 && p.data[i] !...
["TestHjson"]
["TestEncodeEmptyStruct", "TestEncodeStruct", "TestAnonymousStruct1", "TestAnonymousStruct2", "TestAnonymousStruct3", "TestAnonymousStruct4", "TestEmptyMapsAndSlices", "TestStructPointers", "TestEncodeMarshalJSON", "TestEncodeMarshalText", "TestEncodeMarshalTextMapKey", "TestEncodeMarshalInt", "TestEncodeSliceOfPtrOfPt...
jyangballin/swesmith.x86_64.hjson_1776_hjson-go.f3219653
true
null
1
42
1
1,078
0
0.6
1
0.75
1
0.319667
81.234
5,182
swe_smith::train::29698
swe_smith
train
29,698
cookiecutter__cookiecutter.b4451231.lm_rewrite__qbnjw2dl
swesmith/cookiecutter__cookiecutter.b4451231
cookiecutter/cookiecutter
python
null
# Bug: JSON processing in prompt.py raises ValueError instead of InvalidResponse ## Description When using Cookiecutter with JSON input, the error handling has changed. The `process_json` function in `prompt.py` now raises `ValueError` instead of `InvalidResponse` when given invalid JSON or non-dictionary JSON. ## S...
diff --git a/cookiecutter/prompt.py b/cookiecutter/prompt.py index f17112f..6460000 100644 --- a/cookiecutter/prompt.py +++ b/cookiecutter/prompt.py @@ -143,20 +143,16 @@ def process_json(user_value: str): :param user_value: User-supplied value to load as a JSON dict """ + if user_value.strip().lower() =...
["tests/test_read_user_dict.py::test_process_json_invalid_json", "tests/test_read_user_dict.py::test_process_json_non_dict"]
["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl...
jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231
true
null
1
22
2
1,478
0
0.6
1
0.75
1
0.319667
81.234
5,183
r2e_gym::train::4894
r2e_gym
train
4,894
datalad__f5e1d276ab51aefcf5e48e6f7bd9833b19ef7f90
datalad
datalad/datalad
python
f5e1d276ab51aefcf5e48e6f7bd9833b19ef7f90
**Analysis:** The commit `f5e1d276ab51aefcf5e48e6f7bd9833b19ef7f90` updates the `@datasetmethod` decorator to support functions that utilize keyword-only arguments (denoted by `*,` in the method signature). Previously, decorating such functions resulted in a `TypeError` because the decorator did not correctly handle t...
diff --git a/datalad/distribution/dataset.py b/datalad/distribution/dataset.py --- a/datalad/distribution/dataset.py +++ b/datalad/distribution/dataset.py @@ -466,10 +466,12 @@ f_args = f_argspec.args # If bound function is used with wrong signature (especially by - # explicitly passing a dat...
diff --git a/datalad/distribution/tests/test_dataset_binding.py b/datalad/distribution/tests/test_dataset_binding.py --- a/datalad/distribution/tests/test_dataset_binding.py +++ b/datalad/distribution/tests/test_dataset_binding.py @@ -58,3 +58,38 @@ return some eq_(ds.new_name('whatever'), 'whatever') +...
null
null
namanjain12/datalad_final:f5e1d276ab51aefcf5e48e6f7bd9833b19ef7f90
true
null
1
31
null
2,010
0
0.75
1
0.6375
1
0.438333
81.23375
5,184
r2e_gym::train::5263
r2e_gym
train
5,263
aiohttp__f0caa654b2db87d65159951094b3c7fc5d396caf
aiohttp
aio-libs/aiohttp
python
f0caa654b2db87d65159951094b3c7fc5d396caf
**Title:** Registering Regex Patterns in Routes Causes AttributeError **Description:** When attempting to register a route using a regular expression, the application raises an `AttributeError` because it incorrectly assumes that the path is a string and tries to call the `startswith` method on it. **Example Code:** ...
diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -1,33 +1,34 @@ -*~ -bin -parts -coverage -eggs -sources -build -dist -venv -.installed.cfg -develop-eggs -var/* -*.egg-info -*.pyc -*.pyo *.bak *.egg +*.egg-info *.eggs +*.pyc +*.pyd +*.pyo +*.so *.tar.gz -*.so -*.pyd -.tox +*~ .DS_Store .c...
diff --git a/tests/test_urldispatch.py b/tests/test_urldispatch.py --- a/tests/test_urldispatch.py +++ b/tests/test_urldispatch.py @@ -426,3 +426,20 @@ self.assertRaises( AssertionError, self.router.add_route, 'GET', '/', self.make_handler(), expect_handler=handler) + + def test_ra...
null
null
namanjain12/aiohttp_final:f0caa654b2db87d65159951094b3c7fc5d396caf
true
null
2
63
null
1,368
0
0.75
1
0.6375
1
0.438
81.23275
5,185
swe_smith::train::16972
swe_smith
train
16,972
prettytable__prettytable.ca90b055.combine_file__huv4rtpp
swesmith/prettytable__prettytable.ca90b055
prettytable/prettytable
python
null
PrettyTable validation methods called with wrong arguments #### Description When setting various options on PrettyTable instances, the validation methods are being called with incorrect argument order or wrong parameters, causing validation to fail unexpectedly. #### Steps/Code to Reproduce ```python from prettytab...
diff --git a/src/prettytable/prettytable.py b/src/prettytable/prettytable.py index 818a520..efdf8e0 100644 --- a/src/prettytable/prettytable.py +++ b/src/prettytable/prettytable.py @@ -494,9 +494,9 @@ class PrettyTable: def _validate_option(self, option, val) -> None: if option == "field_names": - ...
["tests/test_colortable.py::TestColorTableRendering::test_color_table_rendering[False-True]", "tests/test_colortable.py::TestColorTableRendering::test_color_table_rendering[True-True0]", "tests/test_colortable.py::TestColorTableRendering::test_color_table_rendering[True-False]", "tests/test_colortable.py::TestColorTabl...
["tests/test_colortable.py::TestColorTable::test_themeless", "tests/test_colortable.py::TestColorTable::test_theme_setter", "tests/test_colortable.py::TestFormatCode::test_basic", "tests/test_colortable.py::TestFormatCode::test_prefix", "tests/test_colortable.py::TestFormatCode::test_escapes", "tests/test_colortable.py...
jyangballin/swesmith.x86_64.prettytable_1776_prettytable.ca90b055
true
null
1
29
75
1,335
0
0.6
1
0.75
1
0.319167
81.2325
5,186
swe_smith::train::1321
swe_smith
train
1,321
Cog-Creators__Red-DiscordBot.33e0eac7.combine_module__bjf0rr5u
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
# Downloader cog fails to load repositories with missing info.json file ## Description When using the downloader cog, it now fails to load repositories that don't have an info.json file. Previously, it would gracefully handle missing info files by creating an empty dictionary, but now it raises a FileNotFoundError ex...
diff --git a/redbot/cogs/downloader/info_schemas.py b/redbot/cogs/downloader/info_schemas.py index 8033d13..7def415 100644 --- a/redbot/cogs/downloader/info_schemas.py +++ b/redbot/cogs/downloader/info_schemas.py @@ -228,4 +228,4 @@ def update_mixin(repo_or_installable: RepoJSONMixin, schema: SchemaType) -> None i...
["tests/cogs/downloader/test_downloader.py::test_existing_git_repo", "tests/cogs/downloader/test_downloader.py::test_add_repo", "tests/cogs/downloader/test_downloader.py::test_remove_repo"]
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
2
41
3
1,095
0
0.6
1
0.75
1
0.319167
81.2325
5,187
swe_smith::train::9865
swe_smith
train
9,865
keleshev__schema.24a30457.lm_rewrite__n1lxtqoc
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
# SchemaError.code combines auto and error messages incorrectly While working with the Schema library, I noticed that the `SchemaError.code` property is not correctly combining auto-generated messages and custom error messages. A simple reproduction case: ```python from schema import Schema, SchemaError, Use # Try ...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..61e2d2a 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -67,24 +67,26 @@ class SchemaError(Exception): Exception.__init__(self, self.code) @property - def code(self) -> str: + def code(self) ->str: """Remove d...
["test_schema.py::test_dict_key_error", "test_schema.py::test_nice_errors", "test_schema.py::test_error_reporting"]
["test_schema.py::test_schema", "test_schema.py::test_validate_file", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_or_only_one", "test_schema.py::test_test", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema....
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
36
3
1,195
0
0.6
1
0.75
1
0.319167
81.2325
5,188
r2e_gym::train::4801
r2e_gym
train
4,801
numpy__db5750f6cdc2715f1c65be31f985e2cd2699d2e0
numpy
numpy/numpy
python
db5750f6cdc2715f1c65be31f985e2cd2699d2e0
**Analysis:** 1. **Key Parts from Commit Details and Test Results:** - **Commit Message:** Fix MaskedArray fill_value type conversion. - **Test Results:** - **Old Commit:** Multiple `test_astype_basic` tests fail with `AssertionError` when asserting `dst.fill_value.dtype == dt2`. - **New Commit:** Thes...
diff --git a/numpy/ma/core.py b/numpy/ma/core.py --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -3008,11 +3008,13 @@ except (TypeError, AttributeError): # When _mask.shape is not writable (because it's a void) pass - # Finalize the fill_value for structured arrays...
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -4985,7 +4985,7 @@ assert_equal(res_pos.data, expected.data) -def test_astype(): +def test_astype_mask_ordering(): descr = [('v', int, 3), ('x', [('y', float)])] ...
null
null
namanjain12/numpy_final:db5750f6cdc2715f1c65be31f985e2cd2699d2e0
true
null
1
12
null
2,387
0
0.75
1
0.6375
1
0.437833
81.23225
5,189
swe_smith::train::5141
swe_smith
train
5,141
agronholm__exceptiongroup.0b4f4937.func_basic__q3o1kch4
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
ExceptionGroup.split() returns swapped matching/nonmatching results #### Description The `split()` method on `ExceptionGroup` and `BaseExceptionGroup` is returning the matching and nonmatching groups in the wrong order. When splitting an exception group, the method should return `(matching_group, nonmatching_group)` ...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..bf114d9 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -212,8 +212,8 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]): ] ): condition...
["tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_no_match", "tests/test_catch.py::test_catch_full_match", "tests/test_catch.py::test_catch_handler_raises", "tests/test_catch.py::test_bare_raise_in_hand...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
21
21
1,494
0
0.6
1
0.75
1
0.319
81.232
5,190
swe_smith::train::52645
swe_smith
train
52,645
pydicom__pydicom.7d361b3d.lm_rewrite__2cdsk1ju
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Buffer Overflow Error in _BufferedItem Initialization Description I've encountered an issue with the _BufferedItem class in the encapsulation module. When initializing a _BufferedItem with a buffer that exceeds a certain size, the program raises an unexpected error. This seems to occur when the buffer length is too l...
diff --git a/src/pydicom/encaps.py b/src/pydicom/encaps.py index 3493808..3aa70f5 100644 --- a/src/pydicom/encaps.py +++ b/src/pydicom/encaps.py @@ -652,7 +652,7 @@ class _BufferedItem: even length. """ - def __init__(self, buffer: BufferedIOBase) -> None: + def __init__(self, buffer: BufferedIOBa...
["tests/test_encaps.py::TestBufferedFrame::test_too_large_buffer_raises"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
36
1
1,193
0
0.6
1
0.75
1
0.318833
81.2315
5,191
swe_smith::train::24599
swe_smith
train
24,599
marshmallow-code__marshmallow.9716fc62.combine_module__njr0u4lq
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
# OneOf and ContainsOnly validators not working correctly after recent changes ## Description I've encountered an issue with the `OneOf` and `ContainsOnly` validators in marshmallow. After updating to the latest version, my validation logic is completely broken. When using the `OneOf` validator, it's now rejecting v...
diff --git a/src/marshmallow/class_registry.py b/src/marshmallow/class_registry.py index d41b112..1ff1b0d 100644 --- a/src/marshmallow/class_registry.py +++ b/src/marshmallow/class_registry.py @@ -77,18 +77,17 @@ def get_class(classname: str, all: bool = False) -> list[SchemaType] | SchemaTyp """ try: ...
["tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_raises_with_errors", "tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_raises_with_errors_with_multiple_validators", "tests/test_registry.py::test_multiple_classes_with_same_name_raises_error", "tests/test_reg...
["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
2
23
10
1,453
0
0.6
1
0.75
1
0.318833
81.2315
5,192
swe_smith::train::21338
swe_smith
train
21,338
rubik__radon.54b88e58.combine_file__pkes07iu
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
# Token filtering and token search functions in radon/raw.py are broken ## Description I found several issues with the token handling functions in radon/raw.py that cause incorrect analysis results. The main problems are in the following functions: 1. `_fewer_tokens()` - The condition is inverted, causing it to kee...
diff --git a/radon/raw.py b/radon/raw.py index 1ac2bc1..fd6069c 100644 --- a/radon/raw.py +++ b/radon/raw.py @@ -64,7 +64,7 @@ def _fewer_tokens(tokens, remove): the tokens specified in `remove`. ''' for values in tokens: - if values[0] in remove: + if values[0] not in remove: ...
["radon/tests/test_cli.py::test_encoding", "radon/tests/test_ipynb.py::test_ipynb", "radon/tests/test_ipynb.py::test_ipynb_with_cells", "radon/tests/test_ipynb.py::test_raw_ipynb", "radon/tests/test_ipynb.py::test_raw_ipynb_cells"]
["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te...
jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58
true
null
1
20
5
1,512
0
0.6
1
0.75
1
0.318667
81.231
5,193
swe_smith::train::23966
swe_smith
train
23,966
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__9vnwg3fs
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
TimeSeries _text_summary method raises UnboundLocalError #### Description The `_text_summary` method in `GenericTimeSeries` is raising an `UnboundLocalError` when trying to access the `drange` variable. The variable is being used before it's defined in the method. #### Steps/Code to Reproduce ```python import sunpy...
diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py index 80e5d20..a061f81 100644 --- a/sunpy/timeseries/timeseriesbase.py +++ b/sunpy/timeseries/timeseriesbase.py @@ -208,37 +208,15 @@ class GenericTimeSeries: Produces a table summary of the timeseries data to be passed to ...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html", "sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html_", "sunpy/timeseries/tests/test_timeseriesbase.py::test_quicklook"]
["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
47
3
972
0
0.6
1
0.75
1
0.318667
81.231
5,194
swe_smith::train::24265
swe_smith
train
24,265
sunpy__sunpy.f8edfd5c.func_pm_remove_assign__rrygzzyg
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Superpixel method breaks with masked maps and incorrect metadata scaling #### Description The `superpixel` method on maps is not working correctly. When using masked maps, it raises an `UnboundLocalError` about `new_mask` not being defined. Additionally, the metadata scaling for coordinate transformation matrix eleme...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..bd63e09 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -2274,7 +2274,7 @@ class GenericMap(NDData): reshaped_mask = reshape_image_to_4d_superpixel(self.mask, [dimensions[1], dimensions[0]], [offset[1], offset[0]]) ...
["sunpy/map/tests/test_mapbase.py::test_superpixel_metadata[sum-dimensions0]", "sunpy/map/tests/test_mapbase.py::test_superpixel_metadata[mean-dimensions1]", "sunpy/map/tests/test_mapbase.py::test_superpixel_masked", "sunpy/map/tests/test_mapbase.py::test_resample_rotated_map_pc[superpixel]", "sunpy/map/tests/test_mapb...
["sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase.py::test_f...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
6
5
1,791
0
0.6
1
0.75
1
0.3185
81.2305
5,195
swe_smith::train::8258
swe_smith
train
8,258
cantools__cantools.0c6a7871.lm_rewrite__dep8m9gc
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
# Signal length check happens too late in Message.refresh() method ## Description When refreshing a message, the signal length check is performed after the signal dictionary and codecs are created. This causes issues when a signal has an invalid length (0 or negative), as the code tries to use these invalid signals be...
diff --git a/src/cantools/database/can/message.py b/src/cantools/database/can/message.py index 942b2cc..160c37e 100644 --- a/src/cantools/database/can/message.py +++ b/src/cantools/database/can/message.py @@ -1292,7 +1292,7 @@ class Message: f'The signal {signal.name} length {signal.length} is not ...
["tests/test_database.py::CanToolsDatabaseTest::test_issue_138"]
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
18
1
1,551
0
0.6
1
0.75
1
0.3185
81.2305
5,196
swe_smith::train::8303
swe_smith
train
8,303
cantools__cantools.0c6a7871.lm_rewrite__qkzu91gj
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
### Issue: IndexError when decoding CAN FD messages #### Description I encountered an issue when trying to decode CAN FD messages using a DBC file. The process results in an `IndexError` with the message "list index out of range". This seems to occur when attempting to access elements in a list that are not present, ...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..5de17c8 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -2007,6 +2007,15 @@ def get_definitions_dict(definitions, defaults): def get_definitions_re...
["tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_database.py::CanToolsDatabaseTest::test_foobar", "tests/test_database.py::CanToolsDatabaseTest::test_foobar_decode_masked_frame_id", "tests/test_database.py::CanToolsDatabaseTest::test_foobar_encode_decode", "tests/test_database.py:...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
18
8
1,551
0
0.6
1
0.75
1
0.3185
81.2305
5,197
swe_smith::train::870
swe_smith
train
870
oauthlib__oauthlib.1fd52536.lm_rewrite__bx12p9xf
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OpenID Connect Hybrid Flow breaks after recent changes I'm experiencing issues with the OpenID Connect Hybrid Flow after recent changes. The hybrid flow is no longer working properly. When trying to use the hybrid flow with response types like "code id_token" or "code token", I'm getting errors about missing nonce pa...
diff --git a/oauthlib/openid/connect/core/grant_types/hybrid.py b/oauthlib/openid/connect/core/grant_types/hybrid.py index 9c1fc70..509841f 100644 --- a/oauthlib/openid/connect/core/grant_types/hybrid.py +++ b/oauthlib/openid/connect/core/grant_types/hybrid.py @@ -41,22 +41,19 @@ class HybridGrant(GrantTypeBase): ...
["tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridInterferenceTest::test_code_modifier_called", "tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridInterferenceTest::test_create_authorization_grant", "tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridInterferenceTest::te...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
33
13
1,250
0
0.6
1
0.75
1
0.318333
81.23
5,198
swe_smith::train::45601
swe_smith
train
45,601
conan-io__conan.86f29e13.combine_module__5u8js78q
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### [Bug]: Profile and Settings Serialization Errors #### Bug summary Encountered issues with profile serialization and settings value retrieval after recent changes. #### Code for reproduction ```python from conan.internal.model.profile import Profile from conan.internal.model.settings import Settings # Profile s...
diff --git a/conan/internal/model/profile.py b/conan/internal/model/profile.py index 54aa126..24c21af 100644 --- a/conan/internal/model/profile.py +++ b/conan/internal/model/profile.py @@ -77,7 +77,7 @@ class Profile: def dumps(self): result = ["[settings]"] for name, value in sorted(self.setting...
["test/unittests/model/profile_test.py::ProfileTest::test_apply", "test/unittests/model/profile_test.py::ProfileTest::test_profile_dump_order", "test/unittests/model/settings_test.py::test_possible_values"]
["test/unittests/model/profile_test.py::ProfileTest::test_package_settings_update", "test/unittests/model/profile_test.py::ProfileTest::test_profile_settings_update", "test/unittests/model/profile_test.py::ProfileTest::test_profile_subsettings_update", "test/unittests/model/profile_test.py::test_update_build_requires",...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
10
3
1,710
0
0.6
1
0.75
1
0.318333
81.23
5,199
swe_smith::train::10327
swe_smith
train
10,327
paramiko__paramiko.23f92003.func_basic__5z8yiee3
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Key derivation function returns incorrect length causing authentication failures #### Description SSH connections are failing with "Invalid key" errors during the authentication process. The issue appears to be related to key derivation where the generated keys have incorrect lengths. #### Steps/Code to Reproduce `...
diff --git a/paramiko/transport.py b/paramiko/transport.py index f0fcb97..21ae645 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -2023,28 +2023,20 @@ class Transport(threading.Thread, ClosingContextManager): m.add_bytes(self.H) m.add_byte(b(id)) m.add_bytes(self.session_id)...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::AuthHandler_::interactive_auth", "tests/auth.py::AuthHandler_::interactive_fallback", "tests/auth.py::AuthHandler_::utf8", "tests/auth.py::AuthHandler_::non_utf8", "...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
26
122
1,389
0
0.6
1
0.75
1
0.318167
81.2295