selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
4,300
swe_smith::train::24456
swe_smith
train
24,456
sunpy__sunpy.f8edfd5c.combine_file__rxn7880g
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
TimeSeries _text_summary method broken due to variable ordering issues #### Description The `_text_summary` method in `GenericTimeSeries` is failing with `UnboundLocalError` when trying to access variables that are referenced before being defined. This affects HTML representation and quicklook functionality. #### St...
diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py index 80e5d20..72cf2bc 100644 --- a/sunpy/timeseries/timeseriesbase.py +++ b/sunpy/timeseries/timeseriesbase.py @@ -204,41 +204,26 @@ class GenericTimeSeries: # #### Data Access, Selection and Organisation Methods #### # def _t...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html", "sunpy/timeseries/tests/test_timeseriesbase.py::test_truncated_start_ts", "sunpy/timeseries/tests/test_timeseriesbase.py::test_truncated_end_ts", "sunpy/timeseries/tests/test_timeseriesbase.py::test_truncated_both_ts", "sunpy/timeseries/tests/test_timese...
["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
63
13
1,263
0
0.6
1
0.75
1
0.4205
81.5365
4,301
swe_smith::train::35421
swe_smith
train
35,421
alecthomas__voluptuous.a7a55f83.lm_rewrite__44hauy7v
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
### Schema Decorator Validation Issue It seems there's an issue with the schema decorator validation when handling mismatched arguments and return values. The decorator is not raising the expected `Invalid` error when arguments do not match the schema, and instead, a `ValueError` is being raised in some cases. #### S...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..51bb29c 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -1284,32 +1284,57 @@ def validate(*a, **kw) -> typing.Callable: RETURNS_KEY = '__return__' def validate_schema_decorator(func): - ...
["voluptuous/tests/tests.py::test_schema_decorator_unmatch_with_args", "voluptuous/tests/tests.py::test_schema_decorator_unmatch_with_kwargs", "voluptuous/tests/tests.py::test_schema_decorator_unmatch_return_with_args", "voluptuous/tests/tests.py::test_schema_decorator_unmatch_return_with_kwargs", "voluptuous/tests/tes...
["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests....
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
true
null
1
75
7
1,023
0
0.6
1
0.75
1
0.4205
81.5365
4,302
swe_smith::train::35947
swe_smith
train
35,947
stanfordnlp__dspy.651a4c71.lm_rewrite__vh3zoivb
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# SIMBA softmax_sample function returns 0 when program_idxs is empty I noticed an issue with the `softmax_sample` function in the SIMBA teleprompter. When the `program_idxs` list is empty, the function returns 0 instead of raising an error. ## Current behavior When `program_idxs` is an empty list, the function retur...
diff --git a/dspy/teleprompt/simba.py b/dspy/teleprompt/simba.py index 05aabe2..5a3da89 100644 --- a/dspy/teleprompt/simba.py +++ b/dspy/teleprompt/simba.py @@ -80,22 +80,51 @@ class SIMBA(Teleprompter): top_k[-1] = 0 return list(dict.fromkeys(top_k)) - def softmax_sample(rng_obj:...
["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
55
4
1,421
0
0.6
1
0.75
1
0.420167
81.5355
4,303
swe_smith::train::5069
swe_smith
train
5,069
bottlepy__bottle.a8dfef30.lm_rewrite__xyjyfc6o
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
Route Matching Error with Dynamic Segments Description It seems there's an issue with the route matching when using dynamic segments in the URL patterns. Specifically, routes that include path and float filters are not behaving as expected. For instance, when defining a route with a path filter like `/<id:path>/:f`, ...
diff --git a/bottle.py b/bottle.py index 286b5bc..c29ea93 100755 --- a/bottle.py +++ b/bottle.py @@ -386,52 +386,35 @@ class Router(object): pattern += re.escape(key) builder.append((None, key)) - self.builder[rule] = builder - if name: self.builder[name] = builder + ...
["test/test_mount.py::TestAppMounting::test_mount_order_bug581", "test/test_mount.py::TestAppMounting::test_mount_unicode_path_bug602", "test/test_router.py::TestRouter::testBasic", "test/test_router.py::TestRouter::testFloatFilter", "test/test_router.py::TestRouter::testNewSyntax", "test/test_router.py::TestRouter::te...
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
57
16
1,381
0
0.6
1
0.75
1
0.420167
81.5355
4,304
swe_smith::train::35433
swe_smith
train
35,433
alecthomas__voluptuous.a7a55f83.lm_rewrite__fv1ep7wr
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
### Issue: Schema Compilation Error with Marker and Remove #### Description It seems there's an issue with the schema compilation process, particularly when using `Marker` and `Remove` within the schema. The problem arises when the `__call__` method of these classes is invoked with an unexpected number of arguments, ...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..33d8232 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -210,29 +210,39 @@ class Schema(object): # return self.validate([], self.schema, data) def _compile(self, schema): - ...
["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_remove", "voluptuous/tests/tests.py::test_remove_with_error", "voluptuous/tests/tests.py::test_copy_dict_undefined", "voluptuous/tests/tests.py::tes...
["voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests.py::test_in", "voluptuous/tests/tests.py::test_in_unsortable_container", "voluptuous/tests/tests.py::test_not_in", "voluptuous/tests/tests...
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
true
null
1
40
22
1,720
0
0.6
1
0.75
1
0.42
81.535
4,305
swe_smith::train::34098
swe_smith
train
34,098
iterative__dvc.1d6ea681.combine_module__01t3f2yl
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
# Cloud filesystem initialization broken I'm trying to use DVC with a remote storage and I'm getting errors when trying to access the remote. The issue seems to be in the `get_cloud_fs` function. ## Steps to reproduce Here's a simple script that demonstrates the issue: ```python from dvc.fs import get_cloud_fs # T...
diff --git a/dvc/fs/__init__.py b/dvc/fs/__init__.py index cf3998a..3ab8e97 100644 --- a/dvc/fs/__init__.py +++ b/dvc/fs/__init__.py @@ -144,30 +144,30 @@ def _resolve_remote_refs(config, remote_conf): def get_cloud_fs(repo_config, **kwargs): - repo_config = repo_config or {} - core_config = repo_config.get(...
["tests/unit/fs/test_fs.py::test_remote_url", "tests/unit/fs/test_fs.py::test_get_cloud_fs"]
["tests/unit/fs/test_base.py::test_missing_deps", "tests/unit/fs/test_fs.py::test_get_fs_cls[s3://bucket/path-S3FileSystem]", "tests/unit/fs/test_fs.py::test_get_fs_cls[ssh://example.com:/dir/path-SSHFileSystem]", "tests/unit/fs/test_fs.py::test_get_fs_cls[http://example.com/path/to/file-HTTPFileSystem]", "tests/unit/f...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
2
70
2
1,120
0
0.6
1
0.75
1
0.42
81.535
4,306
swe_smith::train::32962
swe_smith
train
32,962
pydantic__pydantic.acb0f10f.pr_7119
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# Generic type parameters not properly inherited in subclasses ## Description I'm having an issue with generic type parameters not being properly inherited in subclasses. When I create a class hierarchy with generic types, I'm getting unexpected errors. Given the following code: ```python from typing import TypeVar...
diff --git a/pydantic/_internal/_model_construction.py b/pydantic/_internal/_model_construction.py index 88f67ef..1b12f78 100644 --- a/pydantic/_internal/_model_construction.py +++ b/pydantic/_internal/_model_construction.py @@ -158,43 +158,21 @@ class ModelMetaclass(ABCMeta): if __pydantic_generic_metadat...
["tests/test_generics.py::test_no_generic_base", "tests/test_generics.py::test_generic_field", "tests/test_root_model.py::test_model_construction_with_invalid_generic_specification"]
["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
48
3
1,559
0
0.6
1
0.75
1
0.419833
81.5345
4,307
swe_smith::train::38029
swe_smith
train
38,029
weaveworks__grafanalib.5c3b17ed.combine_file__d9m08jgq
swesmith/weaveworks__grafanalib.5c3b17ed
weaveworks/grafanalib
python
null
# Multiple issues with Grafana components in grafanalib ### Description I've discovered several issues with the grafanalib components that are causing unexpected behavior when generating Grafana dashboards and alerts: 1. The `DiscreteColorMappingItem` component is swapping color and text values in the JSON output 2....
diff --git a/grafanalib/core.py b/grafanalib/core.py index 79849fe..b900986 100644 --- a/grafanalib/core.py +++ b/grafanalib/core.py @@ -1704,7 +1704,6 @@ class AlertRulev9(object): panel_id = attr.ib(default=0, validator=instance_of(int)) def to_json_data(self): - data = [] for trigger in...
["grafanalib/tests/test_core.py::test_DiscreteColorMappingItem", "grafanalib/tests/test_core.py::test_notification", "grafanalib/tests/test_core.py::test_alertrulev9", "grafanalib/tests/test_examples.py::test_examples"]
["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_logs_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_...
jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed
true
null
1
9
4
2,338
0
0.6
1
0.75
1
0.419667
81.534
4,308
swe_smith::train::45606
swe_smith
train
45,606
conan-io__conan.86f29e13.combine_module__71x6eoem
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
It seems there's an issue with the handling of package references in the latest update. When attempting to validate certain package references, an unexpected error is raised, which wasn't the case before. Here's a simple way to reproduce the issue: ```python from conan.api.model.refs import RecipeReference from conan...
diff --git a/conan/api/model/list.py b/conan/api/model/list.py index c7149e1..57fb6a2 100644 --- a/conan/api/model/list.py +++ b/conan/api/model/list.py @@ -229,13 +229,12 @@ class ListPattern: def __init__(self, expression, rrev="latest", package_id=None, prev="latest", only_recipe=False): def split(s,...
["test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming_complete", "test/unittests/model/options_test.py::TestOptionsPropagate::test_basic", "test/unittests/model/other_settings_test.py::SettingsTest::test_invalid_settings4", "test/unittests/model/other_settings_test.py::SettingsTest::test_settin...
["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
68
9
1,158
0
0.6
1
0.75
1
0.419667
81.534
4,309
swe_smith::train::7862
swe_smith
train
7,862
cantools__cantools.0c6a7871.func_pm_class_rm_funcs__7xi6wxre
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Monitor class missing essential methods after refactoring #### Description The Monitor class is missing several critical methods that are being called during runtime, causing AttributeError exceptions when trying to use the monitor functionality. #### Steps/Code to Reproduce ```python import cantools from cantools....
diff --git a/src/cantools/subparsers/monitor.py b/src/cantools/subparsers/monitor.py index 043a1fa..80da0e5 100644 --- a/src/cantools/subparsers/monitor.py +++ b/src/cantools/subparsers/monitor.py @@ -137,12 +137,6 @@ class Monitor(can.Listener): status_text += f', Filter: {self._filter}' self.add...
["tests/test_monitor.py::CanToolsMonitorTest::test_bad_message_length_error", "tests/test_monitor.py::CanToolsMonitorTest::test_can_fd", "tests/test_monitor.py::CanToolsMonitorTest::test_display_muxed_data", "tests/test_monitor.py::CanToolsMonitorTest::test_display_muxed_data_multiple_single_line", "tests/test_monitor....
["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
58
15
1,358
0
0.6
1
0.75
1
0.419667
81.534
4,310
swe_smith::train::21497
swe_smith
train
21,497
rubik__radon.54b88e58.func_pm_remove_assign__rbi8ik5o
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
# Cyclomatic complexity calculation broken in ComplexityVisitor ### Describe the bug The cyclomatic complexity calculation in `ComplexityVisitor` is not working correctly. Several complexity-increasing constructs are not being counted properly, which results in incorrect complexity scores. ### Steps/Code to Reproduc...
diff --git a/radon/visitors.py b/radon/visitors.py index e774648..d6f26f9 100644 --- a/radon/visitors.py +++ b/radon/visitors.py @@ -229,30 +229,27 @@ class ComplexityVisitor(CodeVisitor): # In Python 3.3 the TryExcept and TryFinally nodes have been merged # into a single node: Try if name in...
["radon/tests/test_complexity_utils.py::test_flake8_checker"]
["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
9
1
2,336
0
0.6
1
0.75
1
0.419333
81.533
4,311
swe_smith::train::28374
swe_smith
train
28,374
encode__starlette.db5063c2.combine_file__to13kk3d
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Template rendering broken with swapped template and context parameters #### Description When using Jinja2Templates, template rendering fails because the template and context parameters appear to be swapped internally, causing AttributeError when trying to render templates. #### Steps/Code to Reproduce ```python fro...
diff --git a/starlette/templating.py b/starlette/templating.py index 17e7fa4..947e731 100644 --- a/starlette/templating.py +++ b/starlette/templating.py @@ -30,15 +30,15 @@ class _TemplateResponse(HTMLResponse): self, template: typing.Any, context: dict[str, typing.Any], - status_code:...
["tests/test_templates.py::test_templates[asyncio]", "tests/test_templates.py::test_calls_context_processors[asyncio]", "tests/test_templates.py::test_template_with_middleware[asyncio]", "tests/test_templates.py::test_templates_with_directories[asyncio]", "tests/test_templates.py::test_templates_with_environment[asynci...
["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
46
22
1,594
0
0.6
1
0.75
1
0.419
81.532
4,312
swe_smith::train::28402
swe_smith
train
28,402
encode__starlette.db5063c2.combine_module__4468jgl1
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
AuthenticationMiddleware constructor parameters swapped #### Description The AuthenticationMiddleware constructor is incorrectly assigning the `app` parameter to `self.backend` and the `backend` parameter to `self.app`. This causes authentication to fail completely as the middleware tries to use the ASGI app as an au...
diff --git a/starlette/middleware/authentication.py b/starlette/middleware/authentication.py index 8555ee0..70225ff 100644 --- a/starlette/middleware/authentication.py +++ b/starlette/middleware/authentication.py @@ -20,10 +20,10 @@ class AuthenticationMiddleware: backend: AuthenticationBackend, on_er...
["tests/middleware/test_gzip.py::test_gzip_responses[asyncio]", "tests/middleware/test_gzip.py::test_gzip_ignored_for_small_responses[asyncio]", "tests/middleware/test_gzip.py::test_gzip_streaming_response[asyncio]", "tests/middleware/test_gzip.py::test_gzip_ignored_for_responses_with_encoding_set[asyncio]", "tests/mid...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
2
18
18
2,154
0
0.6
1
0.75
1
0.419
81.532
4,313
swe_smith::train::30487
swe_smith
train
30,487
gweis__isodate.17cb25eb.combine_file__3d5ffych
swesmith/gweis__isodate.17cb25eb
gweis/isodate
python
null
Time parsing broken after recent changes #### Description ISO 8601 time parsing is completely broken. Basic time strings like "23:20:50" and "232050" are failing to parse correctly. #### Steps/Code to Reproduce ```python from isodate import parse_time # These should work but don't parse_time("23:20:50") parse_time...
diff --git a/src/isodate/isotime.py b/src/isodate/isotime.py index 78b4de2..62e970f 100644 --- a/src/isodate/isotime.py +++ b/src/isodate/isotime.py @@ -25,46 +25,33 @@ def build_time_regexps() -> list[re.Pattern[str]]: The regular expressions are compiled and stored in TIME_REGEX_CACHE for later reuse. ...
["tests/test_datetime.py::test_parse[19850412T1015-expected0-%Y%m%dT%H%M-19850412T1015]", "tests/test_datetime.py::test_parse[1985-04-12T10:15-expected1-%Y-%m-%dT%H:%M-1985-04-12T10:15]", "tests/test_datetime.py::test_parse[1985102T1015Z-expected2-%Y%jT%H%M%z-1985102T1015Z]", "tests/test_datetime.py::test_parse[1985-10...
["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::tes...
jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb
true
null
1
87
66
773
0
0.6
1
0.75
1
0.418833
81.5315
4,314
swe_smith::train::7663
swe_smith
train
7,663
cantools__cantools.0c6a7871.func_basic__n528kjx8
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML SecOC parsing fails with NoneType division error When loading ARXML files with SecOC (Secure Onboard Communication) configurations, the parser crashes with a `TypeError: unsupported operand type(s) for //: 'NoneType' and 'int'` error. #### Steps to Reproduce ```python import cantools # This will fail when loa...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..e28a361 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -828,93 +828,82 @@ 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
65
10
1,213
0
0.6
1
0.75
1
0.418833
81.5315
4,315
swe_smith::train::47263
swe_smith
train
47,263
python-trio__trio.cfbbe2c1.lm_rewrite__c8b7qate
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
WorkerThread fails to handle exceptions in deliver function Description It seems that the recent changes to the WorkerThread class have introduced an issue where exceptions raised within the deliver function are not being handled correctly. This results in the worker thread not being marked as idle, which can lead to...
diff --git a/src/trio/_core/_thread_cache.py b/src/trio/_core/_thread_cache.py index 189d5a5..16090aa 100644 --- a/src/trio/_core/_thread_cache.py +++ b/src/trio/_core/_thread_cache.py @@ -158,36 +158,42 @@ class WorkerThread(Generic[RetT]): self._thread.start() def _handle_job(self) -> None: - #...
["src/trio/_core/_tests/test_thread_cache.py::test_raise_in_deliver"]
["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
62
1
1,272
0
0.6
1
0.75
1
0.418667
81.531
4,316
swe_smith::train::31577
swe_smith
train
31,577
benoitc__gunicorn.bacbf8aa.func_basic__x71ekk6j
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
# Syntax error handling broken when reloading applications ## Bug summary When Gunicorn is running with reload enabled and encounters a syntax error in the application, it's not properly handling the error. Instead of adding the file with the syntax error to the reloader's watch list, it's adding a hardcoded incorrect...
diff --git a/gunicorn/workers/base.py b/gunicorn/workers/base.py index 93c465c..96b2db2 100644 --- a/gunicorn/workers/base.py +++ b/gunicorn/workers/base.py @@ -147,23 +147,21 @@ class Worker: self.wsgi = self.app.wsgi() except SyntaxError as e: if not self.cfg.reload: - ...
["tests/test_reload.py::test_reload_on_syntax_error"]
["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
16
1
2,191
0
0.6
1
0.75
1
0.4185
81.5305
4,317
swe_smith::train::6572
swe_smith
train
6,572
joke2k__faker.8b401a7d.combine_module__5t5xnt2a
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# Canadian SIN checksum calculation is incorrect When generating a Canadian Social Insurance Number (SIN), the checksum calculation is producing incorrect values. This affects the validity of generated SINs. ## Steps to reproduce ```python from faker import Faker # Create a Canadian faker fake = Faker('en_CA') # G...
diff --git a/faker/providers/ssn/en_CA/__init__.py b/faker/providers/ssn/en_CA/__init__.py index 6df8f8b..aa5cae2 100644 --- a/faker/providers/ssn/en_CA/__init__.py +++ b/faker/providers/ssn/en_CA/__init__.py @@ -26,9 +26,9 @@ def checksum(sin): for i in range(1, len(checksumCollection), 2): result = chec...
["tests/providers/test_ssn.py::TestEnCA::test_ssn", "tests/providers/test_ssn.py::TestItIT::test_ssn", "tests/providers/test_ssn.py::TestItIT::test_ssn_with_latin_chars", "tests/providers/test_ssn.py::TestItIT::test_vat_id"]
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
2
30
4
1,911
0
0.6
1
0.75
1
0.4185
81.5305
4,318
swe_smith::train::1414
swe_smith
train
1,414
Cog-Creators__Red-DiscordBot.33e0eac7.combine_module__vdg3zspc
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
# Parameter swapping in Case class constructor ### Description I've noticed that the parameters in the Case class constructor are being assigned to the wrong attributes. When creating a new case in the modlog, the parameters are getting mixed up, causing incorrect data to be stored. For example, when I try to create...
diff --git a/redbot/core/dev_commands.py b/redbot/core/dev_commands.py index b0deb5c..be2db2b 100644 --- a/redbot/core/dev_commands.py +++ b/redbot/core/dev_commands.py @@ -169,7 +169,7 @@ class DevOutput: await self.ctx.tick() def set_exception(self, exc: Exception, *, skip_frames: int = 1) -> None...
["tests/cogs/test_mod.py::test_modlog_case_create", "tests/core/test_dev_commands.py::test_regression_format_exception_from_previous_snippet"]
["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
16
2
2,189
0
0.6
1
0.75
1
0.418167
81.5295
4,319
swe_smith::train::6591
swe_smith
train
6,591
joke2k__faker.8b401a7d.combine_module__ojfqafk1
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# [Bug]: Missing methods in Finnish and Hungarian SSN providers I found an issue with the Finnish and Hungarian SSN providers in Faker. There seem to be some missing methods that are causing problems when generating SSNs. ## Finnish SSN Provider Issue When trying to generate Finnish SSNs, I'm getting errors because ...
diff --git a/faker/providers/ssn/fi_FI/__init__.py b/faker/providers/ssn/fi_FI/__init__.py index 016782c..967262c 100644 --- a/faker/providers/ssn/fi_FI/__init__.py +++ b/faker/providers/ssn/fi_FI/__init__.py @@ -43,24 +43,4 @@ class Provider(SsnProvider): hetu = "".join([hetu_date, separator, suffix, checksum...
["tests/providers/test_ssn.py::TestFiFI::test_artifical_ssn", "tests/providers/test_ssn.py::TestFiFI::test_century_code", "tests/providers/test_ssn.py::TestFiFI::test_ssn_sanity", "tests/providers/test_ssn.py::TestFiFI::test_ssn_without_age_range", "tests/providers/test_ssn.py::TestFiFI::test_valid_ssn", "tests/provide...
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
2
29
7
1,928
0
0.6
1
0.75
1
0.418
81.529
4,320
swe_smith::train::24548
swe_smith
train
24,548
sunpy__sunpy.f8edfd5c.combine_module__vyi0n5qk
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
`unique` function returns wrong results when key parameter is None #### Description The `unique` function in `sunpy.util.util` is not working correctly when the `key` parameter is `None`. It appears the logic for handling the `key=None` case has been swapped with the case where a key function is provided. #### Steps...
diff --git a/sunpy/util/decorators.py b/sunpy/util/decorators.py index d989247..fddcbd4 100644 --- a/sunpy/util/decorators.py +++ b/sunpy/util/decorators.py @@ -187,44 +187,39 @@ def deprecate_positional_args_since(func=None, *, since): Taken from from `scikit-learn <https://github.com/scikit-learn/scikit-learn/bl...
["sunpy/util/tests/test_decorators.py::test_deprecate_positional_args_warns_for_function_version", "sunpy/util/tests/test_decorators.py::test_deprecate_positional_args_warns_quantity_input", "sunpy/util/tests/test_decorators.py::test_deprecate_positional_args_warns_for_class", "sunpy/util/tests/test_util.py::test_uniqu...
["sunpy/util/tests/test_decorators.py::test_somefunc_context", "sunpy/util/tests/test_util.py::test_replacement_filename", "sunpy/util/tests/test_util.py::test_replacement_filename_path_not_exists", "sunpy/util/tests/test_util.py::test_expand_list", "sunpy/util/tests/test_util.py::test_expand_list_generator[input_data0...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
74
5
1,028
0
0.6
1
0.75
1
0.418
81.529
4,321
swe_smith::train::17224
swe_smith
train
17,224
prettytable__prettytable.ca90b055.lm_rewrite__athivwgy
swesmith/prettytable__prettytable.ca90b055
prettytable/prettytable
python
null
### Bug: Field Names Validation Issue #### Description It seems there's a problem with field name validation in the `PrettyTable` class. When attempting to perform operations that involve field names, such as generating JSON or HTML output, a `ValueError` is raised unexpectedly. This issue appears to be related to th...
diff --git a/src/prettytable/prettytable.py b/src/prettytable/prettytable.py index 818a520..d5857d8 100644 --- a/src/prettytable/prettytable.py +++ b/src/prettytable/prettytable.py @@ -560,32 +560,31 @@ class PrettyTable: self._validate_attributes(option, val) def _validate_field_names(self, val): -...
["tests/test_prettytable.py::TestJSONOutput::test_json_output", "tests/test_prettytable.py::TestJSONOutput::test_json_output_options", "tests/test_prettytable.py::TestHtmlOutput::test_html_output", "tests/test_prettytable.py::TestHtmlOutput::test_html_output_formatted", "tests/test_prettytable.py::TestHtmlOutput::test_...
["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
43
38
1,648
0
0.6
1
0.75
1
0.418
81.529
4,322
r2e_gym::train::4953
r2e_gym
train
4,953
datalad__48975a033c2f5ae43aa5132612165aa5a4bd39dc
datalad
datalad/datalad
python
48975a033c2f5ae43aa5132612165aa5a4bd39dc
**Analysis:** - **Key Parts:** - **Commit Message:** Enhances support for custom version gathering, specifically for `annex`. - **Test Results:** The `test_custom_versions` failed in the old commit with a `TypeError` when comparing `ev['annex']` with a string. After the commit, the test passes, indicating that `ev...
diff --git a/datalad/support/external_versions.py b/datalad/support/external_versions.py --- a/datalad/support/external_versions.py +++ b/datalad/support/external_versions.py @@ -14,6 +14,10 @@ from distutils.version import StrictVersion, LooseVersion +from datalad.dochelpers import exc_str +from datalad.log impor...
diff --git a/datalad/support/tests/test_external_versions.py b/datalad/support/tests/test_external_versions.py --- a/datalad/support/tests/test_external_versions.py +++ b/datalad/support/tests/test_external_versions.py @@ -93,3 +93,13 @@ # more of a smoke test assert_false(linesep in ev.dumps()) assert_t...
null
null
namanjain12/datalad_final:48975a033c2f5ae43aa5132612165aa5a4bd39dc
true
null
1
52
null
2,180
0
0.75
1
0.6375
1
0.536667
81.52875
4,323
swe_smith::train::3252
swe_smith
train
3,252
Suor__funcy.207a7810.lm_rewrite__jju6kesi
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Error in _format_error function breaks error logging and reporting ## Description After updating to the latest version, I noticed that error logging and reporting functionality is broken. The `_format_error` function in `debug.py` doesn't properly format error messages anymore, which affects several functions like `...
diff --git a/funcy/debug.py b/funcy/debug.py index 62ef1bc..0558971 100644 --- a/funcy/debug.py +++ b/funcy/debug.py @@ -201,20 +201,32 @@ def print_iter_durations(seq, label=None, unit='auto'): ### Formatting utils def _format_error(label, e, stack=True): - if isinstance(e, Exception): + """Format error mess...
["tests/test_debug.py::test_log_calls_raise", "tests/test_debug.py::test_log_errors", "tests/test_debug.py::test_log_errors_manager", "tests/test_debug.py::test_print_errors", "tests/test_debug.py::test_print_errors_manager"]
["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
30
5
1,904
0
0.6
1
0.75
1
0.417333
81.527
4,324
swe_smith::train::22725
swe_smith
train
22,725
graphql-python__graphene.82903263.combine_module__lzaietub
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
# DataLoader and OrderedType bugs in graphene utils ## Description I found a couple of bugs in the graphene utils module that break functionality in both the DataLoader and OrderedType classes. ### DataLoader issues: When using the DataLoader class, I'm encountering several problems: 1. The `clear` method no longe...
diff --git a/graphene/utils/dataloader.py b/graphene/utils/dataloader.py index c75b9ee..5c0793b 100644 --- a/graphene/utils/dataloader.py +++ b/graphene/utils/dataloader.py @@ -15,7 +15,7 @@ Loader = namedtuple("Loader", "key,future") def iscoroutinefunctionorpartial(fn): - return iscoroutinefunction(fn.func if...
["graphene/utils/tests/test_dataloader.py::test_basic_dataloader", "graphene/utils/tests/test_dataloader.py::test_build_a_simple_data_loader", "graphene/utils/tests/test_dataloader.py::test_supports_loading_multiple_keys_in_one_call", "graphene/utils/tests/test_dataloader.py::test_batches_multiple_requests", "graphene/...
["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i...
jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263
true
null
2
11
20
2,284
0
0.6
1
0.75
1
0.417333
81.527
4,325
swe_smith::train::1689
swe_smith
train
1,689
agronholm__typeguard.b6a7e438.combine_module__1knoriqb
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking fails with incorrect error messages and function resolution #### Description After recent changes, typeguard is producing incorrect error messages and failing to properly resolve function references. The type checking functionality appears to be broken in multiple ways. #### Steps/Code to Reproduce ``...
diff --git a/src/typeguard/_decorators.py b/src/typeguard/_decorators.py index a6c20cb..de4bb7e 100644 --- a/src/typeguard/_decorators.py +++ b/src/typeguard/_decorators.py @@ -36,20 +36,20 @@ def make_cell(value: object) -> _Cell: def find_target_function( new_code: CodeType, target_path: Sequence[str], firstlin...
["tests/test_checkers.py::TestLiteral::test_literal_union", "tests/test_checkers.py::TestMapping::test_bad_key_type", "tests/test_checkers.py::TestMapping::test_bad_value_type", "tests/test_checkers.py::TestMapping::test_bad_key_type_full_check", "tests/test_checkers.py::TestMapping::test_bad_value_type_full_check", "t...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
2
54
109
1,423
0
0.6
1
0.75
1
0.417167
81.5265
4,326
swe_smith::train::27785
swe_smith
train
27,785
arrow-py__arrow.1d70d009.func_pm_remove_cond__zr18xbtt
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
ArrowFactory.get() returns None for many input types #### Description The `arrow.get()` function is returning `None` instead of proper Arrow objects for various input types including dates, strings, ISO calendar tuples, and timezone-aware datetime objects. #### Steps/Code to Reproduce ```python import arrow from da...
diff --git a/arrow/factory.py b/arrow/factory.py index 53eb8d1..98d755d 100644 --- a/arrow/factory.py +++ b/arrow/factory.py @@ -205,17 +205,6 @@ class ArrowFactory: if len(kwargs) == 1 and tz is None: arg_count = 3 - # () -> now, @ tzinfo or utc - if arg_count == 0: - i...
["tests/test_factory.py::TestGet::test_no_args", "tests/test_factory.py::TestGet::test_timestamp_one_arg_no_arg", "tests/test_factory.py::TestGet::test_struct_time", "tests/test_factory.py::TestGet::test_one_arg_timestamp", "tests/test_factory.py::TestGet::test_one_arg_date", "tests/test_factory.py::TestGet::test_one_a...
["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
67
32
1,163
0
0.6
1
0.75
1
0.417167
81.5265
4,327
swe_smith::train::6560
swe_smith
train
6,560
joke2k__faker.8b401a7d.combine_file__htznb606
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# Color generation with specific luminosity values is broken ## Description After recent changes, the color generation with specific luminosity values is not working correctly. The colors generated with luminosity parameters like 'dark', 'bright', 'light', and 'random' are completely different from what they should be...
diff --git a/faker/providers/color/color.py b/faker/providers/color/color.py index 756942b..b65663f 100644 --- a/faker/providers/color/color.py +++ b/faker/providers/color/color.py @@ -229,33 +229,31 @@ class RandomColor: s_min, s_max = self.get_saturation_range(hue) - if luminosity == "bright": - ...
["tests/providers/test_color.py::TestRandomColor::test_hue_invalid", "tests/providers/test_color.py::TestRandomColor::test_luminosity_word"]
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
39
2
1,721
0
0.6
1
0.75
1
0.416833
81.5255
4,328
swe_smith::train::1962
swe_smith
train
1,962
agronholm__typeguard.b6a7e438.lm_rewrite__ft2smsu3
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Augmented assignment operations fail with TypeError in typeguard I've encountered an issue with augmented assignment operations when using typeguard. When I try to use augmented assignment operators (`+=`, `-=`, etc.) on variables with type annotations, I get errors. ## Steps to reproduce 1. Create a simple Python...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..11873c9 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -1157,43 +1157,37 @@ class TypeguardTransformer(NodeTransformer): if isinstance(self._memo.node, (FunctionDef, AsyncFunctionDef)) a...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_instrumentation.py::test_augmented_assign[typechecked]", "tests/test_transformer.py::TestAssign::test_augmented_assignment[add]", "tests/test_transformer.py::TestAssign::test_augmented_assignment[subtra...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
52
16
1,461
0
0.6
1
0.75
1
0.416833
81.5255
4,329
swe_smith::train::34127
swe_smith
train
34,127
iterative__dvc.1d6ea681.combine_module__e3u7bps7
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
`dvc check-ignore` and `dvc ls` commands broken after recent changes #### Description The `dvc check-ignore` and `dvc ls` commands are not working properly. When running `dvc check-ignore` on ignored files, it's not producing the expected output format. Similarly, `dvc ls` with size and hash options is failing. ####...
diff --git a/dvc/commands/check_ignore.py b/dvc/commands/check_ignore.py index d8f2597..0f04928 100644 --- a/dvc/commands/check_ignore.py +++ b/dvc/commands/check_ignore.py @@ -10,19 +10,27 @@ class CmdCheckIgnore(CmdBase): self.ignore_filter = self.repo.dvcignore def _show_results(self, result): - ...
["tests/func/test_check_ignore.py::test_check_ignore[ignored-0-True]", "tests/func/test_check_ignore.py::test_check_ignore_details[file-0-.dvcignore:1:f*\\tfile\\n]", "tests/func/test_check_ignore.py::test_check_ignore_details[foo-0-.dvcignore:2:!foo\\tfoo\\n]", "tests/func/test_check_ignore.py::test_check_ignore_detai...
["tests/func/test_check_ignore.py::test_check_ignore[not_ignored-1-False]", "tests/func/test_check_ignore.py::test_check_ignore_non_matching[False]", "tests/func/test_check_ignore.py::test_check_ignore_error_args_cases[args0]", "tests/func/test_check_ignore.py::test_check_ignore_error_args_cases[args1]", "tests/func/te...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
2
64
13
1,221
0
0.6
1
0.75
1
0.416833
81.5255
4,330
swe_smith::train::18378
swe_smith
train
18,378
msiemens__tinydb.10644a0e.lm_rewrite__eu4jtf9q
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
# upsert() method doesn't raise ValueError when no condition is provided ## Description There appears to be an issue with the `upsert()` method in TinyDB. When calling `upsert()` without specifying a condition or using a document with a doc_id, the method should raise a ValueError. However, it's currently accepting d...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..7dc0c95 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -510,7 +510,7 @@ class Table: return updated_ids - def upsert(self, document: Mapping, cond: Optional[QueryLike] = None) -> List[int]: + def upsert(self, document: Mapping, cond...
["tests/test_tinydb.py::test_upsert_by_id[memory]", "tests/test_tinydb.py::test_upsert_by_id[json]"]
["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
55
2
1,400
0
0.6
1
0.75
1
0.416667
81.525
4,331
swe_smith::train::12715
swe_smith
train
12,715
lepture__mistune.bf54ef67.lm_rewrite__xvphj155
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
### Description After the recent changes, rendering list items seems to be causing issues. Specifically, there are problems with the handling of list items in both RST and Markdown renderers. The issue appears to be related to the way list items are processed and rendered, leading to unexpected errors. ### Steps/Code...
diff --git a/src/mistune/renderers/_list.py b/src/mistune/renderers/_list.py index a9f0313..de5ba0e 100644 --- a/src/mistune/renderers/_list.py +++ b/src/mistune/renderers/_list.py @@ -24,31 +24,39 @@ def render_list( return strip_end(text) + '\n' -def _render_list_item( - renderer: "BaseRenderer", - par...
["tests/test_renderers.py::TestRendererRst::test_list_001", "tests/test_renderers.py::TestRendererRst::test_list_002", "tests/test_renderers.py::TestRendererRst::test_list_003", "tests/test_renderers.py::TestRendererRst::test_list_004", "tests/test_renderers.py::TestRendererRst::test_list_005", "tests/test_renderers.py...
["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx...
jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67
true
null
1
56
11
1,376
0
0.6
1
0.75
1
0.416
81.523
4,332
swe_smith::train::29230
swe_smith
train
29,230
tox-dev__pipdeptree.c31b6418.lm_rewrite__cfvlhak8
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
# Environment detection fails with RuntimeError instead of SystemExit ## Description I've encountered an issue with the environment detection in pipdeptree. When running in an environment where the Python interpreter path doesn't exist or when using an unsupported Python implementation, the code now raises a `Runtime...
diff --git a/src/pipdeptree/_detect_env.py b/src/pipdeptree/_detect_env.py index 36037e8..6854160 100644 --- a/src/pipdeptree/_detect_env.py +++ b/src/pipdeptree/_detect_env.py @@ -14,22 +14,26 @@ def detect_active_interpreter() -> str: If it fails to find any, it will fail with a message. """ - detectio...
["tests/test_detect_env.py::test_detect_active_interpreter_non_supported_python_implementation", "tests/test_detect_env.py::test_detect_active_interpreter_non_existent_path"]
["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
36
2
1,775
0
0.6
1
0.75
1
0.415833
81.5225
4,333
swe_smith::train::30950
swe_smith
train
30,950
mido__mido.a0158ff9.lm_rewrite__2jsf644r
swesmith/mido__mido.a0158ff9
mido/mido
python
null
# MetaMessage.from_bytes incorrectly handles variable length data ## Description I found a bug in the `MetaMessage.from_bytes()` method where it doesn't correctly handle meta messages with variable length data. The method is incorrectly validating the length of the data. ## How to Reproduce Here's a simple reproduc...
diff --git a/mido/midifiles/meta.py b/mido/midifiles/meta.py index 0a7e2ba..8720508 100644 --- a/mido/midifiles/meta.py +++ b/mido/midifiles/meta.py @@ -547,23 +547,42 @@ class MetaMessage(BaseMessage): @classmethod def from_bytes(cls, msg_bytes): - if msg_bytes[0] != 0xff: - raise ValueEr...
["../dev/tests/midifiles/test_meta.py::test_meta_from_bytes_data_too_long"]
["../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
53
1
1,434
0
0.6
1
0.75
1
0.415667
81.522
4,334
swe_smith::train::14559
swe_smith
train
14,559
hukkin__tomli.443a0c1b.lm_rewrite__b3lr9g4n
swesmith/hukkin__tomli.443a0c1b
hukkin/tomli
python
null
# Dotted key syntax in TOML parser doesn't check for namespace redefinition ## Description The TOML parser in tomli has a bug where it doesn't properly check for namespace redefinition when using dotted key syntax. This has been broken since the refactoring of the key_value_rule function. ## Code to Reproduce ```to...
diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index 16c76cd..c8156f5 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -390,40 +390,38 @@ def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]: return pos + 2, key -def key_value_rule( - src: str, pos: Pos, out: Out...
["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
52
1
1,454
0
0.6
1
0.75
1
0.415667
81.522
4,335
swe_smith::train::1952
swe_smith
train
1,952
agronholm__typeguard.b6a7e438.lm_rewrite__7f2ommea
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Union type annotations broken in Python 3.10+ I've discovered an issue with the handling of union type annotations in Python 3.10+. When using the pipe operator (`|`) for union types, the typeguard transformer is incorrectly processing them. ## Reproduction Here's a minimal example that demonstrates the issue: ``...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..689f15c 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -369,31 +369,30 @@ class AnnotationTransformer(NodeTransformer): return new_node def visit_BinOp(self, node: BinOp) -> Any: ...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_transformer.py::test_any_in_pep_604_union", "tests/test_typechecked.py::test_keyword_argument_default"]
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
45
4
1,591
0
0.6
1
0.75
1
0.415167
81.5205
4,336
swe_smith::train::52360
swe_smith
train
52,360
pydicom__pydicom.7d361b3d.func_pm_class_rm_funcs__w29zlq7y
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# FileDataset deepcopy fails when buffer is closed ## Description I encountered an issue when trying to make a deep copy of a FileDataset object that has a closed buffer. After removing the `__deepcopy__` method from the FileDataset class, the deep copy operation fails. ## Steps to reproduce ```python import io imp...
diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py index e7abffd..75d4ecd 100644 --- a/src/pydicom/dataset.py +++ b/src/pydicom/dataset.py @@ -3433,37 +3433,6 @@ class FileDataset(Dataset): if self.filename and os.path.exists(self.filename): self.timestamp = os.stat(self.filename).st_mti...
["tests/test_dataset.py::TestFileDataset::test_deepcopy_buffer_closed"]
["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
31
1
1,871
0
0.6
1
0.75
1
0.415167
81.5205
4,337
swe_smith::train::39706
swe_smith
train
39,706
tornadoweb__tornado.d5ac65c1.func_pm_class_rm_funcs__vbpashl9
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
WebSocket connections fail with AttributeError after removing close method #### Description WebSocket connections are failing with HTTP 500 errors. When trying to establish a WebSocket connection, the server returns an internal server error instead of properly handling the connection. #### Steps/Code to Reproduce `...
diff --git a/tornado/websocket.py b/tornado/websocket.py index 1e0161e..70c76a7 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -1238,38 +1238,6 @@ class WebSocketProtocol13(WebSocketProtocol): self._abort() return None - def close(self, code: Optional[int] = None, reason: Opt...
["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
51
38
1,471
0
0.6
1
0.75
1
0.415167
81.5205
4,338
swe_smith::train::29749
swe_smith
train
29,749
getnikola__nikola.0f4c230e.combine_file__i8pdo30u
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
# Metadata Extractors Code Order Issue ## Description I'm experiencing issues with the metadata extractors in Nikola. The code seems to be executing in the wrong order, causing various functions to fail when trying to extract or write metadata. ## Steps to Reproduce ```python from nikola.metadata_extractors import N...
diff --git a/nikola/metadata_extractors.py b/nikola/metadata_extractors.py index 87013ee..8923963 100644 --- a/nikola/metadata_extractors.py +++ b/nikola/metadata_extractors.py @@ -158,27 +158,26 @@ class NikolaMetadata(MetadataExtractor): return outdict def write_metadata(self, metadata: dict, comment_...
["tests/integration/test_wordpress_import.py::test_filled_directories[pages]", "tests/test_metadata_extractors.py::test_builtin_extractors_rest[yaml-YAML-1-onefile-twofile]", "tests/test_metadata_extractors.py::test_builtin_extractors_rest[yaml-YAML-2-twofile-onefile]", "tests/test_metadata_extractors.py::test_yaml_non...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
38
10
1,730
0
0.6
1
0.75
1
0.415
81.52
4,339
swe_smith::train::26191
swe_smith
train
26,191
pylint-dev__astroid.b114f6b5.func_pm_class_rm_funcs__cccngbh5
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
FormattedValue node missing _infer method causes f-string inference to fail #### Description F-string inference is broken after recent changes. When trying to infer the value of f-strings containing formatted values, the code fails because the `FormattedValue` node is missing its `_infer` method. #### Steps/Code to ...
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index fde3239..8ef08c0 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -4610,53 +4610,6 @@ class FormattedValue(NodeNG): _astroid_fields = ("value", "format_spec") _other_fields = ("conversion",) - ...
["tests/test_inference.py::InferenceTest::test_fstring_inference", "tests/test_inference.py::test_empty_format_spec"]
["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
79
2
909
0
0.6
1
0.75
1
0.414833
81.5195
4,340
swe_smith::train::35930
swe_smith
train
35,930
stanfordnlp__dspy.651a4c71.lm_rewrite__p7nxf274
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Image encoding from URL fails when content type is missing ## Description I've discovered an issue with the `_encode_image_from_url` function in DSPy. When trying to encode images from URLs where the server doesn't provide a Content-Type header, the function fails to properly handle the situation. The problem occu...
diff --git a/dspy/adapters/types/image.py b/dspy/adapters/types/image.py index 1ca1dc6..9b0c313 100644 --- a/dspy/adapters/types/image.py +++ b/dspy/adapters/types/image.py @@ -146,22 +146,23 @@ def _encode_image_from_file(file_path: str) -> str: def _encode_image_from_url(image_url: str) -> str: """Encode a fi...
["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
33
4
1,828
0
0.6
1
0.75
1
0.414667
81.519
4,341
swe_smith::train::39926
swe_smith
train
39,926
tornadoweb__tornado.d5ac65c1.func_pm_remove_wrapper__5xb82kwd
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
# IOStream closes without resolving pending reads ## Description I've discovered an issue with the `BaseIOStream` class in Tornado. When a stream is closed while there are pending reads that could be satisfied from the buffer, these reads are not being resolved properly. ## Steps to Reproduce Create a server and cl...
diff --git a/tornado/iostream.py b/tornado/iostream.py index dd2111e..b890d3e 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -590,21 +590,13 @@ class BaseIOStream: self._read_until_close = False self._finish_read(self._read_buffer_size) elif self._read_futur...
["test_read_until_with_close_after_second_packet (tornado.test.iostream_test.TestIOStreamSSL)", "test_read_until_with_close_after_second_packet (tornado.test.iostream_test.TestIOStreamSSLContext)"]
["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
10
2
2,286
0
0.6
1
0.75
1
0.414333
81.518
4,342
swe_smith::train::2650
swe_smith
train
2,650
cknd__stackprinter.219fcc52.combine_file__5x4jvjgf
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
# Stackprinter formatting issues with plaintext vs colorful output I'm encountering some strange behavior with stackprinter's formatting functionality. The output format seems to be completely wrong in several scenarios. ## Reproduction Here's a simple example that demonstrates the issue: ```python import stackprin...
diff --git a/stackprinter/formatting.py b/stackprinter/formatting.py index 25f5fd8..db9371e 100644 --- a/stackprinter/formatting.py +++ b/stackprinter/formatting.py @@ -12,9 +12,9 @@ from stackprinter.frame_formatting import FrameFormatter, ColorfulFrameFormatter def get_formatter(style, **kwargs): if style in ...
["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting", "tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting"]
["tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
true
null
1
47
4
1,546
0
0.6
1
0.75
1
0.414333
81.518
4,343
swe_smith::train::10061
swe_smith
train
10,061
paramiko__paramiko.23f92003.combine_file__4tjm03d8
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH key exchange fails with AttributeError in client mode #### Description When establishing SSH connections in client mode, the key exchange process fails with an AttributeError during the computation of the client's public key value. This appears to affect all Diffie-Hellman key exchange groups. #### Steps/Code to...
diff --git a/paramiko/kex_group1.py b/paramiko/kex_group1.py index f074256..3eafdbc 100644 --- a/paramiko/kex_group1.py +++ b/paramiko/kex_group1.py @@ -54,13 +54,13 @@ class KexGroup1: def start_kex(self): self._generate_x() - if self.transport.server_mode: + if not self.transport.server_...
["tests/test_kex.py::KexTest::test_group1_client", "tests/test_kex.py::KexTest::test_group1_server", "tests/test_kex.py::KexTest::test_kex_group14_sha256_client", "tests/test_kex.py::KexTest::test_kex_group14_sha256_server", "tests/test_kex.py::KexTest::test_kex_group16_sha512_client", "tests/test_kex.py::KexTest::test...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
61
6
1,265
0
0.6
1
0.75
1
0.414167
81.5175
4,344
swe_smith::train::47275
swe_smith
train
47,275
python-trio__trio.cfbbe2c1.lm_rewrite__f1win0au
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
# CancelScope.__exit__ doesn't properly handle exceptions I'm experiencing an issue with the `CancelScope.__exit__` method in Trio. After a recent change, it seems that exceptions are not being properly handled when exiting a cancel scope. ## Reproduction Here's a simple example that demonstrates the issue: ```pyth...
diff --git a/src/trio/_core/_run.py b/src/trio/_core/_run.py index bfb38f4..ea0e370 100644 --- a/src/trio/_core/_run.py +++ b/src/trio/_core/_run.py @@ -651,38 +651,10 @@ class CancelScope: return exc @enable_ki_protection - def __exit__( - self, - etype: type[BaseException] | None, - ...
["src/trio/_core/_tests/test_run.py::test_cancel_scope_exceptiongroup_filtering", "src/trio/_core/_tests/test_run.py::test_cancel_scope_misnesting", "src/trio/_core/_tests/test_run.py::test_cancel_scope_exit_doesnt_create_cyclic_garbage"]
["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
36
3
1,761
0
0.6
1
0.75
1
0.4135
81.5155
4,345
swe_smith::train::35950
swe_smith
train
35,950
stanfordnlp__dspy.651a4c71.lm_rewrite__w3dunsjo
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# PythonInterpreter fails to inject variables when empty dictionary is provided I've found an issue with the `PythonInterpreter._inject_variables` method. When an empty dictionary is passed as the `variables` parameter, the code is returned unchanged without any validation. ## Reproduction Here's a simple example th...
diff --git a/dspy/primitives/python_interpreter.py b/dspy/primitives/python_interpreter.py index 7cb63bf..590ced1 100644 --- a/dspy/primitives/python_interpreter.py +++ b/dspy/primitives/python_interpreter.py @@ -56,16 +56,27 @@ class PythonInterpreter: raise InterpreterError(install_instructions) from...
["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
31
4
1,860
0
0.6
1
0.75
1
0.413333
81.515
4,346
r2e_gym::train::5075
r2e_gym
train
5,075
pyramid__f156e1fdffb95cef721848a5a20cd7ec02157f0f
pyramid
pylons/pyramid
python
f156e1fdffb95cef721848a5a20cd7ec02157f0f
**Analysis:** - **Key Parts:** - **Commit Changes:** Modified `view_execution_permitted` in `pyramid/security.py` to raise a `TypeError` if no view is found. - **Test Results:** - **Old Commit:** `test_no_view_registered` failed because `TypeError` was not raised. - **New Commit:** `test_no_view_registered...
diff --git a/CHANGES.txt b/CHANGES.txt --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,11 @@ userids. - Slightly better debug logging from RepozeWho1AuthenticationPolicy. + +- ``pyramid.security.view_execution_permitted`` used to return `True` if no + view could be found. It now raises a ``TypeError`` exception...
diff --git a/pyramid/tests/test_security.py b/pyramid/tests/test_security.py --- a/pyramid/tests/test_security.py +++ b/pyramid/tests/test_security.py @@ -131,6 +131,28 @@ return checker def test_no_permission(self): + from zope.interface import Interface + from pyramid.threadlocal import ...
null
null
namanjain12/pyramid_final:f156e1fdffb95cef721848a5a20cd7ec02157f0f
true
null
2
19
null
2,811
0
0.75
1
0.6375
1
0.531833
81.51425
4,347
swe_smith::train::32755
swe_smith
train
32,755
pydantic__pydantic.acb0f10f.lm_rewrite__2iju35h0
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Setting attributes on models with extra='allow' fails after recent changes #### Description When trying to set attributes on models that have `extra='allow'` configured, the attribute assignment fails with an AttributeError. This appears to be related to recent changes in the `_setattr_handler` method. #### Steps/Co...
diff --git a/pydantic/main.py b/pydantic/main.py index 03cb511..d460cd7 100644 --- a/pydantic/main.py +++ b/pydantic/main.py @@ -991,7 +991,7 @@ class BaseModel(metaclass=_model_construction.ModelMetaclass): setattr_handler(self, name, value) # call here to not memo on possibly unknown fields ...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/test_docs.py::test_docstrings_examples[pydantic/main.py:1169-1173]", "tests/test_edge_cases.py::test_setattr_handler_does_not_memoize_unknown_field", "tests/test_edge_cases.py::test_setattr_handler_does_not_memoize_unknown_private_field", "tests/test_ed...
["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_generics.py::test_fastapi_startup_perf", "tests/benchmarks/...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
72
17
1,037
0
0.6
1
0.75
1
0.412833
81.5135
4,348
swe_smith::train::3592
swe_smith
train
3,592
pygments__pygments.27649ebb.combine_module__511z43my
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
# Missing _filter_to method in LatexEmbeddedLexer breaks embedded LaTeX formatting ## Description After recent changes, the `LatexEmbeddedLexer` class in `pygments/formatters/latex.py` is broken because the `_filter_to` method was removed. This method is essential for the lexer to properly process embedded LaTeX cont...
diff --git a/pygments/formatters/latex.py b/pygments/formatters/latex.py index 2f7971e..556aa5a 100644 --- a/pygments/formatters/latex.py +++ b/pygments/formatters/latex.py @@ -482,23 +482,6 @@ class LatexEmbeddedLexer(Lexer): else: yield i, None, v - def _filter_to(self, it, pred): -...
["tests/test_cmdline.py::test_stream_opt", "tests/test_terminal_formatter.py::test_reasonable_output", "tests/test_terminal_formatter.py::test_reasonable_output_lineno", "tests/test_latex_formatter.py::test_embedded_lexer"]
["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
2
25
4
1,977
0
0.6
1
0.75
1
0.412833
81.5135
4,349
swe_smith::train::31420
swe_smith
train
31,420
benoitc__gunicorn.bacbf8aa.combine_module__7vr0qs2l
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Configuration loading broken after recent changes #### Description After some recent changes, gunicorn configuration loading is completely broken. The application fails to start with various AttributeError exceptions related to NoneType objects. #### Steps/Code to Reproduce ```python from gunicorn.app.wsgiapp impor...
diff --git a/gunicorn/app/base.py b/gunicorn/app/base.py index 9bf7a4f..9ee4005 100644 --- a/gunicorn/app/base.py +++ b/gunicorn/app/base.py @@ -19,10 +19,10 @@ class BaseApplication: the various necessities for any given web framework. """ def __init__(self, usage=None, prog=None): - self.usage =...
["tests/test_arbiter.py::test_env_vars_available_during_preload", "tests/test_config.py::test_cmd_line", "tests/test_config.py::test_cmd_line_invalid_setting", "tests/test_config.py::test_app_config", "tests/test_config.py::test_load_config", "tests/test_config.py::test_load_config_explicit_file", "tests/test_config.py...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
2
69
30
1,096
0
0.6
1
0.75
1
0.412667
81.513
4,350
swe_smith::train::14562
swe_smith
train
14,562
hukkin__tomli.443a0c1b.lm_rewrite__uaqwvdnw
swesmith/hukkin__tomli.443a0c1b
hukkin/tomli
python
null
# Escape sequence handling broken in multiline strings ## Description I found an issue with the escape sequence handling in TOML multiline strings. The parser doesn't correctly handle certain escape sequences, particularly in multiline strings. ## Steps to Reproduce ```python import tomli # This example shows the ...
diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index 16c76cd..86238da 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -535,34 +535,37 @@ def parse_inline_table(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos pos = skip_chars(src, pos, TOML_WS) -def parse_basic_str_escape...
["tests/test_data.py::TestData::test_valid"]
["tests/test_data.py::TestData::test_invalid", "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::...
jyangballin/swesmith.x86_64.hukkin_1776_tomli.443a0c1b
true
null
1
57
1
1,335
0
0.6
1
0.75
1
0.4125
81.5125
4,351
swe_smith::train::833
swe_smith
train
833
oauthlib__oauthlib.1fd52536.func_pm_remove_cond__wllpz46m
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth1 mandatory parameter validation removed accidentally #### Description The mandatory parameter validation for OAuth1 requests has been removed from the `_check_mandatory_parameters` method in `BaseEndpoint`. This means that OAuth1 requests missing required parameters like `oauth_signature`, `oauth_consumer_key`,...
diff --git a/oauthlib/oauth1/rfc5849/endpoints/base.py b/oauthlib/oauth1/rfc5849/endpoints/base.py index 8d3d89c..9241d69 100644 --- a/oauthlib/oauth1/rfc5849/endpoints/base.py +++ b/oauthlib/oauth1/rfc5849/endpoints/base.py @@ -111,27 +111,6 @@ class BaseEndpoint: raise errors.InsecureTransportError() ...
["tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_mandated_params", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_signature_method_validation", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_signature_methods"]
["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
22
3
2,035
0
0.6
1
0.75
1
0.4125
81.5125
4,352
swe_smith::train::30964
swe_smith
train
30,964
mido__mido.a0158ff9.lm_rewrite__un4ri9gy
swesmith/mido__mido.a0158ff9
mido/mido
python
null
### Issue: Incorrect Handling of SysEx Messages #### Description It seems that the recent changes have introduced an issue with the handling of SysEx messages. When attempting to decode certain MIDI messages, the function does not correctly process SysEx messages that do not end with the expected byte. This results i...
diff --git a/mido/messages/decode.py b/mido/messages/decode.py index ddb3f27..5883edf 100644 --- a/mido/messages/decode.py +++ b/mido/messages/decode.py @@ -71,43 +71,36 @@ def decode_message(msg_bytes, time=0, check=True): This is not a part of the public API. """ - # TODO: this function is getting long...
["../dev/tests/test_parser.py::test_parse", "../dev/tests/test_parser.py::test_encode_and_parse", "../dev/tests/test_parser.py::test_feed_byte", "../dev/tests/test_parser.py::test_parse_random_bytes", "../dev/tests/test_parser.py::test_parse_channel", "../dev/tests/test_parser.py::test_one_byte_message", "../dev/tests/...
["../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
61
21
1,255
0
0.6
1
0.75
1
0.4125
81.5125
4,353
swe_smith::train::48222
swe_smith
train
48,222
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__h0b7g6ru
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Jinja templater broken after code reorganization #### Description The Jinja templater is completely broken and fails to process any templates. When trying to use the templater, it encounters errors related to undefined variables like `walk_path`, `is_library_module`, and `library_module_name`. #### Steps/Code to Rep...
diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py index 934ded3..1939843 100644 --- a/src/sqlfluff/core/templaters/jinja.py +++ b/src/sqlfluff/core/templaters/jinja.py @@ -246,36 +246,6 @@ class JinjaTemplater(PythonTemplater): return macro_ctx def _extract_libra...
["test/core/templaters/jinja_test.py::test__templater_jinja[simple]", "test/core/templaters/jinja_test.py::test__templater_jinja[unboundlocal_bugfix]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[basic_block]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[strip_left_block]", "...
["test/core/templaters/jinja_test.py::test__templater_jinja_slice_template[-result0-JinjaAnalyzer]", "test/core/templaters/jinja_test.py::test__templater_jinja_slice_template[foo-result1-JinjaAnalyzer]", "test/core/templaters/jinja_test.py::test_dummy_undefined_fail_with_undefined_error", "test/core/templaters/jinja_te...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
65
71
1,174
0
0.6
1
0.75
1
0.412333
81.512
4,354
swe_smith::train::5024
swe_smith
train
5,024
bottlepy__bottle.a8dfef30.lm_rewrite__5qlg2wjt
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
# JSON plugin doesn't handle HTTPResponse objects correctly ## Description I've discovered an issue with the JSON plugin in Bottle. When a route returns an HTTPResponse object with a dictionary body, the JSON plugin doesn't properly convert the dictionary to JSON format. ## Steps to Reproduce 1. Create a route that ...
diff --git a/bottle.py b/bottle.py index 286b5bc..356efc8 100755 --- a/bottle.py +++ b/bottle.py @@ -1999,30 +1999,43 @@ class JSONPlugin(object): " apply.") def apply(self, callback, route): - dumps = self.json_dumps - if not self.json_dumps: return callback - - ...
["test/test_outputfilter.py::TestOutputFilter::test_json", "test/test_outputfilter.py::TestOutputFilter::test_json_HTTPError", "test/test_outputfilter.py::TestOutputFilter::test_json_HTTPResponse", "test/test_plugins.py::TestPluginManagement::test_json_plugin_catches_httpresponse"]
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
43
4
1,613
0
0.6
1
0.75
1
0.412167
81.5115
4,355
swe_smith::train::52354
swe_smith
train
52,354
pydicom__pydicom.7d361b3d.func_pm_class_rm_funcs__jrvko4d1
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
JsonDataElementConverter missing get_element_values method after refactoring #### Description After a recent change, the `JsonDataElementConverter` class is missing the `get_element_values` method, causing JSON deserialization to fail with AttributeError. #### Steps/Code to Reproduce ```python from pydicom import D...
diff --git a/src/pydicom/jsonrep.py b/src/pydicom/jsonrep.py index 48fd36f..bdf164e 100644 --- a/src/pydicom/jsonrep.py +++ b/src/pydicom/jsonrep.py @@ -143,79 +143,6 @@ class JsonDataElementConverter: else: self.bulk_data_element_handler = cast(BulkDataHandlerType, handler) - def get_element...
["tests/test_json.py::TestPersonName::test_json_pn_from_file", "tests/test_json.py::TestPersonName::test_pn_components_from_json", "tests/test_json.py::TestPersonName::test_dataelem_from_json", "tests/test_json.py::TestAT::test_from_json", "tests/test_json.py::TestAT::test_invalid_value_in_json", "tests/test_json.py::T...
["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
75
18
971
0
0.6
1
0.75
1
0.411833
81.5105
4,356
swe_smith::train::5195
swe_smith
train
5,195
agronholm__exceptiongroup.0b4f4937.lm_rewrite__0mv3i7ga
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
# ExceptionGroup.subgroup() and .split() methods fail with tuple of exception types ## Description I've found an issue with the `subgroup()` and `split()` methods of `ExceptionGroup` when passing a tuple of exception types. The methods are supposed to accept a tuple of exception types as a valid argument, but they're...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..fa7af7d 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -24,23 +24,26 @@ def check_direct_subclass( return False -def get_condition_filter( - condition: type[_BaseExcep...
["tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_split__bad_arg_type"]
["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
37
1
1,731
0
0.6
1
0.75
1
0.411833
81.5105
4,357
swe_smith::train::23376
swe_smith
train
23,376
pyparsing__pyparsing.533adf47.combine_file__8ryl6tk3
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
# Railroad diagram generation is broken and produces reversed/incorrect output I've been trying to use the railroad diagram generation feature and noticed it's completely broken in the latest version. **To Reproduce** Here's a simple example that demonstrates the issue: ```python from pyparsing import Word, alphas ...
diff --git a/pyparsing/diagram/__init__.py b/pyparsing/diagram/__init__.py index 7926f2c..2b11220 100644 --- a/pyparsing/diagram/__init__.py +++ b/pyparsing/diagram/__init__.py @@ -58,8 +58,8 @@ template = Template(jinja2_template_source) def _collapse_verbose_regex(regex_str: str) -> str: collapsed = pyparsing...
["tests/test_diagram.py::TestRailroadDiagrams::test_complete_combine_element", "tests/test_diagram.py::TestRailroadDiagrams::test_create_diagram", "tests/test_diagram.py::TestRailroadDiagrams::test_create_diagram_embed", "tests/test_diagram.py::TestRailroadDiagrams::test_create_diagram_for_oneormore_with_stopon", "test...
["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse...
jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47
true
null
1
60
13
1,270
0
0.6
1
0.75
1
0.411667
81.51
4,358
swe_smith::train::41971
swe_smith
train
41,971
scanny__python-pptx.278b47b1.func_pm_class_rm_funcs__6dz164xu
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Missing methods in _Relationships class after refactoring #### Description After a recent refactoring, several methods were accidentally removed from the `_Relationships` class in `src/pptx/opc/package.py`. This breaks functionality for managing external relationships and finding parts by relationship type. #### Ste...
diff --git a/src/pptx/opc/package.py b/src/pptx/opc/package.py index 713759c..b1a32ef 100644 --- a/src/pptx/opc/package.py +++ b/src/pptx/opc/package.py @@ -534,19 +534,6 @@ class _Relationships(Mapping[str, "_Relationship"]): self._add_relationship(reltype, target_part) if existing_rId is None else existi...
["tests/opc/test_package.py::Describe_RelatableMixin::it_can_find_a_part_related_by_reltype", "tests/opc/test_package.py::Describe_RelatableMixin::and_it_can_establish_a_relationship_to_an_external_link", "tests/opc/test_package.py::DescribeOpcPackage::it_can_drop_a_relationship", "tests/opc/test_package.py::DescribeXm...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
37
12
1,730
0
0.6
1
0.75
1
0.411667
81.51
4,359
swe_smith::train::12668
swe_smith
train
12,668
lepture__mistune.bf54ef67.lm_rewrite__e0bjax5b
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
# Footnotes plugin fails to handle indented content properly ## Description I've discovered an issue with the footnotes plugin in mistune. When using footnotes with indented content, the plugin fails to properly parse and render the content. ## Steps to Reproduce Create a markdown document with footnotes that have ...
diff --git a/src/mistune/plugins/footnotes.py b/src/mistune/plugins/footnotes.py index 96fe8df..c47c8ee 100644 --- a/src/mistune/plugins/footnotes.py +++ b/src/mistune/plugins/footnotes.py @@ -62,36 +62,34 @@ def parse_ref_footnote( return m.end() -def parse_footnote_item( - block: "BlockParser", key: str, ...
["tests/test_plugins.py::TestPlugin1_footnotes::test_footnotes_002", "tests/test_plugins.py::TestPlugin1_footnotes::test_footnotes_003", "tests/test_plugins.py::TestPlugin2_footnotes::test_footnotes_002", "tests/test_plugins.py::TestPlugin2_footnotes::test_footnotes_003"]
["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx...
jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67
true
null
1
50
4
1,468
0
0.6
1
0.75
1
0.411333
81.509
4,360
swe_smith::train::45543
swe_smith
train
45,543
alanjds__drf-nested-routers.6144169d.combine_file__vcs0jw1p
swesmith/alanjds__drf-nested-routers.6144169d
alanjds/drf-nested-routers
python
null
NestedRouter URL generation broken after recent changes #### Description The nested router is generating malformed URLs and throwing unexpected exceptions. When trying to create nested routes, the URL patterns are not being constructed correctly, and the router is failing to inherit settings properly from parent rout...
diff --git a/rest_framework_nested/routers.py b/rest_framework_nested/routers.py index ae826e6..3ec948a 100644 --- a/rest_framework_nested/routers.py +++ b/rest_framework_nested/routers.py @@ -57,68 +57,49 @@ class NestedMixin: ) -> None: self.parent_router = parent_router self.parent_prefix = pa...
["tests/serializers/test_serializers.py::TestSerializers::test_custom", "tests/serializers/test_serializers.py::TestSerializers::test_default", "tests/serializers/test_serializers.py::TestSerializers::test_multi_level", "tests/serializers/test_serializers.py::TestSerializers::test_multi_level_parent_ref", "tests/serial...
["tests/serializers/test_serializers.py::TestSerializers::test_no_children", "tests/test_dynamic_routers.py::TestNestedSimpleRouter::test_dynamic_routes", "tests/test_viewsets.py::TestNestedSimpleRouter::test_get_queryset_for_children_resource"]
jyangballin/swesmith.x86_64.alanjds_1776_drf-nested-routers.6144169d
true
null
1
51
20
1,446
0
0.6
1
0.75
1
0.411
81.508
4,361
swe_smith::train::33121
swe_smith
train
33,121
django-money__django-money.835c1ab8.combine_module__optskkux
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
MoneyField validation broken after recent changes #### Description After some recent changes, MoneyField validation is completely broken. When trying to create model instances with Money values or validate forms with Money data, various errors are occurring. #### Steps/Code to Reproduce ```python from djmoney impor...
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index dc5f6ad..b780b47 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -105,25 +105,34 @@ class MoneyFieldProxy: data[self.field.name] = self._money_from_obj(obj) return data[self.field.name] - def __set_...
["tests/test_form.py::TestValidation::test_valid[value0]", "tests/test_form.py::TestValidation::test_valid[value1]", "tests/test_form.py::TestValidation::test_valid[value2]", "tests/test_form.py::TestValidation::test_valid[value3]", "tests/test_models.py::TestVanillaMoneyField::test_raises_type_error_setting_currency_t...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
2
63
19
1,206
0
0.6
1
0.75
1
0.411
81.508
4,362
swe_smith::train::27596
swe_smith
train
27,596
arrow-py__arrow.1d70d009.func_basic__l6ufw3gv
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
span_range method returns generator that doesn't support slicing #### Description The `span_range` method is trying to use slice notation (`[::-1]`) on a generator object, which causes a `TypeError`. Generators don't support indexing or slicing operations. #### Steps/Code to Reproduce ```python import arrow from da...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..48ad74f 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -639,76 +639,25 @@ class Arrow: bounds: _BOUNDS = "[)", exact: bool = False, ) -> Iterable[Tuple["Arrow", "Arrow"]]: - """Returns an iterator of tuples, each :class:`Arro...
["tests/test_arrow.py::TestArrowSpanRange::test_year", "tests/test_arrow.py::TestArrowSpanRange::test_quarter", "tests/test_arrow.py::TestArrowSpanRange::test_month", "tests/test_arrow.py::TestArrowSpanRange::test_week", "tests/test_arrow.py::TestArrowSpanRange::test_day", "tests/test_arrow.py::TestArrowSpanRange::test...
["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
69
21
1,086
0
0.6
1
0.75
1
0.411
81.508
4,363
swe_smith::train::18544
swe_smith
train
18,544
HIPS__autograd.ac044f0d.lm_rewrite__m9tak7zz
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Bug Report: Incorrect Gradient Calculation for Max/Min Functions **Bug Summary** The recent changes to the gradient calculation for `np.max` and `np.min` functions have introduced unexpected behavior. The gradient is not being computed correctly, leading to errors in functions that rely on these calculations. **...
diff --git a/autograd/numpy/numpy_jvps.py b/autograd/numpy/numpy_jvps.py index 4dba485..579bf12 100644 --- a/autograd/numpy/numpy_jvps.py +++ b/autograd/numpy/numpy_jvps.py @@ -200,19 +200,41 @@ defjvp(anp.std, forward_grad_np_std) def fwd_grad_chooser(g, ans, x, axis=None, keepdims=False): - if anp.isscalar(x)...
["tests/test_numpy.py::test_max", "tests/test_numpy.py::test_max_axis", "tests/test_numpy.py::test_max_axis_keepdims", "tests/test_numpy.py::test_min", "tests/test_numpy.py::test_min_axis", "tests/test_numpy.py::test_min_axis_keepdims", "tests/test_numpy.py::test_max_equal_values", "tests/test_numpy.py::test_max_equal_...
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
48
11
1,503
0
0.6
1
0.75
1
0.4105
81.5065
4,364
swe_smith::train::45814
swe_smith
train
45,814
conan-io__conan.86f29e13.func_pm_remove_cond__i9t0gz6m
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
# Executable field in cpp_info not working correctly ```python In [1]: from conan.internal.model.cpp_info import CppInfo, PackageType In [2]: cpp_info = CppInfo() In [3]: cpp_info.set_property("exe", "myapp") In [4]: cpp_info.type = PackageType.APP In [5]: cpp_info.deduce_locations("mypackage") -----------------------...
diff --git a/conan/internal/model/cpp_info.py b/conan/internal/model/cpp_info.py index d33d6c0..421f49c 100644 --- a/conan/internal/model/cpp_info.py +++ b/conan/internal/model/cpp_info.py @@ -598,17 +598,6 @@ class _Component: def deduce_locations(self, conanfile, component_name=""): name = f'{conanfile}...
["test/unittests/model/build_info/test_deduce_locations.py::test_windows_several_shared_link_locations[lib_info0]", "test/unittests/model/build_info/test_deduce_locations.py::test_windows_several_shared_link_locations[lib_info1]"]
["test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_naming_complete", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanfile_new_print", "test/unittests/model/conanfile_test.py::ConanFileTest::test_conanf...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
22
2
2,020
0
0.6
1
0.75
1
0.41
81.505
4,365
swe_smith::train::34134
swe_smith
train
34,134
iterative__dvc.1d6ea681.combine_module__g0bfaibs
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
StageLoader broken after refactoring - UnboundLocalError on variable access #### Description After some recent changes to the stage loading code, multiple stage-related operations are failing with `UnboundLocalError` exceptions. The errors occur when trying to access variables that haven't been properly defined in th...
diff --git a/dvc/stage/cache.py b/dvc/stage/cache.py index f97b471..cb38db8 100644 --- a/dvc/stage/cache.py +++ b/dvc/stage/cache.py @@ -75,12 +75,8 @@ class StageCache: return os.path.join(self._get_cache_dir(key), value) def _load_cache(self, key, value): - from voluptuous import Invalid ...
["tests/func/test_stage.py::test_default_wdir_ignored_in_checksum", "tests/func/test_stage.py::test_stage_strings_representation", "tests/func/test_stage.py::test_stage_remove_pipeline_stage", "tests/unit/stage/test_cache.py::test_stage_cache", "tests/unit/stage/test_cache.py::test_stage_cache_params", "tests/unit/stag...
["tests/func/test_stage.py::test_cmd_obj", "tests/func/test_stage.py::test_no_cmd", "tests/func/test_stage.py::test_object", "tests/func/test_stage.py::test_none", "tests/func/test_stage.py::test_empty_list", "tests/func/test_stage.py::test_list", "tests/func/test_stage.py::test_reload", "tests/func/test_stage.py::test...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
2
50
17
1,460
0
0.6
1
0.75
1
0.41
81.505
4,366
swe_smith::train::34620
swe_smith
train
34,620
mozillazg__python-pinyin.e42dede5.combine_module__cbtf4sk7
swesmith/mozillazg__python-pinyin.e42dede5
mozillazg/python-pinyin
python
null
# Neutral tone with 5 not working correctly and tone sandhi for "一" character broken **Describe the bug** I've found two issues with the latest version of pypinyin: 1. The neutral tone with 5 feature is not working correctly. When using `neutral_tone_with_five=True`, the pinyin output doesn't include the "5" tone mar...
diff --git a/pypinyin/contrib/neutral_tone.py b/pypinyin/contrib/neutral_tone.py index 3f0864a..ce03d86 100644 --- a/pypinyin/contrib/neutral_tone.py +++ b/pypinyin/contrib/neutral_tone.py @@ -51,23 +51,23 @@ class NeutralToneWith5Mixin(object): pre_data = super(NeutralToneWith5Mixin, self).post_convert_style(...
["pypinyin/core.py::pypinyin.core.lazy_pinyin", "pypinyin/core.py::pypinyin.core.pinyin", "tests/contrib/test_neutral_tone.py::test_neutral_tone_with_5", "tests/contrib/test_neutral_tone.py::test_neutral_tone_with_5_many_cases[\\u7537\\u5b69\\u513f-Style.TONE2-expected_old4-expected_new4]", "tests/contrib/test_neutral_...
["pypinyin/core.py::pypinyin.core.slug", "pypinyin/style/_tone_convert.py::pypinyin.style._tone_convert.to_finals", "pypinyin/style/_tone_convert.py::pypinyin.style._tone_convert.to_finals_tone", "pypinyin/style/_tone_convert.py::pypinyin.style._tone_convert.to_finals_tone2", "pypinyin/style/_tone_convert.py::pypinyin....
jyangballin/swesmith.x86_64.mozillazg_1776_python-pinyin.e42dede5
true
null
2
25
26
1,959
0
0.6
1
0.75
1
0.409833
81.5045
4,367
swe_smith::train::14489
swe_smith
train
14,489
hukkin__tomli.443a0c1b.combine_file__3dpezncq
swesmith/hukkin__tomli.443a0c1b
hukkin/tomli
python
null
# TOML parser fails to parse valid TOML files after recent changes Hi everyone, I've discovered a serious issue with the TOML parser in the latest version. After some recent changes, the parser is failing to correctly parse valid TOML files that were working fine before. ## Description I was working on a project th...
diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index 16c76cd..2abec66 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -212,7 +212,7 @@ class Flags: self._pending_flags: set[tuple[Key, int]] = set() def add_pending(self, key: Key, flag: int) -> None: - self._pending_flags...
["tests/test_data.py::TestData::test_invalid", "tests/test_data.py::TestData::test_valid", "tests/test_error.py::TestError::test_invalid_char_quotes", "tests/test_misc.py::TestMiscellaneous::test_load"]
["tests/test_error.py::TestError::test_deprecated_tomldecodeerror", "tests/test_error.py::TestError::test_invalid_parse_float", "tests/test_error.py::TestError::test_line_and_col", "tests/test_error.py::TestError::test_missing_value", "tests/test_error.py::TestError::test_module_name", "tests/test_error.py::TestError::...
jyangballin/swesmith.x86_64.hukkin_1776_tomli.443a0c1b
true
null
1
28
4
1,896
0
0.6
1
0.75
1
0.409333
81.503
4,368
swe_smith::train::31402
swe_smith
train
31,402
benoitc__gunicorn.bacbf8aa.combine_file__tqa45ae9
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
# StatsD instrumentation reports incorrect metrics and breaks logging ### Description I've discovered several issues with the StatsD instrumentation in Gunicorn that cause incorrect metrics to be reported and break logging functionality. ### How to Reproduce ```python from gunicorn.instrument.statsd import Statsd f...
diff --git a/gunicorn/instrument/statsd.py b/gunicorn/instrument/statsd.py index 7bc4e6f..fdfd521 100644 --- a/gunicorn/instrument/statsd.py +++ b/gunicorn/instrument/statsd.py @@ -41,8 +41,8 @@ class Statsd(Logger): # Log errors and warnings def critical(self, msg, *args, **kwargs): - Logger.critica...
["tests/test_statsd.py::test_instrument"]
["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
15
1
2,155
0
0.6
1
0.75
1
0.409167
81.5025
4,369
swe_smith::train::61
swe_smith
train
61
oauthlib__oauthlib.1fd52536.combine_file__cv13hcs4
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth2Error class has incorrect error handling and response formatting Description I've discovered several issues with the OAuth2Error class in oauthlib that cause incorrect error responses to be generated. When using the OAuth2 authorization flow, error responses are not being properly formatted according to the RF...
diff --git a/oauthlib/oauth2/rfc6749/errors.py b/oauthlib/oauth2/rfc6749/errors.py index 3b41574..a98aedb 100644 --- a/oauthlib/oauth2/rfc6749/errors.py +++ b/oauthlib/oauth2/rfc6749/errors.py @@ -40,28 +40,28 @@ class OAuth2Error(Exception): :type request: oauthlib.common.Request """ if desc...
["tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_error_catching", "tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_unavailability", "tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_wrapper", "tests/oauth2/rfc6749/endpoints/test_clie...
["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
49
67
1,474
0
0.6
1
0.75
1
0.409
81.502
4,370
swe_smith::train::32795
swe_smith
train
32,795
pydantic__pydantic.acb0f10f.lm_rewrite__jrvrvdel
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
rebuild_dataclass fails with TypeError when using types_namespace parameter #### Description When calling `rebuild_dataclass` with a `_types_namespace` parameter, the function fails with a `TypeError` due to incorrect parameter passing to the underlying `complete_dataclass` function. #### Steps/Code to Reproduce ``...
diff --git a/pydantic/dataclasses.py b/pydantic/dataclasses.py index 5111bc3..90a971b 100644 --- a/pydantic/dataclasses.py +++ b/pydantic/dataclasses.py @@ -298,14 +298,9 @@ if sys.version_info < (3, 11): dataclasses.InitVar.__call__ = _call_initvar -def rebuild_dataclass( - cls: type[PydanticDataclass], - ...
["tests/benchmarks/test_model_schema_generation.py::test_construct_dataclass_schema", "tests/test_config.py::test_config_dataclass_defer_build[True]", "tests/test_config.py::test_dataclass_defer_build_override_on_rebuild_dataclass", "tests/test_dataclasses.py::test_cyclic_reference_dataclass", "tests/test_dataclasses.p...
["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
63
19
1,194
0
0.6
1
0.75
1
0.409
81.502
4,371
swe_smith::train::3654
swe_smith
train
3,654
pygments__pygments.27649ebb.combine_module__uo2ns8cq
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
# TNT Lexer whitespace tokenization is broken ## Description The TNT lexer has a bug in the `whitespace` method that causes it to incorrectly tokenize whitespace characters. The method is supposed to tokenize whitespace, but it's currently doing the opposite - tokenizing non-whitespace characters. ## Steps to reprod...
diff --git a/pygments/lexers/int_fiction.py b/pygments/lexers/int_fiction.py index a7bc667..ab341ff 100644 --- a/pygments/lexers/int_fiction.py +++ b/pygments/lexers/int_fiction.py @@ -498,37 +498,6 @@ class Inform6Lexer(RegexLexer): ] } - def get_tokens_unprocessed(self, text): - # 'in' is ei...
["tests/test_tnt.py::test_error_till_line_end[asdf]", "tests/test_tnt.py::test_error_till_line_end[fdsa\\nasdf]", "tests/test_basic_api.py::test_random_input[TNTLexer]", "tests/test_basic_api.py::test_lexer_options[TNTLexer]", "tests/examplefiles/inform6/inform6_example.inf::", "tests/examplefiles/tnt/example.tnt::"]
["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
2
44
6
1,574
0
0.6
1
0.75
1
0.409
81.502
4,372
swe_smith::train::35087
swe_smith
train
35,087
django__daphne.32ac73e1.combine_file__5ylgk8zv
swesmith/django__daphne.32ac73e1
django/daphne
python
null
# WebSocket Protocol Handling Issues I've found several issues with the WebSocket protocol implementation in Daphne. The issues appear to be related to message handling, state checking, and binary/text frame processing. ## Issue Description When trying to use WebSockets with Daphne, several operations fail: 1. Bina...
diff --git a/daphne/ws_protocol.py b/daphne/ws_protocol.py index b1e29c3..06c9969 100755 --- a/daphne/ws_protocol.py +++ b/daphne/ws_protocol.py @@ -186,25 +186,25 @@ class WebSocketProtocol(WebSocketServerProtocol): def handle_reply(self, message): if "type" not in message: raise ValueError(...
["tests/test_websocket.py::TestWebsocket::test_binary_frames", "tests/test_websocket.py::TestWebsocket::test_http_timeout", "tests/test_websocket.py::TestWebsocket::test_reject", "tests/test_websocket.py::TestWebsocket::test_text_frames"]
["tests/test_checks.py::test_check_daphne_installed", "tests/test_cli.py::TestEndpointDescriptions::testBasics", "tests/test_cli.py::TestEndpointDescriptions::testFileDescriptorBinding", "tests/test_cli.py::TestEndpointDescriptions::testMultipleEnpoints", "tests/test_cli.py::TestEndpointDescriptions::testTcpPortBinding...
jyangballin/swesmith.x86_64.django_1776_daphne.32ac73e1
true
null
1
30
4
1,852
0
0.6
1
0.75
1
0.408667
81.501
4,373
swe_smith::train::45410
swe_smith
train
45,410
dask__dask.5f61e423.lm_rewrite__ctxtnf5k
swesmith/dask__dask.5f61e423
dask/dask
python
null
ImportError: cannot import name 'DataFrameGroupBy' from 'dask.dataframe.dask_expr._groupby' #### Description An `ImportError` is raised when attempting to use the `groupby` method on a DataFrame. The error indicates that the `DataFrameGroupBy` class cannot be imported from the `dask.dataframe.dask_expr._groupby` modul...
diff --git a/dask/dataframe/dask_expr/_collection.py b/dask/dataframe/dask_expr/_collection.py index 7aa07d4..e324442 100644 --- a/dask/dataframe/dask_expr/_collection.py +++ b/dask/dataframe/dask_expr/_collection.py @@ -3017,26 +3017,67 @@ class DataFrame(FrameBase): ) @derived_from(pd.DataFrame) - ...
["dask/dataframe/dask_expr/tests/test_collection.py::test_drop_duplicates_meta", "dask/dataframe/dask_expr/tests/test_collection.py::test_drop_duplicates_groupby"]
["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
75
2
951
0
0.6
1
0.75
1
0.4085
81.5005
4,374
swe_smith::train::52717
swe_smith
train
52,717
pydicom__pydicom.7d361b3d.lm_rewrite__pjg7dg76
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
UID Generation Issue with Invalid Prefix Handling I've encountered an issue with the `generate_uid` function when dealing with certain invalid prefixes. The function is supposed to raise a `ValueError` for invalid UID prefixes, but it seems to be inconsistent in its behavior. Here's a minimal example to reproduce the...
diff --git a/src/pydicom/uid.py b/src/pydicom/uid.py index 173a77b..8119520 100644 --- a/src/pydicom/uid.py +++ b/src/pydicom/uid.py @@ -508,10 +508,8 @@ def register_transfer_syntax( _MAX_PREFIX_LENGTH = 54 -def generate_uid( - prefix: str | None = PYDICOM_ROOT_UID, - entropy_srcs: list[str] | None = None, ...
["tests/test_uid.py::TestGenerateUID::test_generate_uid"]
["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
56
1
1,329
0
0.6
1
0.75
1
0.408167
81.4995
4,375
swe_smith::train::34478
swe_smith
train
34,478
iterative__dvc.1d6ea681.pr_9157
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
# Data index not properly closed when index_db_dir is None ## Description I'm encountering an issue with the data index in DVC. When trying to use the data index functionality in a repository where `index_db_dir` is not set, I get an `AttributeError`. ## Steps to reproduce 1. Create a DVC repository without setting...
diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index 2b89626..9532db6 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -358,14 +358,14 @@ class Repo: self._reset() @property - def data_index(self) -> "DataIndex": + def data_index(self) -> Optional["DataIndex"]: fr...
["tests/unit/repo/experiments/test_executor_status.py::test_celery_queue_success_status", "tests/unit/repo/experiments/test_executor_status.py::test_workspace_executor_success_status[workspace_queue]", "tests/unit/repo/experiments/test_executor_status.py::test_workspace_executor_success_status[tempdir_queue]", "tests/u...
["tests/func/test_repo.py::test_open_bare", "tests/func/test_repo.py::test_destroy", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown_no_tasks", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown_with_kill", "tests/unit/rep...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
2
63
8
1,188
0
0.6
1
0.75
1
0.408
81.499
4,376
swe_smith::train::45928
swe_smith
train
45,928
conan-io__conan.86f29e13.pr_11294
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
# CMakeDeps not checking for CMAKE_BUILD_TYPE and causing issues with transitive dependencies ## Description After recent changes, CMakeDeps is no longer checking if the CMAKE_BUILD_TYPE is defined when using a single-config generator. This is causing several issues, particularly with transitive dependencies. ## Step...
diff --git a/conan/tools/cmake/cmakedeps/templates/config.py b/conan/tools/cmake/cmakedeps/templates/config.py index f7e9fe1..1d20b47 100644 --- a/conan/tools/cmake/cmakedeps/templates/config.py +++ b/conan/tools/cmake/cmakedeps/templates/config.py @@ -49,46 +49,44 @@ class ConfigTemplate(CMakeDepsFileTemplate): ...
["test/functional/toolchains/cmake/test_cmake_toolchain.py::test_cmaketoolchain_no_warnings", "test/functional/toolchains/cmake/cmakedeps/test_build_context_transitive_build.py::test_error_cmakedeps_transitive_build_requires", "test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_system_dep", "test/functi...
["test/functional/toolchains/cmake/test_cmake_toolchain.py::test_cmake_toolchain_user_toolchain", "test/functional/toolchains/cmake/test_cmake_toolchain.py::test_cmake_toolchain_custom_toolchain", "test/functional/toolchains/cmake/test_cmake_toolchain.py::test_cmake_toolchain_user_toolchain_from_dep", "test/functional/...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
41
5
1,627
0
0.6
1
0.75
1
0.407833
81.4985
4,377
swe_smith::train::29657
swe_smith
train
29,657
cookiecutter__cookiecutter.b4451231.func_pm_remove_cond__s38a2g7u
swesmith/cookiecutter__cookiecutter.b4451231
cookiecutter/cookiecutter
python
null
# Broken ZIP file handling in cookiecutter ## Description There are several issues with the ZIP file handling in cookiecutter that prevent proper usage of ZIP repositories: 1. When using a URL to a ZIP file, the download functionality is broken. The code doesn't actually download the ZIP file from remote URLs. 2. P...
diff --git a/cookiecutter/zipfile.py b/cookiecutter/zipfile.py index fdd9645..71f5368 100644 --- a/cookiecutter/zipfile.py +++ b/cookiecutter/zipfile.py @@ -48,14 +48,6 @@ def unzip( download = prompt_and_delete(zip_path, no_input=no_input) else: download = True - - if download...
["tests/zipfile/test_unzip.py::test_unzip_protected_local_file_bad_environment_password", "tests/zipfile/test_unzip.py::test_unzip_protected_local_file_user_password_with_noinput", "tests/zipfile/test_unzip.py::test_unzip_protected_local_file_user_bad_password", "tests/zipfile/test_unzip.py::test_empty_zip_file", "test...
["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
40
8
1,647
0
0.6
1
0.75
1
0.407833
81.4985
4,378
swe_smith::train::1715
swe_smith
train
1,715
agronholm__typeguard.b6a7e438.combine_module__j646fioi
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking fails silently when typecheck_fail_callback is not configured #### Description When using typeguard's type checking functionality, type violations are not being properly handled when no custom `typecheck_fail_callback` is configured. Instead of raising `TypeCheckError` exceptions as expected, the type c...
diff --git a/src/typeguard/_functions.py b/src/typeguard/_functions.py index ca21c14..8b7b112 100644 --- a/src/typeguard/_functions.py +++ b/src/typeguard/_functions.py @@ -128,20 +128,20 @@ def check_argument_types( exc = TypeCheckError( f"{func_name}() was declared never to be called but...
["tests/test_importhook.py::test_blanket_import", "tests/test_instrumentation.py::test_type_checked_func_error[typechecked]", "tests/test_instrumentation.py::test_type_checked_method[typechecked]", "tests/test_instrumentation.py::test_type_checked_classmethod[typechecked]", "tests/test_instrumentation.py::test_type_che...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
2
48
56
1,485
0
0.6
1
0.75
1
0.4075
81.4975
4,379
swe_smith::train::49712
swe_smith
train
49,712
facebookresearch__fvcore.a491d5b9.combine_file__e6bfzxwi
swesmith/facebookresearch__fvcore.a491d5b9
facebookresearch/fvcore
python
null
# CfgNode merge_from_other_cfg and __setattr__ methods are broken I've discovered some issues with the `CfgNode` class in the config module. There are multiple problems that prevent basic functionality from working correctly. ## Issue 1: merge_from_other_cfg assertion is inverted When trying to merge configurations,...
diff --git a/fvcore/common/config.py b/fvcore/common/config.py index cef5ba9..ae209a3 100644 --- a/fvcore/common/config.py +++ b/fvcore/common/config.py @@ -129,7 +129,7 @@ class CfgNode(_CfgNode): cfg_other (CfgNode): configs to merge from. """ assert ( - BASE_KEY not in cfg_o...
["tests/test_common.py::TestCfgNode::test_merge_from_file", "tests/test_common.py::TestCfgNode::test_merge_from_list", "tests/test_common.py::TestCfgNode::test_setattr"]
["io_tests/test_file_io.py::TestNativeIO::test_bad_args", "io_tests/test_file_io.py::TestNativeIO::test_copy", "io_tests/test_file_io.py::TestNativeIO::test_exists", "io_tests/test_file_io.py::TestNativeIO::test_get_local_path", "io_tests/test_file_io.py::TestNativeIO::test_isdir", "io_tests/test_file_io.py::TestNative...
jyangballin/swesmith.x86_64.facebookresearch_1776_fvcore.a491d5b9
true
null
1
6
3
2,324
0
0.6
1
0.75
1
0.407333
81.497
4,380
swe_smith::train::2002
swe_smith
train
2,002
pdfminer__pdfminer.six.1a8bd2f7.combine_file__hhvxkwe1
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDF parsing fails with RecursionError on various documents #### Description When trying to parse certain PDF documents, pdfminer encounters a RecursionError during the xref reading process. This affects multiple PDF files and causes the parser to fail completely. #### Steps/Code to Reproduce ```python from pdfminer...
diff --git a/pdfminer/pdfdocument.py b/pdfminer/pdfdocument.py index 1c06335..20d6e21 100644 --- a/pdfminer/pdfdocument.py +++ b/pdfminer/pdfdocument.py @@ -194,7 +194,9 @@ class PDFXRef(PDFBaseXRef): return self.offsets.keys() def get_pos(self, objid: int) -> Tuple[Optional[int], int, int]: - re...
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t...
["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_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
66
60
1,123
0
0.6
1
0.75
1
0.407167
81.4965
4,381
swe_smith::train::45643
swe_smith
train
45,643
conan-io__conan.86f29e13.combine_module__iqv5ifjb
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### Description It seems there's an issue with the `remove_revision` method in the `RevisionList` class. When attempting to remove a revision, the method does not behave as expected, leading to incorrect handling of the revision list. This might cause unexpected results when managing revisions, especially when trying ...
diff --git a/conans/server/revision_list.py b/conans/server/revision_list.py index dda0cd9..c0f449c 100644 --- a/conans/server/revision_list.py +++ b/conans/server/revision_list.py @@ -52,11 +52,10 @@ class RevisionList(object): return list(reversed(self._data)) def remove_revision(self, revision_id): -...
["test/unittests/server/revision_list_test.py::RevisionListTest::test_remove_latest", "test/unittests/server/revision_list_test.py::RevisionListTest::test_remove_non_latest", "test/unittests/server/service/authorizer_test.py::AuthorizerTest::test_authenticated_user_wildcard_permissions", "test/unittests/server/service/...
["test/unittests/server/revision_list_test.py::RevisionListTest::test_compatibility_with_timestamps", "test/unittests/server/service/authorizer_test.py::AuthorizerTest::test_invalid_rule"]
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
17
8
2,103
0
0.6
1
0.75
1
0.407167
81.4965
4,382
swe_smith::train::27867
swe_smith
train
27,867
jsvine__pdfplumber.02ff4313.func_pm_ctrl_shuffle__11erfx0f
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
words_to_edges_v function broken after code reorganization #### Description The `words_to_edges_v` function in `pdfplumber/table.py` appears to have been scrambled during a recent code reorganization. Variables are being used before they're defined, causing `UnboundLocalError` exceptions when trying to extract tables...
diff --git a/pdfplumber/table.py b/pdfplumber/table.py index 0ba4445..968c104 100644 --- a/pdfplumber/table.py +++ b/pdfplumber/table.py @@ -144,43 +144,15 @@ def words_to_edges_h( def words_to_edges_v( words: T_obj_list, word_threshold: int = DEFAULT_MIN_WORDS_VERTICAL ) -> T_obj_list: - """ - Find (imagi...
["tests/test_nics_report.py::Test::test_explicit_horizontal", "tests/test_nics_report.py::Test::test_text_only_strategy", "tests/test_table.py::Test::test_text_tolerance", "tests/test_table.py::Test::test_text_without_words"]
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
61
4
1,222
0
0.6
1
0.75
1
0.407
81.496
4,383
swe_smith::train::2457
swe_smith
train
2,457
pdfminer__pdfminer.six.1a8bd2f7.func_pm_ctrl_shuffle__ix14w7db
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
SASLprep function returns input string unchanged #### Description The `saslprep` function in `_saslprep.py` is not properly processing input strings. It appears to return the input data unchanged without applying the required SASLprep transformations. #### Steps/Code to Reproduce ```python from pdfminer._saslprep i...
diff --git a/pdfminer/_saslprep.py b/pdfminer/_saslprep.py index 18e2b73..cc98796 100644 --- a/pdfminer/_saslprep.py +++ b/pdfminer/_saslprep.py @@ -44,6 +44,20 @@ _PROHIBITED: Tuple[Callable[[str], bool], ...] = ( def saslprep(data: str, prohibit_unassigned_code_points: bool = True) -> str: + if in_table_d1(da...
["tests/test_tools_pdf2txt.py::TestPdf2Txt::test_encryption_aes256_r6_user", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_encryption_aes256_r6_owner"]
["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
62
2
1,201
0
0.6
1
0.75
1
0.406833
81.4955
4,384
swe_smith::train::36139
swe_smith
train
36,139
gruns__icecream.f76fef56.combine_file__g2xikt5k
swesmith/gruns__icecream.f76fef56
gruns/icecream
python
null
# IceCream debugger not working - UnboundLocalError when using ic() ## Description After making some changes to the codebase, the IceCream debugger is completely broken. When trying to use the `ic()` function, it raises an `UnboundLocalError` and doesn't output any debug information. ## Steps to reproduce 1. Import...
diff --git a/icecream/icecream.py b/icecream/icecream.py index 5350d8e..baa8e56 100644 --- a/icecream/icecream.py +++ b/icecream/icecream.py @@ -115,13 +115,35 @@ def callOrValue(obj): class Source(executing.Source): def get_text_with_indentation(self, node): - result = self.asttokens().get_text(node) - ...
["tests/test_icecream.py::TestIceCream::testArgToStringFunction", "tests/test_icecream.py::TestIceCream::testAsArgument", "tests/test_icecream.py::TestIceCream::testCallSurroundedByExpressions", "tests/test_icecream.py::TestIceCream::testColoring", "tests/test_icecream.py::TestIceCream::testComments", "tests/test_icecr...
["tests/test_icecream.py::TestIceCream::testConfigureOutputWithNoParameters", "tests/test_icecream.py::TestIceCream::testMetadata", "tests/test_install.py::TestIceCreamInstall::testUninstall"]
jyangballin/swesmith.x86_64.gruns_1776_icecream.f76fef56
true
null
1
48
34
1,480
0
0.6
1
0.75
1
0.406667
81.495
4,385
swe_smith::train::48995
swe_smith
train
48,995
facebookresearch__hydra.0f03eb60.lm_rewrite__k5hiu3cv
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
### Issue: Instantiation Fails with New Configuration Handling #### What happened? After applying recent changes, instantiating certain configurations results in unexpected behavior. Specifically, when attempting to instantiate configurations using the `instantiate2` method, the process fails with a `TypeError`. This...
diff --git a/hydra/_internal/instantiate/_instantiate2.py b/hydra/_internal/instantiate/_instantiate2.py index fe7da9f..8e671bb 100644 --- a/hydra/_internal/instantiate/_instantiate2.py +++ b/hydra/_internal/instantiate/_instantiate2.py @@ -105,25 +105,24 @@ def _convert_target_to_string(t: Any) -> Any: def _prepa...
["tests/instantiate/test_instantiate.py::test_instantiate_adam[instantiate2-dict-src0]", "tests/instantiate/test_instantiate.py::test_instantiate_adam[instantiate2-dict_config-src0]", "tests/instantiate/test_instantiate.py::test_regression_1483[instantiate2-True]", "tests/instantiate/test_instantiate.py::test_regressio...
["tests/instantiate/test_helpers.py::test_locate[int]", "tests/instantiate/test_helpers.py::test_locate[builtins_explicit]", "tests/instantiate/test_helpers.py::test_locate[method_of_builtin]", "tests/instantiate/test_helpers.py::test_locate[builtin_attribute_error]", "tests/instantiate/test_helpers.py::test_locate[top...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
37
14
1,700
0
0.6
1
0.75
1
0.406667
81.495
4,386
swe_smith::train::4578
swe_smith
train
4,578
pygments__pygments.27649ebb.lm_rewrite__k5r1nvcr
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
### AttributeError in Various Lexers It seems that after the recent changes, several lexers are encountering an `AttributeError`. This issue is affecting multiple lexers including `ScamlLexer`, `SlimLexer`, `PugLexer`, `SassLexer`, and `HamlLexer`. #### Steps to Reproduce: 1. Attempt to use any of the affected lexer...
diff --git a/pygments/lexers/css.py b/pygments/lexers/css.py index 37c6cce..b005e72 100644 --- a/pygments/lexers/css.py +++ b/pygments/lexers/css.py @@ -413,20 +413,70 @@ common_sass_tokens = { def _indentation(lexer, match, ctx): + """ + Parse the indentation at the beginning of a line and determine what to...
["tests/test_basic_api.py::test_random_input[PugLexer]", "tests/test_basic_api.py::test_lexer_options[PugLexer]", "tests/test_basic_api.py::test_random_input[ScamlLexer]", "tests/test_basic_api.py::test_lexer_options[HamlLexer]", "tests/test_basic_api.py::test_random_input[SlimLexer]", "tests/test_basic_api.py::test_ra...
["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
72
12
999
0
0.6
1
0.75
1
0.4065
81.4945
4,387
swe_smith::train::27429
swe_smith
train
27,429
tkrajina__gpxpy.09fc46b3.lm_rewrite__11ed4s8e
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
# Bug: get_nearest_location returns incorrect data structure ## Problem When using the `get_nearest_location` method, it returns a data structure that doesn't match what the code expects. This causes errors when trying to access properties of the returned object. ## Steps to Reproduce ```python import gpxpy from gp...
diff --git a/test.py b/test.py index 7dd6f44..3f7b39d 100644 --- a/test.py +++ b/test.py @@ -410,24 +410,44 @@ class GPXTests(mod_unittest.TestCase): def test_nearest_location_1(self) -> None: def test_nearest_gpx(gpx: mod_gpx.GPX) -> None: - def test_nearest(gpx: mod_gpx.GPX,loc: mod_geo.Loc...
["test.py::GPXTests::test_nearest_location_1"]
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
56
1
1,319
0
0.6
1
0.75
1
0.4065
81.4945
4,388
swe_smith::train::49090
swe_smith
train
49,090
mozilla__bleach.73871d76.combine_file__2c9cnu0u
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML entity parsing broken after recent changes #### Description HTML entities are not being parsed correctly. When processing text with HTML entities like `&nbsp;`, `&amp;`, etc., the parser is throwing `ValueError: Stream should end with ";"` errors. #### Steps/Code to Reproduce ```python import bleach # This sh...
diff --git a/bleach/html5lib_shim.py b/bleach/html5lib_shim.py index f083db7..48f38de 100644 --- a/bleach/html5lib_shim.py +++ b/bleach/html5lib_shim.py @@ -448,45 +448,31 @@ class BleachHTMLTokenizer(HTMLTokenizer): token = self.currentToken if ( - self.parser.tags is not None - ...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_unclosed_tag", "tests/test_clean.py::test_character_entities_handling[&amp;-&amp;]", "tests/test_clean.py::test_character_entities_handlin...
["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
73
78
978
0
0.6
1
0.75
1
0.406333
81.494
4,389
swe_smith::train::37989
swe_smith
train
37,989
kayak__pypika.1c9646f0.lm_rewrite__toclgqap
swesmith/kayak__pypika.1c9646f0
kayak/pypika
python
null
# [Bug]: PostgreSQL ON CONFLICT WHERE clause not validating properly I've found an issue with the PostgreSQL query builder's handling of the ON CONFLICT clause when using WHERE conditions. ## Description When using the PostgreSQL query builder with ON CONFLICT clauses, the validation for WHERE clauses seems to be br...
diff --git a/pypika/dialects.py b/pypika/dialects.py index 57955d8..9aa6798 100644 --- a/pypika/dialects.py +++ b/pypika/dialects.py @@ -489,29 +489,24 @@ class PostgreSQLQueryBuilder(QueryBuilder): self._on_conflict_do_updates.append((field, None)) @builder - def where(self, criterion: Criterion...
["pypika/tests/test_inserts.py::PostgresInsertIntoOnConflictTests::test_empty_on_conflict_do_update_where", "pypika/tests/test_inserts.py::PostgresInsertIntoOnConflictTests::test_on_conflict_do_nothing_where", "pypika/tests/test_inserts.py::PostgresInsertIntoOnConflictTests::test_on_conflict_where_empty_conflict_fields...
["pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_0__ridley_scott_jimi_hendrix_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_1__1_2_3_4_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_2__toInt64_1_toInt64_2_toInt64_3_toInt64_4_", "pypika/tests/clickhouse/test_array...
jyangballin/swesmith.x86_64.kayak_1776_pypika.1c9646f0
true
null
1
37
4
1,698
0
0.6
1
0.75
1
0.406333
81.494
4,390
swe_smith::train::48655
swe_smith
train
48,655
facebookresearch__hydra.0f03eb60.combine_file__jl2u8uri
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
## `sort()` function broken with empty arguments When calling `sort()` with no arguments, the function should raise a `ValueError` with the message "empty sort input", but it's currently not working properly. #### Steps to Reproduce ```python from hydra._internal.grammar.grammar_functions import sort # This should ...
diff --git a/hydra/_internal/grammar/grammar_functions.py b/hydra/_internal/grammar/grammar_functions.py index 879b06b..1e2772c 100644 --- a/hydra/_internal/grammar/grammar_functions.py +++ b/hydra/_internal/grammar/grammar_functions.py @@ -177,7 +177,8 @@ def cast_json_str(*args: Any, value: Optional[Any] = None) -> A...
["tests/test_hydra_cli_errors.py::test_cli_error[empty_sort]", "tests/test_overrides_parser.py::test_value[sort(3,2,1)]", "tests/test_overrides_parser.py::test_value[sort(a,c,b,reverse=true)]", "tests/test_overrides_parser.py::test_value[float(sort(3,2,1))]", "tests/test_overrides_parser.py::test_value[sort(3,2,str(1))...
["build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.py::test_find[...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
84
36
756
0
0.6
1
0.75
1
0.406
81.493
4,391
swe_smith::train::32393
swe_smith
train
32,393
pydantic__pydantic.acb0f10f.combine_file__tte3wh1b
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
ImportString validation fails for module-only imports #### Description When using `ImportString` to import a module (without specifying an attribute), validation fails with an `UnboundLocalError` because the `attribute` variable is referenced before assignment. #### Steps/Code to Reproduce ```python from pydantic i...
diff --git a/pydantic/_internal/_validators.py b/pydantic/_internal/_validators.py index 8261c98..9f21413 100644 --- a/pydantic/_internal/_validators.py +++ b/pydantic/_internal/_validators.py @@ -117,14 +117,13 @@ def _import_string_logic(dotted_path: str) -> Any: raise e if len(components) > 1: + ...
["tests/test_deprecated.py::test_extra_used_as_enum[allow-allow]", "tests/test_deprecated.py::test_extra_used_as_enum[ignore-ignore]", "tests/test_deprecated.py::test_extra_used_as_enum[forbid-forbid]", "tests/test_docs.py::test_docstrings_examples[pydantic/types.py:923-973]", "tests/test_docs.py::test_docstrings_examp...
["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
71
34
1,015
0
0.6
1
0.75
1
0.405833
81.4925
4,392
swe_smith::train::1949
swe_smith
train
1,949
agronholm__typeguard.b6a7e438.lm_rewrite__6l7stksw
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
[Bug]: install_import_hook fails to find a suitable meta path finder ### Bug summary When using `install_import_hook()`, the function fails to find a suitable meta path finder to hook into. This causes issues when trying to instrument functions for automatic type checking. ### Code for reproduction ```python from t...
diff --git a/src/typeguard/_importhook.py b/src/typeguard/_importhook.py index 0d1c627..3b6f3ab 100644 --- a/src/typeguard/_importhook.py +++ b/src/typeguard/_importhook.py @@ -172,11 +172,8 @@ class ImportHookManager: pass # already removed -def install_import_hook( - packages: Iterable[str] | Non...
["tests/test_importhook.py::test_debug_instrumentation"]
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
35
1
1,735
0
0.6
1
0.75
1
0.405833
81.4925
4,393
swe_smith::train::52079
swe_smith
train
52,079
pydicom__pydicom.7d361b3d.func_basic__mkqmowne
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# Issues with overlay data handling when numpy is not available I encountered a problem with the overlay data handler in pydicom when numpy is not available. Instead of raising an appropriate ImportError, the code now returns unexpected values that can cause downstream issues. ## Description When trying to work with...
diff --git a/src/pydicom/overlays/numpy_handler.py b/src/pydicom/overlays/numpy_handler.py index 058a886..cc93278 100644 --- a/src/pydicom/overlays/numpy_handler.py +++ b/src/pydicom/overlays/numpy_handler.py @@ -185,9 +185,8 @@ def get_overlay_array(ds: "Dataset", group: int) -> "np.ndarray": length. """...
["tests/test_overlay_np.py::TestNoNumpy_NumpyHandler::test_get_overlay_array_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
26
1
1,915
0
0.6
1
0.75
1
0.405833
81.4925
4,394
swe_smith::train::32475
swe_smith
train
32,475
pydantic__pydantic.acb0f10f.func_pm_class_rm_funcs__j4di587d
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
@validate_arguments decorator broken after recent changes #### Description The `@validate_arguments` decorator is completely broken and fails to work on any function. When trying to use a decorated function, it raises an AttributeError because the `create_model` method is missing. #### Steps/Code to Reproduce ```py...
diff --git a/pydantic/deprecated/decorator.py b/pydantic/deprecated/decorator.py index e73ad20..1d3124d 100644 --- a/pydantic/deprecated/decorator.py +++ b/pydantic/deprecated/decorator.py @@ -224,61 +224,4 @@ class ValidatedFunction: kwargs[name] = value return self.raw_function(*args...
["tests/test_deprecated.py::test_deprecated_module", "tests/test_deprecated_validate_arguments.py::test_args", "tests/test_deprecated_validate_arguments.py::test_wrap", "tests/test_deprecated_validate_arguments.py::test_kwargs", "tests/test_deprecated_validate_arguments.py::test_untyped", "tests/test_deprecated_validat...
["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
59
20
1,252
0
0.6
1
0.75
1
0.405333
81.491
4,395
swe_smith::train::32811
swe_smith
train
32,811
pydantic__pydantic.acb0f10f.lm_rewrite__r5khum3v
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# pydantic_encoder fails to handle nested objects properly ## Description The `pydantic_encoder` function in the deprecated JSON module doesn't properly handle nested objects. When encoding complex objects with nested structures, it fails to recursively process the nested elements, leading to serialization errors. #...
diff --git a/pydantic/deprecated/json.py b/pydantic/deprecated/json.py index 1e216a7..4f99e10 100644 --- a/pydantic/deprecated/json.py +++ b/pydantic/deprecated/json.py @@ -79,35 +79,47 @@ ENCODERS_BY_TYPE: dict[type[Any], Callable[[Any], Any]] = { } +@deprecated( + '`pydantic_encoder` is deprecated, use `pydan...
["tests/test_deprecated.py::test_deprecated_module", "tests/test_json.py::test_invalid_model", "tests/test_json.py::test_encode_dataclass", "tests/test_json.py::test_encode_pydantic_dataclass"]
["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
48
4
1,472
0
0.6
1
0.75
1
0.405333
81.491
4,396
swe_smith::train::1314
swe_smith
train
1,314
Cog-Creators__Red-DiscordBot.33e0eac7.combine_module__ape0cbzb
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
# Incorrect order of operations in pagify and bounded_gather functions I've discovered two issues in the utils module that are causing unexpected behavior: ## Issue 1: bounded_gather function has code in the wrong order The `bounded_gather` function in `redbot/core/utils/__init__.py` has its docstring and code in th...
diff --git a/redbot/core/utils/__init__.py b/redbot/core/utils/__init__.py index dc3687f..fe599bf 100644 --- a/redbot/core/utils/__init__.py +++ b/redbot/core/utils/__init__.py @@ -237,6 +237,13 @@ def bounded_gather( limit: int = 4, semaphore: Optional[Semaphore] = None, ) -> Awaitable[List[Any]]: + + if...
["tests/core/test_utils.py::test_bounded_gather", "tests/core/test_utils.py::test_pagify_length_hint"]
["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
22
2
1,992
0
0.6
1
0.75
1
0.405333
81.491
4,397
swe_smith::train::7141
swe_smith
train
7,141
cantools__cantools.0c6a7871.combine_module__94v6dlji
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
# Container message encoding broken in cantools I've discovered a bug in the container message handling in cantools. When trying to encode container messages, I'm getting an error that the message is not a container, even though it actually is. ## Steps to reproduce I have a container message defined in my ARXML fil...
diff --git a/src/cantools/database/can/c_source.py b/src/cantools/database/can/c_source.py index cf3c40e..f24ca2e 100644 --- a/src/cantools/database/can/c_source.py +++ b/src/cantools/database/can/c_source.py @@ -1656,26 +1656,26 @@ def _generate_fuzzer_source(database_name: str, calls = [] for cg_message i...
["tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_generate_fuzzer", "tests/test_database.py::CanToolsDatabaseTest::test_encode_decode_containers", "tests/test_database.py::CanToolsDatabaseTest::test_gather_signals"]
["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
2
42
3
1,591
0
0.6
1
0.75
1
0.405167
81.4905
4,398
swe_smith::train::9962
swe_smith
train
9,962
google__textfsm.c31b6007.combine_file__n71is6qa
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
# Broken row matching and key value functionality in clitable.py **Describe the bug** After recent changes to the codebase, the `GetRowMatch` and `KeyValue` methods in clitable.py are not functioning correctly. This causes issues when trying to match rows based on attributes and when retrieving key values from rows. ...
diff --git a/textfsm/clitable.py b/textfsm/clitable.py index c7ad7a7..e194ed3 100755 --- a/textfsm/clitable.py +++ b/textfsm/clitable.py @@ -134,24 +134,21 @@ class IndexTable(object): if row[col]: row[col] = re.compile(row[col]) - def GetRowMatch(self, attributes): +def GetRowMatch(self, attribu...
["tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.py::UnitTestCliTable::testCompletion", "tests/clitable_test.py::UnitTestCliTable::testCopy", "tests/clitable_test.py::U...
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/terminal_test.py::TerminalTest::testAnsiCmd", "tests/terminal_test.py::TerminalTest::testAnsiText", "tests/terminal_test.py::TerminalTest::testEncloseAnsi", "tests/terminal_test.py::TerminalTest...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
46
15
1,510
0
0.6
1
0.75
1
0.405
81.49
4,399
swe_smith::train::32878
swe_smith
train
32,878
pydantic__pydantic.acb0f10f.pr_11161
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Discriminated Union Type Handling Issue Hello, I've encountered an issue with the handling of discriminated union types in the Pydantic library. It seems that certain core schema types are not being recognized as valid discriminated union variants, which leads to unexpected `TypeError` exceptions. For instance, when ...
diff --git a/pydantic/_internal/_discriminated_union.py b/pydantic/_internal/_discriminated_union.py index 5dd6fda..f86d153 100644 --- a/pydantic/_internal/_discriminated_union.py +++ b/pydantic/_internal/_discriminated_union.py @@ -259,13 +259,10 @@ class _ApplyInferredDiscriminator: 'definition-ref', ...
["tests/test_discriminated_union.py::test_discriminated_union_type_invalid_single_variant", "tests/test_discriminated_union.py::test_nested_optional_unions", "tests/test_discriminated_union.py::test_unions_of_optionals", "tests/test_discriminated_union.py::test_none_schema", "tests/test_discriminated_union.py::test_inv...
["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
44
9
1,549
0
0.6
1
0.75
1
0.404833
81.4895