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,600
swe_smith::train::2993
swe_smith
train
2,993
Suor__funcy.207a7810.combine_file__k7uqr3fm
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# LazyObject and cached_readonly not working correctly I've found several issues with the `objects.py` module: 1. The `cached_readonly` property doesn't prevent attribute modification as it should. When trying to set a value on a `cached_readonly` property, it silently accepts the change instead of raising an Attribu...
diff --git a/funcy/objects.py b/funcy/objects.py index 6054f7b..c941407 100644 --- a/funcy/objects.py +++ b/funcy/objects.py @@ -29,7 +29,7 @@ class cached_property(object): class cached_readonly(cached_property): """Same as @cached_property, but protected against rewrites.""" def __set__(self, instance, val...
["tests/test_objects.py::test_cached_readonly", "tests/test_objects.py::test_monkey_property", "tests/test_objects.py::test_lazy_object"]
["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
31
3
1,635
0
0.6
1
0.75
1
0.375833
81.4025
4,601
swe_smith::train::49306
swe_smith
train
49,306
mozilla__bleach.73871d76.func_basic__h2rrql50
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
Linkify breaks when text contains ampersands without entities #### Description When using `linkify()` on text that contains standalone ampersands (not part of HTML entities), the function fails with an `AttributeError: 'dict' object has no attribute 'replace'`. #### Steps/Code to Reproduce ```python import bleach ...
diff --git a/bleach/linkifier.py b/bleach/linkifier.py index 8fcefb2..cbc50d3 100644 --- a/bleach/linkifier.py +++ b/bleach/linkifier.py @@ -531,44 +531,32 @@ class LinkifyFilter(html5lib_shim.Filter): """ data = token.get("data", "") - # If there isn't a & in the data, we can return now - ...
["tests/test_linkify.py::test_simple_link", "tests/test_linkify.py::test_trailing_slash", "tests/test_linkify.py::test_mangle_link", "tests/test_linkify.py::test_mangle_text", "tests/test_linkify.py::test_set_attrs", "tests/test_linkify.py::test_only_proto_links", "tests/test_linkify.py::test_nofollow_off", "tests/test...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
54
58
1,175
0
0.6
1
0.75
1
0.375833
81.4025
4,602
swe_smith::train::31691
swe_smith
train
31,691
benoitc__gunicorn.bacbf8aa.lm_rewrite__khl83dqp
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
### Issue: Unexpected Behavior with Positive Integer Validation #### Description After updating the codebase, there seems to be an issue with the validation of positive integers in the configuration settings. The recent changes have introduced a stricter validation mechanism that is causing unexpected behavior when c...
diff --git a/gunicorn/config.py b/gunicorn/config.py index 402a26b..a0fbf5f 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -355,16 +355,23 @@ def validate_dict(val): def validate_pos_int(val): + if val is None: + return None + + if isinstance(val, str): + try: + val ...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
["tests/test_config.py::test_callable_validation_for_string", "tests/test_http.py::test_method_pattern", "tests/test_http.py::test_readline_empty_body", "tests/test_http.py::test_readline_zero_size", "tests/test_http.py::test_readline_new_line_before_size", "tests/test_http.py::test_readline_new_line_after_size", "test...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
21
170
1,835
0
0.6
1
0.75
1
0.375833
81.4025
4,603
swe_smith::train::39583
swe_smith
train
39,583
pallets__jinja.ada0a9a6.lm_rewrite__agr4tzxg
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
# Multiple extends tags in a template causes error ## Description I've discovered an issue with the `extends` tag in Jinja2 templates. When a template contains multiple `extends` tags, it causes an error. ## Steps to Reproduce Create a template with multiple extends tags: ```jinja {% extends "base.html" %} {% exte...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..02899b6 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -999,46 +999,26 @@ class CodeGenerator(NodeVisitor): def visit_Extends(self, node: nodes.Extends, frame: Frame) -> None: """Calls the extender.""" - ...
["tests/test_inheritance.py::TestInheritance::test_multi_inheritance", "tests/test_inheritance.py::TestInheritance::test_duplicate_required_or_scoped", "tests/test_inheritance.py::TestBugFix::test_double_extends", "tests/test_regression.py::TestBug::test_extends_output_bugs"]
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
44
4
1,374
0
0.6
1
0.75
1
0.375667
81.402
4,604
swe_smith::train::7145
swe_smith
train
7,145
cantools__cantools.0c6a7871.combine_module__aewsjmrq
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
[Bug]: Diagnostics Database Functionality Broken ### Bug summary I've been working with the cantools library to parse CDD (Diagnostic Database) files for a vehicle diagnostics project. After a recent update, I noticed that the diagnostics database functionality is completely broken. The library is unable to load or p...
diff --git a/src/cantools/database/diagnostics/database.py b/src/cantools/database/diagnostics/database.py index de312e8..b516d70 100644 --- a/src/cantools/database/diagnostics/database.py +++ b/src/cantools/database/diagnostics/database.py @@ -28,7 +28,7 @@ class Database: """ - return self._dids +...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanTo...
["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
26
8
1,733
0
0.6
1
0.75
1
0.3755
81.4015
4,605
swe_smith::train::1039
swe_smith
train
1,039
jd__tenacity.0d40e76f.combine_file__69rgwhxp
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
RetryCallState constructor swaps args and kwargs parameters #### Description When creating a `RetryCallState` object, the constructor incorrectly assigns the `args` parameter to `self.kwargs` and the `kwargs` parameter to `self.args`, causing function arguments to be swapped. #### Steps/Code to Reproduce ```python ...
diff --git a/tenacity/__init__.py b/tenacity/__init__.py index 72eba04..6e77547 100644 --- a/tenacity/__init__.py +++ b/tenacity/__init__.py @@ -345,12 +345,6 @@ class BaseRetrying(ABC): return wrapped_f # type: ignore[return-value] - def begin(self) -> None: - self.statistics.clear() - s...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_retry", "tests/test_asyncio.py::TestAsyncio::test_...
["tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::TestAsyncio::test_repr", "tests/test_asyncio.py::TestAsyncio::test_retry_attributes", "tests/test_asyncio.py::TestAsyncio::test_retry_preserves_argument_defaults", "tests/test_asyncio.py::TestContextManager::test_async_retying_iter...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
53
99
1,193
0
0.6
1
0.75
1
0.3755
81.4015
4,606
swe_smith::train::39699
swe_smith
train
39,699
tornadoweb__tornado.d5ac65c1.func_pm_class_rm_funcs__oer4euf2
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
WebSocketClientConnection missing essential methods after refactoring #### Description The `WebSocketClientConnection` class is missing critical methods like `close()` and `read_message()` that are expected by client code. This appears to have happened during a refactoring where these methods were accidentally remove...
diff --git a/tornado/websocket.py b/tornado/websocket.py index 1e0161e..fb29659 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -1415,22 +1415,6 @@ class WebSocketClientConnection(simple_httpclient._HTTPConnection): # dependent on GC timing). warnings.warn("Unclosed WebSocketCl...
["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
53
37
1,193
0
0.6
1
0.75
1
0.3755
81.4015
4,607
swe_smith::train::1723
swe_smith
train
1,723
agronholm__typeguard.b6a7e438.combine_module__r7gavo8y
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
@typechecked decorator breaks with NameError: name 'target_code' is not defined #### Description The @typechecked decorator is failing with a NameError when trying to instrument functions. The error occurs in the `find_target_function` method where `target_code` is referenced but not defined in the current scope. ##...
diff --git a/src/typeguard/_decorators.py b/src/typeguard/_decorators.py index a6c20cb..45fa781 100644 --- a/src/typeguard/_decorators.py +++ b/src/typeguard/_decorators.py @@ -43,27 +43,16 @@ def find_target_function( if const.co_firstlineno == firstlineno: return const ...
["tests/test_checkers.py::TestTypedDict::test_notrequired_pass[typing_extensions]", "tests/test_checkers.py::TestTypedDict::test_notrequired_fail[typing_extensions]", "tests/test_suppression.py::test_contextmanager_typechecked", "tests/test_suppression.py::test_decorator_typechecked", "tests/test_typechecked.py::TestCo...
["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
66
56
932
0
0.6
1
0.75
1
0.375333
81.401
4,608
swe_smith::train::33053
swe_smith
train
33,053
django-money__django-money.835c1ab8.combine_file__fnp581uk
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
Money field queries broken after recent changes #### Description Money field queries are failing with AttributeError when trying to filter or perform operations on models with MoneyField. The error seems to be related to how the query arguments are being processed. #### Steps/Code to Reproduce ```python from djmone...
diff --git a/djmoney/models/managers.py b/djmoney/models/managers.py index d76f0c5..5438b68 100644 --- a/djmoney/models/managers.py +++ b/djmoney/models/managers.py @@ -12,12 +12,11 @@ from .fields import CurrencyField, MoneyField def _get_clean_name(model, name): - # Get rid of __lt, __gt etc for the currency ...
["tests/test_form.py::test_save", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs0-expected0]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs1-expected1]", "tests/test_models.py::TestVanillaMoneyField::test_creat...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
1
56
154
1,132
0
0.6
1
0.75
1
0.375333
81.401
4,609
swe_smith::train::5202
swe_smith
train
5,202
agronholm__exceptiongroup.0b4f4937.lm_rewrite__oqs13swc
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
suppress() doesn't properly handle BaseExceptionGroup with mixed exception types Description The `suppress` context manager in exceptiongroup doesn't correctly handle BaseExceptionGroup instances that contain a mix of suppressed and non-suppressed exception types. When using `suppress` with a BaseExceptionGroup that...
diff --git a/src/exceptiongroup/_suppress.py b/src/exceptiongroup/_suppress.py index 11467ee..cce6845 100644 --- a/src/exceptiongroup/_suppress.py +++ b/src/exceptiongroup/_suppress.py @@ -24,32 +24,17 @@ class suppress(BaseClass): def __enter__(self) -> None: pass - def __exit__( - self, - ...
["tests/test_suppress.py::test_suppress_exception"]
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
39
1
1,471
0
0.6
1
0.75
1
0.375167
81.4005
4,610
swe_smith::train::34325
swe_smith
train
34,325
iterative__dvc.1d6ea681.lm_rewrite__h3lq5aia
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
# Uncached outputs not being properly handled in StageCache ### Bug description The `_uncached_outs` method in `StageCache` class is not properly handling uncached outputs, causing failures when trying to run stages that were previously cached. ### Steps to reproduce 1. Create a simple DVC pipeline with outputs 2. ...
diff --git a/dvc/stage/cache.py b/dvc/stage/cache.py index f97b471..971eab9 100644 --- a/dvc/stage/cache.py +++ b/dvc/stage/cache.py @@ -141,19 +141,17 @@ class StageCache: self.repo.cache.legacy.cache_types = legacy_cache_types def _uncached_outs(self, stage, cache): - # NOTE: using temporar...
["tests/unit/stage/test_cache.py::test_stage_cache", "tests/unit/stage/test_cache.py::test_stage_cache_params", "tests/unit/stage/test_cache.py::test_stage_cache_wdir", "tests/unit/stage/test_cache.py::test_shared_stage_cache"]
["tests/unit/stage/test_cache.py::test_unhashable[kwargs0]", "tests/unit/stage/test_cache.py::test_unhashable[kwargs1]", "tests/unit/stage/test_cache.py::test_unhashable[kwargs2]", "tests/unit/stage/test_cache.py::test_unhashable[kwargs3]", "tests/unit/stage/test_cache.py::test_unhashable[kwargs4]"]
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
1
24
4
1,771
0
0.6
1
0.75
1
0.375167
81.4005
4,611
swe_smith::train::5200
swe_smith
train
5,200
agronholm__exceptiongroup.0b4f4937.lm_rewrite__dby4dsgg
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
### Issue: `catch` Function Misbehaves with ExceptionGroup #### Description The `catch` function is not handling `ExceptionGroup` types correctly. When attempting to use `catch` with `ExceptionGroup` or `BaseExceptionGroup`, it does not raise the expected `TypeError`. This behavior seems to have been introduced in a ...
diff --git a/src/exceptiongroup/_catch.py b/src/exceptiongroup/_catch.py index 0246568..de555de 100644 --- a/src/exceptiongroup/_catch.py +++ b/src/exceptiongroup/_catch.py @@ -93,46 +93,23 @@ class _Catcher: return excgroup -def catch( - __handlers: Mapping[type[BaseException] | Iterable[type[BaseE...
["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...
["tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_no_match", "tests/test_catch.py::test_catch_single_no_match", "tests/test_catch.py::test_catch_full_match", "tests/test_catch.py::test_catch_handler_rai...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
61
6
1,031
0
0.6
1
0.75
1
0.375167
81.4005
4,612
swe_smith::train::702
swe_smith
train
702
oauthlib__oauthlib.1fd52536.func_pm_class_rm_funcs__55fs6zdi
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RequestTokenEndpoint missing create_request_token_response method #### Description The `RequestTokenEndpoint` class is missing the `create_request_token_response` method, causing AttributeError when trying to create request token responses. #### Steps/Code to Reproduce ```python from oauthlib.oauth1 import RequestT...
diff --git a/oauthlib/oauth1/rfc5849/endpoints/request_token.py b/oauthlib/oauth1/rfc5849/endpoints/request_token.py index 0323cfb..14f84de 100644 --- a/oauthlib/oauth1/rfc5849/endpoints/request_token.py +++ b/oauthlib/oauth1/rfc5849/endpoints/request_token.py @@ -46,67 +46,6 @@ class RequestTokenEndpoint(BaseEndpoint)...
["tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_client_key_check", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_expired_timestamp", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_invalid_version", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpo...
["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
63
15
990
0
0.6
1
0.75
1
0.375
81.4
4,613
swe_smith::train::29831
swe_smith
train
29,831
getnikola__nikola.0f4c230e.func_pm_ctrl_invert_if__heo8h6h9
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
WordPress import fails with AttributeError when processing image metadata #### Description When importing WordPress content with image metadata, the import process crashes with an AttributeError. This happens during the processing of image EXIF data when the code tries to decode string values that are not bytes. ###...
diff --git a/nikola/plugins/command/import_wordpress.py b/nikola/plugins/command/import_wordpress.py index 9a8b130..5462a16 100644 --- a/nikola/plugins/command/import_wordpress.py +++ b/nikola/plugins/command/import_wordpress.py @@ -592,26 +592,25 @@ to value = image_meta[wp_key] ...
["tests/integration/test_wordpress_import.py::test_filled_directories[pages]", "tests/integration/test_wordpress_import.py::test_filled_directories[posts]", "tests/test_command_import_wordpress.py::test_importing_posts_and_attachments"]
["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
13
3
1,989
0
0.6
1
0.75
1
0.374833
81.3995
4,614
swe_smith::train::18184
swe_smith
train
18,184
msiemens__tinydb.10644a0e.combine_file__93coao7c
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
JSONStorage fails to create parent directories when they don't exist #### Description When using JSONStorage with `create_dirs=True`, the storage fails to create parent directories if they don't already exist. This causes file operations to fail with `FileNotFoundError`. #### Steps/Code to Reproduce ```python impor...
diff --git a/tinydb/storages.py b/tinydb/storages.py index d5a2db7..c9c5286 100644 --- a/tinydb/storages.py +++ b/tinydb/storages.py @@ -16,20 +16,20 @@ __all__ = ('Storage', 'JSONStorage', 'MemoryStorage') def touch(path: str, create_dirs: bool): """ Create a file if it doesn't exist yet. - + :para...
["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_json_write", "tests/test_storages.py::test_json", "tests/test_storages.py::test_json_kwargs", "tests/test_storages.py::test_jso...
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middlewares.py::test_nested", "tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_add_int[memory]", "tests/test_operations.py::t...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
45
26
1,347
0
0.6
1
0.75
1
0.3745
81.3985
4,615
swe_smith::train::3012
swe_smith
train
3,012
Suor__funcy.207a7810.combine_file__wkpeuszd
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Multiple bugs in debug.py functions I found several issues with the debug module functions that cause unexpected behavior. ## Bug summary The debug module has several functions that don't work as expected, including `log_calls`, `log_durations`, and the `LabeledContextDecorator` class. ## Code for reproduction H...
diff --git a/funcy/debug.py b/funcy/debug.py index 62ef1bc..bdc5107 100644 --- a/funcy/debug.py +++ b/funcy/debug.py @@ -37,13 +37,14 @@ def log_calls(call, print_func, errors=True, stack=True, repr_len=REPR_LEN): try: print_func('Call %s' % signature) result = call() - # NOTE: using full ...
["tests/test_debug.py::test_log_calls_raise", "tests/test_debug.py::test_log_errors", "tests/test_debug.py::test_print_errors", "tests/test_debug.py::test_log_durations", "tests/test_debug.py::test_log_durations_ex"]
["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
13
5
1,987
0
0.6
1
0.75
1
0.3745
81.3985
4,616
swe_smith::train::24607
swe_smith
train
24,607
marshmallow-code__marshmallow.9716fc62.combine_module__tes1m6pd
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
OneOf validator inverted logic causes validation to fail for valid values #### Description The OneOf validator is rejecting valid values and accepting invalid ones. When a value is in the allowed choices, it raises a ValidationError instead of passing validation. #### Steps/Code to Reproduce ```python from marshmal...
diff --git a/src/marshmallow/class_registry.py b/src/marshmallow/class_registry.py index d41b112..0db2430 100644 --- a/src/marshmallow/class_registry.py +++ b/src/marshmallow/class_registry.py @@ -26,7 +26,7 @@ if typing.TYPE_CHECKING: _registry = {} # type: dict[str, list[SchemaType]] -def register(classname: st...
["tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_raises_with_errors", "tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_raises_with_errors_with_multiple_validators", "tests/test_registry.py::test_serializer_class_registry_register_same_classname_different_mo...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
2
52
11
1,207
0
0.6
1
0.75
1
0.3745
81.3985
4,617
swe_smith::train::28063
swe_smith
train
28,063
jsvine__pdfplumber.02ff4313.lm_rewrite__q04phseo
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
### Issue: TypeError when using `TableSettings` with certain configurations #### Description Encountered a `TypeError` when attempting to use `TableSettings` with specific configurations. This seems to occur when passing a dictionary of settings to the `TableFinder` class. The error message indicates an unexpected ty...
diff --git a/pdfplumber/table.py b/pdfplumber/table.py index 0ba4445..1bcaffa 100644 --- a/pdfplumber/table.py +++ b/pdfplumber/table.py @@ -553,24 +553,24 @@ class TableSettings: setattr(self, attr, getattr(self, fallback)) @classmethod - def resolve(cls, settings: Optional[T_table_settings]...
["tests/test_table.py::Test::test_discussion_539_null_value", "tests/test_table.py::Test::test_table_settings_errors", "tests/test_table.py::Test::test_text_layout", "tests/test_table.py::Test::test_text_tolerance"]
["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
26
4
1,726
0
0.6
1
0.75
1
0.374333
81.398
4,618
swe_smith::train::42842
swe_smith
train
42,842
python-jsonschema__jsonschema.93e0caa5.lm_rewrite__obgzi3fx
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
Unexpected Behavior in Best Match Error Prioritization It seems there's an issue with how errors are prioritized when using the `best_match` function. The current behavior doesn't align with the expected prioritization of errors, particularly when dealing with `oneOf` and `anyOf` schemas. ## Expected Behavior When v...
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 3dcd296..a2d5123 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -407,15 +407,31 @@ def by_relevance(weak=WEAK_MATCHES, strong=STRONG_MATCHES): """ def relevance(error): + """ + Return a key that can...
["jsonschema/tests/test_exceptions.py::TestBestMatch::test_anyOf_traversal_for_non_type_matching_sibling_errors", "jsonschema/tests/test_exceptions.py::TestBestMatch::test_anyOf_traversal_for_single_sibling_errors", "jsonschema/tests/test_exceptions.py::TestBestMatch::test_it_prioritizes_matching_types", "jsonschema/te...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
32
11
1,605
0
0.6
1
0.75
1
0.374167
81.3975
4,619
swe_smith::train::35446
swe_smith
train
35,446
alecthomas__voluptuous.a7a55f83.lm_rewrite__xtprvenu
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
# Humanized error messages format changed ## Description I noticed that the format of humanized error messages has changed in a recent update. The new format is different from what I was expecting and breaks compatibility with my existing code. ## Steps to reproduce 1. Create a schema with validation rules 2. Provi...
diff --git a/voluptuous/humanize.py b/voluptuous/humanize.py index eabfd02..88d0211 100644 --- a/voluptuous/humanize.py +++ b/voluptuous/humanize.py @@ -23,30 +23,39 @@ def _nested_getitem( return data -def humanize_error( - data, - validation_error: Invalid, - max_sub_error_length: int = MAX_VALIDATI...
["voluptuous/tests/tests.py::test_humanize_error"]
["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
47
1
1,305
0
0.6
1
0.75
1
0.374167
81.3975
4,620
swe_smith::train::31368
swe_smith
train
31,368
benoitc__gunicorn.bacbf8aa.combine_file__9sioqs16
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
# HTTP Response Headers Not Working Correctly I've discovered a serious issue with the HTTP response handling in Gunicorn. The Response class in `gunicorn/http/wsgi.py` is not properly initializing and processing HTTP headers. ## The Problem When trying to send HTTP responses with headers, the system fails to proces...
diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 419ac50..08daa8e 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -200,15 +200,15 @@ def create(req, sock, client, server, cfg): class Response: def __init__(self, req, sock, cfg): - self.req = req + self.req = None ...
["tests/test_http.py::test_http_header_encoding"]
["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
27
1
1,704
0
0.6
1
0.75
1
0.374
81.397
4,621
swe_smith::train::623
swe_smith
train
623
oauthlib__oauthlib.1fd52536.func_basic__sq0c62z3
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth2Error initialization corrupts object attributes #### Description When creating OAuth2Error instances, several object attributes are being incorrectly assigned or modified, causing unexpected behavior in error handling and response generation. #### Steps/Code to Reproduce ```python from oauthlib.oauth2.rfc6749...
diff --git a/oauthlib/oauth2/rfc6749/errors.py b/oauthlib/oauth2/rfc6749/errors.py index 3b41574..368c47b 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_error_responses.py::ErrorResponseTest::test_invalid_post_request", "tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_invalid_request_duplicate_params", "tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_invalid_request_me...
["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
16
1,804
0
0.6
1
0.75
1
0.374
81.397
4,622
swe_smith::train::21656
swe_smith
train
21,656
datamade__usaddress.a42a8f0c.combine_file__sjv6rfix
swesmith/datamade__usaddress.a42a8f0c
datamade/usaddress
python
null
# Address parsing broken after recent changes I've discovered several issues with the address parsing functionality after recent changes. The parser is no longer correctly handling US addresses, which is causing problems in our application. ## Issues 1. **Incorrect encoding for byte strings**: When passing byte stri...
diff --git a/usaddress/__init__.py b/usaddress/__init__.py index 2628219..58001d9 100644 --- a/usaddress/__init__.py +++ b/usaddress/__init__.py @@ -730,13 +730,13 @@ def tag(address_string: str, tag_mapping=None) -> tuple[dict[str, str], str]: def tokenize(address_string: str) -> list[str]: if isinstance(addre...
["tests/test_tagging.py::TestTagging::test_broadway", "tests/test_tokenizing.py::TestTokenizing::test_ampersand", "tests/test_tokenizing.py::TestTokenizing::test_paren"]
["tests/test_token_features.py::TestTokenFeatures::test_unicode", "tests/test_tokenizing.py::TestTokenizing::test_capture_punc", "tests/test_tokenizing.py::TestTokenizing::test_hash", "tests/test_tokenizing.py::TestTokenizing::test_nums", "tests/test_tokenizing.py::TestTokenizing::test_spaces", "tests/test_tokenizing.p...
jyangballin/swesmith.x86_64.datamade_1776_usaddress.a42a8f0c
true
null
1
24
3
1,762
0
0.6
1
0.75
1
0.373667
81.396
4,623
swe_smith::train::51425
swe_smith
train
51,425
spulec__freezegun.5f171db0.lm_rewrite__0fuq6myp
swesmith/spulec__freezegun.5f171db0
spulec/freezegun
python
null
RecursionError when using freeze_time with certain configurations Description Encountered a RecursionError when using the `freeze_time` function in specific scenarios. This seems to occur when the function is called with certain configurations, leading to an infinite loop and exceeding the maximum recursion depth. S...
diff --git a/freezegun/api.py b/freezegun/api.py index d235292..052e951 100644 --- a/freezegun/api.py +++ b/freezegun/api.py @@ -156,31 +156,44 @@ _is_cpython = ( call_stack_inspection_limit = 5 -def _should_use_real_time() -> bool: - if not call_stack_inspection_limit: - return False - - # Means stop...
["tests/test_asyncio.py::test_freezing_time_in_coroutine", "tests/test_asyncio.py::test_freezing_time_before_running_coroutine", "tests/test_asyncio.py::test_asyncio_to_call_later_with_frozen_time", "tests/test_class_import.py::test_import_time", "tests/test_class_import.py::test_can_ignore_email_module", "tests/test_c...
["tests/test_asyncio.py::test_datetime_in_coroutine", "tests/test_asyncio.py::test_asyncio_sleeping_not_affected_by_freeze_time", "tests/test_class_import.py::test_import_datetime_works", "tests/test_class_import.py::test_import_date_works", "tests/test_class_import.py::test_start_and_stop_works", "tests/test_class_imp...
jyangballin/swesmith.x86_64.spulec_1776_freezegun.5f171db0
true
null
1
47
47
1,301
0
0.6
1
0.75
1
0.3735
81.3955
4,624
swe_smith::train::1347
swe_smith
train
1,347
Cog-Creators__Red-DiscordBot.33e0eac7.combine_module__hrxknpoa
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
# CaseType parameters are swapped causing modlog case creation to fail ### Describe the bug When creating a modlog case, the parameters in the CaseType class are being swapped, causing case creation to fail. The name and case_str parameters are being mixed up, and the default_setting is being converted to an integer ...
diff --git a/redbot/core/dev_commands.py b/redbot/core/dev_commands.py index b0deb5c..1336161 100644 --- a/redbot/core/dev_commands.py +++ b/redbot/core/dev_commands.py @@ -98,15 +98,10 @@ class SourceCache: return next_index def __getitem__(self, key: str) -> Tuple[List[str], int]: - value = sel...
["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
31
2
1,620
0
0.6
1
0.75
1
0.373333
81.395
4,625
swe_smith::train::35967
swe_smith
train
35,967
stanfordnlp__dspy.651a4c71.pr_1388
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
[Bug]: dump_state() method fails when saving models with field metadata ### Bug description When trying to save a model using the `save()` method, it fails if the model contains field metadata. The issue is in the `dump_state()` method which doesn't properly handle the `save_field_meta` parameter. ### Steps to repro...
diff --git a/dspy/predict/predict.py b/dspy/predict/predict.py index 9f78ca8..68b5619 100644 --- a/dspy/predict/predict.py +++ b/dspy/predict/predict.py @@ -29,7 +29,7 @@ class Predict(Module, Parameter): self.train = [] self.demos = [] - def dump_state(self): + def dump_state(self, save_field...
["tests/primitives/test_module.py::test_save_and_load_with_json", "tests/primitives/test_module.py::test_save_and_load_with_pkl"]
["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
3
25
2
1,739
0
0.6
1
0.75
1
0.373167
81.3945
4,626
swe_smith::train::22229
swe_smith
train
22,229
tweepy__tweepy.91a41c6e.combine_file__1iiwosos
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
# Cache functionality broken in Tweepy ## Description I've encountered an issue with the cache functionality in Tweepy. The cache system doesn't work properly anymore after recent changes. ## Steps to reproduce Here's a simple example that used to work but now fails: ```python import tweepy # Set up API with cach...
diff --git a/tweepy/cache.py b/tweepy/cache.py index bfb87b3..16bd621 100644 --- a/tweepy/cache.py +++ b/tweepy/cache.py @@ -85,25 +85,18 @@ class MemoryCache(Cache): def get(self, key, timeout=None): self.lock.acquire() try: - # check to see if we have this key entry = se...
["tests/test_api.py::TweepyAPITests::testcachedresult", "tests/test_api.py::TweepyCacheTests::testfilecache", "tests/test_api.py::TweepyCacheTests::testmemorycache"]
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcreatede...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
47
3
1,299
0
0.6
1
0.75
1
0.373167
81.3945
4,627
swe_smith::train::26193
swe_smith
train
26,193
pylint-dev__astroid.b114f6b5.func_pm_class_rm_funcs__fzb1s1yx
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Compare node inference broken after method removal #### Description Comparison operations like `<=`, `==`, `>=` etc. are failing to infer properly and raising AttributeError when trying to access the `_do_compare` method. #### Steps/Code to Reproduce ```python import astroid # Simple comparison that should infer t...
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index fde3239..08a3407 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -1862,54 +1862,6 @@ class Compare(NodeNG): # Is this the stupidest idea or the simplest idea? return ast.literal_eval(node...
["tests/test_inference.py::test_compare[<-False]", "tests/test_inference.py::test_compare[<=-True]", "tests/test_inference.py::test_compare[==-True]", "tests/test_inference.py::test_compare[>=-True]", "tests/test_inference.py::test_compare[>-False]", "tests/test_inference.py::test_compare[!=-False]", "tests/test_infere...
["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
49
34
1,258
0
0.6
1
0.75
1
0.373
81.394
4,628
swe_smith::train::6577
swe_smith
train
6,577
joke2k__faker.8b401a7d.combine_module__d5l7upva
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# [Bug]: Variables referenced before assignment in es_CL and es_MX SSN providers ## Description When using the `rut` method from the es_CL provider or the `elector_code` method from the es_MX provider, an `UnboundLocalError` is raised because variables are being referenced before they are assigned. ## Steps/Code to R...
diff --git a/faker/providers/ssn/es_CL/__init__.py b/faker/providers/ssn/es_CL/__init__.py index fcfb772..073bbe2 100644 --- a/faker/providers/ssn/es_CL/__init__.py +++ b/faker/providers/ssn/es_CL/__init__.py @@ -4,25 +4,24 @@ from .. import Provider as BaseProvider def rut_check_digit(number: int) -> str: + if...
["tests/providers/test_ssn.py::TestEsMX::test_elector_code[woman]", "tests/providers/test_ssn.py::TestEsMX::test_elector_code[man]", "tests/providers/test_ssn.py::TestEsMX::test_elector_code[any]", "tests/providers/test_ssn.py::TestEsMX::test_elector_code_unsupported_gender", "tests/providers/test_ssn.py::TestEsCL::tes...
["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
37
5
1,498
0
0.6
1
0.75
1
0.373
81.394
4,629
swe_smith::train::1383
swe_smith
train
1,383
Cog-Creators__Red-DiscordBot.33e0eac7.combine_module__ozhlj5jk
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
# Downloader cog fails when info.json file is missing ## Description I'm encountering an issue with the Downloader cog where it fails to handle repositories that don't have an info.json file. This is causing problems when trying to add or manage repos. ## Steps to Reproduce 1. Create a git repository without an inf...
diff --git a/redbot/cogs/downloader/info_schemas.py b/redbot/cogs/downloader/info_schemas.py index 8033d13..17cce58 100644 --- a/redbot/cogs/downloader/info_schemas.py +++ b/redbot/cogs/downloader/info_schemas.py @@ -71,8 +71,6 @@ def ensure_red_version_info( info_file: Path, key_name: str, value: Union[Any, UseDe...
["tests/cogs/downloader/test_downloader.py::test_existing_git_repo", "tests/cogs/downloader/test_downloader.py::test_add_repo", "tests/cogs/downloader/test_downloader.py::test_remove_repo"]
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
2
47
3
1,296
0
0.6
1
0.75
1
0.372667
81.393
4,630
swe_smith::train::29536
swe_smith
train
29,536
django__channels.a144b4b8.combine_file__ae8i7kif
swesmith/django__channels.a144b4b8
django/channels
python
null
Cookie middleware broken after recent changes #### Description The cookie handling in the session middleware appears to be completely broken. When trying to use sessions, I'm getting errors about cookies not being in scope, and when cookies are set, they're being encoded incorrectly. #### Steps/Code to Reproduce ``...
diff --git a/channels/sessions.py b/channels/sessions.py index f1d51d4..8566623 100644 --- a/channels/sessions.py +++ b/channels/sessions.py @@ -71,44 +71,37 @@ class CookieMiddleware: cookies[key] = value if expires is not None: if isinstance(expires, datetime.datetime): - ...
["tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_http.py::test_sessions", "tests/test_http.py::test_session_samesite[Strict]", "tests/test_http.py::test_session_samesite[None]", "tests/test_http.py::test_session_samesite_invalid", "tests/test_http.py::test_multiple_sessio...
["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_websocket_consumer_subprotocol", "tests/test_generic_websocket.py::test_websocket_consumer_gr...
jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8
true
null
1
39
9
1,456
0
0.6
1
0.75
1
0.372667
81.393
4,631
swe_smith::train::51857
swe_smith
train
51,857
pydicom__pydicom.7d361b3d.func_basic__9x07lkr7
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
DICOM file reading fails with "too many values to unpack" error #### Description When reading DICOM files using the lean reader, I'm getting a "ValueError: too many values to unpack" error. This happens with various DICOM files including both explicit and implicit VR formats. #### Steps/Code to Reproduce ```python ...
diff --git a/src/pydicom/util/leanread.py b/src/pydicom/util/leanread.py index 605e507..60d8d1e 100644 --- a/src/pydicom/util/leanread.py +++ b/src/pydicom/util/leanread.py @@ -90,87 +90,66 @@ def data_element_generator( """:return: (tag, VR, length, value, value_tell, is_implicit_VR, is_little_endian) "...
["tests/test_util.py::TestLeanRead::test_explicit_little", "tests/test_util.py::TestLeanRead::test_implicit_little", "tests/test_util.py::TestLeanRead::test_explicit_big", "tests/test_util.py::TestLeanRead::test_no_tsyntax", "tests/test_util.py::TestLeanRead::test_no_meta", "tests/test_util.py::TestLeanRead::test_UN_se...
["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
59
6
1,055
0
0.6
1
0.75
1
0.3725
81.3925
4,632
swe_smith::train::34174
swe_smith
train
34,174
iterative__dvc.1d6ea681.combine_module__z8tt7kuu
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
DataResolver missing resolve_one method breaks foreach functionality #### Description After recent changes, the `DataResolver` class is missing the `resolve_one` method which is required for foreach functionality. This causes `AttributeError` when trying to use foreach loops in DVC pipelines. #### Steps/Code to Repr...
diff --git a/dvc/parsing/__init__.py b/dvc/parsing/__init__.py index a0a65d5..e23e72e 100644 --- a/dvc/parsing/__init__.py +++ b/dvc/parsing/__init__.py @@ -191,23 +191,6 @@ class DataResolver: for i, definition in enumerate(d.get(PLOTS_KWD, [])) ] - def resolve_one(self, name: str): - ...
["tests/func/parsing/test_errors.py::test_interpolate_nested_iterable", "tests/func/parsing/test_errors.py::test_foreach_data_syntax_error", "tests/func/parsing/test_errors.py::test_foreach_data_key_does_not_exists[modelss]", "tests/func/parsing/test_errors.py::test_foreach_data_key_does_not_exists[modelss.123]", "test...
["tests/func/parsing/test_errors.py::test_vars_interpolation_errors[${file}_params.yaml]", "tests/func/parsing/test_errors.py::test_vars_interpolation_errors[vars_1]", "tests/func/parsing/test_errors.py::test_failed_to_interpolate", "tests/func/parsing/test_errors.py::test_local_vars_params_file_not_exist", "tests/func...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
2
46
70
1,314
0
0.6
1
0.75
1
0.372333
81.392
4,633
swe_smith::train::24454
swe_smith
train
24,454
sunpy__sunpy.f8edfd5c.combine_file__mqmxbcvc
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Multiple bugs in VSO client implementation I've found several issues with the VSO client implementation that are causing problems: ## Issue 1: Logic error in build_client function The `build_client` function has a logic error in the conditional statements. When both `url` and `port_name` are provided, it's raising...
diff --git a/sunpy/net/vso/vso.py b/sunpy/net/vso/vso.py index 8a0b1ef..ff7a140 100644 --- a/sunpy/net/vso/vso.py +++ b/sunpy/net/vso/vso.py @@ -123,10 +123,10 @@ def build_client(url=None, port_name=None, **kwargs): url = mirror['url'] port_name = mirror['port'] elif url and port_name: + ...
["sunpy/net/vso/tests/test_vso.py::test_build_client", "sunpy/net/vso/tests/test_vso.py::test_build_client_params", "sunpy/net/vso/tests/test_vso.py::test_can_handle_query[query0-True]", "sunpy/net/vso/tests/test_vso.py::test_can_handle_query[query1-False]", "sunpy/net/vso/tests/test_vso.py::test_can_handle_query[query...
["sunpy/net/vso/tests/test_vso.py::test_str", "sunpy/net/vso/tests/test_vso.py::test_repr", "sunpy/net/vso/tests/test_vso.py::test_show", "sunpy/net/vso/tests/test_vso.py::test_non_str_instrument", "sunpy/net/vso/tests/test_vso.py::test_iter_sort_response", "sunpy/net/vso/tests/test_vso.py::test_from_zeep_response", "s...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
14
7
1,954
0
0.6
1
0.75
1
0.372333
81.392
4,634
swe_smith::train::35916
swe_smith
train
35,916
stanfordnlp__dspy.651a4c71.lm_rewrite__lgb4a2vp
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# [Bug]: BootstrapFewShot breaks compiled model saving ## Bug summary I'm encountering an issue when trying to save a model that has been compiled with `BootstrapFewShot`. The save operation fails with an AttributeError. ## Steps to reproduce ```python import dspy from dspy.teleprompt import BootstrapFewShot # Cre...
diff --git a/dspy/teleprompt/bootstrap.py b/dspy/teleprompt/bootstrap.py index 81ab80a..7426ba9 100644 --- a/dspy/teleprompt/bootstrap.py +++ b/dspy/teleprompt/bootstrap.py @@ -92,17 +92,26 @@ class BootstrapFewShot(Teleprompter): return self.student def _prepare_student_and_teacher(self, student, teach...
["tests/primitives/test_module.py::test_save_and_load_with_pkl", "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::t...
["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
6
1,613
0
0.6
1
0.75
1
0.372167
81.3915
4,635
swe_smith::train::34523
swe_smith
train
34,523
iterative__dvc.1d6ea681.pr_9758
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
Missing imports in Repo class cause initialization failures Description When initializing a Repo object, several imports that were previously available through cached_property are now missing. The Repo class was refactored to initialize config directly instead of using a cached_property, but the imports for various c...
diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index 2b89626..94a1da2 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -122,7 +122,8 @@ class Repo: scm = SCM(root_dir or os.curdir) if scm.dulwich.repo.bare: raise NotDvcRepoError...
["tests/unit/repo/test_open_repo.py::test_subrepo_is_constructed_properly[False]", "tests/unit/repo/test_open_repo.py::test_subrepo_is_constructed_properly[True]", "tests/unit/repo/test_repo.py::test_branch_config", "tests/unit/repo/test_repo.py::test_dynamic_cache_initialization"]
["tests/unit/repo/experiments/test_executor_status.py::test_executor_status_compatibility", "tests/unit/repo/experiments/test_utils.py::test_run_check_ref_format[name-True]", "tests/unit/repo/experiments/test_utils.py::test_run_check_ref_format[group/name-False]", "tests/unit/repo/experiments/test_utils.py::test_run_ch...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
2
46
4
1,313
0
0.6
1
0.75
1
0.372167
81.3915
4,636
swe_smith::train::25714
swe_smith
train
25,714
pylint-dev__astroid.b114f6b5.func_basic__imsu5q02
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Module inspection fails with AttributeError when accessing members from modules not in sys.modules #### Description When inspecting modules, astroid crashes with AttributeError when trying to access attributes from modules that are not present in sys.modules. This affects various built-in and extension modules during...
diff --git a/astroid/raw_building.py b/astroid/raw_building.py index c1f7ec1..8bc19bd 100644 --- a/astroid/raw_building.py +++ b/astroid/raw_building.py @@ -522,47 +522,35 @@ class InspectBuilder: return None def imported_member(self, node, member, name: str) -> bool: - """verify this is not an i...
["tests/brain/test_brain.py::test_http_client_brain", "tests/brain/test_six.py::SixBrainTest::test_attribute_access", "tests/brain/test_six.py::SixBrainTest::test_attribute_access_with_six_moves_imported", "tests/brain/test_ssl.py::test_ssl_brain", "tests/test_builder.py::BuilderTest::test_inspect_build0", "tests/test_...
["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
30
12
1,632
0
0.6
1
0.75
1
0.372
81.391
4,637
swe_smith::train::5025
swe_smith
train
5,025
bottlepy__bottle.a8dfef30.lm_rewrite__6wkup0zn
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
# Request environment dictionary is not properly read-only ### Describe the bug I've discovered an issue with the `BaseRequest` class where the environment dictionary is not properly protected as read-only. When setting the `bottle.request.readonly` flag to `True`, the code should prevent modifications to the environ...
diff --git a/bottle.py b/bottle.py index 286b5bc..04f7c57 100755 --- a/bottle.py +++ b/bottle.py @@ -1542,23 +1542,22 @@ class BaseRequest(object): def __setitem__(self, key, value): """ Change an environ value and clear all caches that depend on it. """ - - if self.environ.get('bottle.request.re...
["test/test_environ.py::TestRequest::test_dict_access", "test/test_environ.py::TestRequest::test_header_access", "test/test_environ.py::TestRequest::test_header_access_special", "test/test_environ.py::TestRequest::test_readonly_environ"]
["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
19
4
1,851
0
0.6
1
0.75
1
0.371833
81.3905
4,638
swe_smith::train::49021
swe_smith
train
49,021
facebookresearch__hydra.0f03eb60.lm_rewrite__vdktu9sg
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
### Issue: Incorrect Boolean Casting in `cast_bool` Function #### Description The `cast_bool` function in `grammar_functions.py` is not handling certain input types correctly, leading to unexpected behavior when attempting to cast various data types to boolean. This issue seems to arise from the recent changes made to...
diff --git a/hydra/_internal/grammar/grammar_functions.py b/hydra/_internal/grammar/grammar_functions.py index 879b06b..897ed3c 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_overrides_parser.py::test_cast_conversions['']", "tests/test_overrides_parser.py::test_cast_conversions['10']", "tests/test_overrides_parser.py::test_cast_conversions['10.0']", "tests/test_overrides_parser.py::test_cast_conversions['[1,2,3]']", "tests/test_overrides_parser.py::test_cast_conversions['{a:10}...
["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
20
11
1,830
0
0.6
1
0.75
1
0.371667
81.39
4,639
swe_smith::train::42815
swe_smith
train
42,815
python-jsonschema__jsonschema.93e0caa5.lm_rewrite__8zh8b9om
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
### Issue: Unexpected Behavior with `multipleOf` Validation #### Description After a recent update, the `multipleOf` validation in the `jsonschema` library is not functioning as expected. Specifically, there seems to be an issue when handling floating-point numbers and large integers. The validation fails to correctl...
diff --git a/jsonschema/_keywords.py b/jsonschema/_keywords.py index f30f954..87f8512 100644 --- a/jsonschema/_keywords.py +++ b/jsonschema/_keywords.py @@ -170,26 +170,21 @@ def multipleOf(validator, dB, instance, schema): if isinstance(dB, float): quotient = instance / dB - try: - fa...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft3::test_divisibleBy_by_int_int_by_int_fail", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_allOf_allOf_combined_with_anyOf_oneOf_allOf_false_anyOf_false_oneOf_false", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_allOf_al...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
33
71
1,570
0
0.6
1
0.75
1
0.371667
81.39
4,640
swe_smith::train::2930
swe_smith
train
2,930
madzak__python-json-logger.5f85723f.func_basic__39f5tjo8
swesmith/madzak__python-json-logger.5f85723f
madzak/python-json-logger
python
null
JsonFormatter constructor parameters swapped causing unexpected behavior #### Description The JsonFormatter constructor appears to have swapped the `json_default` and `json_encoder` parameters internally, causing custom serialization and encoding to behave unexpectedly. #### Steps/Code to Reproduce ```python import...
diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py index 519a64d..1d63b81 100644 --- a/src/pythonjsonlogger/jsonlogger.py +++ b/src/pythonjsonlogger/jsonlogger.py @@ -121,39 +121,17 @@ class JsonFormatter(logging.Formatter): timestamp: Union[bool, str] = False, **kwar...
["tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_true", "tests/test_jsonlogger.py::TestJsonLogger::test_json_custom_default", "tests/test_jsonlogger.py::TestJso...
["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_exc_info", "tests/test_jsonlogger.py::TestJsonLogger::test_exc_info_renamed", "tests/test_jsonlogger.py::TestJsonLogger::test_format_keys"...
jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f
true
null
1
32
6
1,590
0
0.6
1
0.75
1
0.371667
81.39
4,641
swe_smith::train::6858
swe_smith
train
6,858
joke2k__faker.8b401a7d.lm_rewrite__ghvfdgp5
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# Belgian SSN generator fails with AttributeError ## Bug description When trying to generate a Belgian SSN (rijksregisternummer), the code fails with an AttributeError. ```python from faker import Faker fake = Faker('nl_BE') fake.ssn() # This fails ``` ## Error message ``` AttributeError: 'Provider' object has n...
diff --git a/faker/providers/ssn/nl_BE/__init__.py b/faker/providers/ssn/nl_BE/__init__.py index b7e130c..cb95503 100644 --- a/faker/providers/ssn/nl_BE/__init__.py +++ b/faker/providers/ssn/nl_BE/__init__.py @@ -7,7 +7,7 @@ Dutch/French only for now ... class Provider(SsnProvider): - def ssn(self) -> str: + ...
["tests/providers/test_ssn.py::TestNlBE::test_ssn"]
["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
64
1
948
0
0.6
1
0.75
1
0.371333
81.389
4,642
swe_smith::train::32328
swe_smith
train
32,328
davidhalter__parso.338a5760.lm_rewrite__cqd1p4mz
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
### Issue: Incorrect Handling of f-string End Positions #### Description It seems that the recent changes have introduced an issue with the handling of f-string end positions. Specifically, when processing f-strings, the tokenizer does not correctly identify the end of the f-string, leading to unexpected behavior. #...
diff --git a/parso/python/tokenize.py b/parso/python/tokenize.py index e3ffe44..fb19fdf 100644 --- a/parso/python/tokenize.py +++ b/parso/python/tokenize.py @@ -281,24 +281,48 @@ class FStringNode: return not self.is_in_expr() and self.format_spec_count -def _close_fstring_if_necessary(fstring_stack, strin...
["test/test_fstring.py::test_invalid[f\"{\"]", "test/test_fstring.py::test_invalid[f\"\"\"{\"\"\"]", "test/test_python_errors.py::test_python_exception_matches[f'{'0]", "test/test_python_errors.py::test_python_exception_matches[f'{'1]", "test/test_tokenize.py::test_fstring_end_error_pos[3.10]", "test/test_tokenize.py::...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
56
7
1,108
0
0.6
1
0.75
1
0.371333
81.389
4,643
swe_smith::train::18570
swe_smith
train
18,570
HIPS__autograd.ac044f0d.lm_rewrite__xavwbpqa
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### [BUG] Incorrect Derivative Calculation in `solve_sylvester` #### Description It seems there's an issue with the derivative calculation when using the `solve_sylvester` function. The function is expected to compute the vector-Jacobian product (VJP) correctly, but it appears to be returning incorrect results, leadi...
diff --git a/autograd/scipy/linalg.py b/autograd/scipy/linalg.py index d2cc886..0364c53 100644 --- a/autograd/scipy/linalg.py +++ b/autograd/scipy/linalg.py @@ -129,20 +129,25 @@ defjvp_argnums(solve_sylvester, _jvp_sylvester) def _vjp_sylvester(argnums, ans, args, _): + """Computes vector-Jacobian product for ...
["tests/test_scipy.py::test_solve_sylvester"]
["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
27
1
1,684
0
0.6
1
0.75
1
0.370667
81.387
4,644
swe_smith::train::3009
swe_smith
train
3,009
Suor__funcy.207a7810.combine_file__sycf832r
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Debug module silently swallows exceptions instead of raising them ## Description I discovered a serious issue with the debug module. When using functions like `log_calls`, `log_errors`, and `print_errors`, exceptions are being silently swallowed instead of being properly raised. This makes debugging extremely diffi...
diff --git a/funcy/debug.py b/funcy/debug.py index 62ef1bc..20b1b95 100644 --- a/funcy/debug.py +++ b/funcy/debug.py @@ -37,13 +37,14 @@ def log_calls(call, print_func, errors=True, stack=True, repr_len=REPR_LEN): try: print_func('Call %s' % signature) result = call() - # NOTE: using full ...
["tests/test_debug.py::test_log_calls_raise", "tests/test_debug.py::test_log_errors", "tests/test_debug.py::test_print_errors", "tests/test_debug.py::test_print_errors_recursion", "tests/test_debug.py::test_log_durations", "tests/test_debug.py::test_log_durations_ex"]
["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
25
6
1,724
0
0.6
1
0.75
1
0.370667
81.387
4,645
swe_smith::train::2370
swe_smith
train
2,370
pdfminer__pdfminer.six.1a8bd2f7.func_pm_class_rm_funcs__3q0lmbf6
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
JBIG2StreamWriter missing methods after refactoring #### Description After recent changes to the JBIG2StreamWriter class, several essential methods have been removed, causing JBIG2 image extraction to fail. The class is missing critical methods needed for writing JBIG2 files. #### Steps/Code to Reproduce ```python ...
diff --git a/pdfminer/jbig2.py b/pdfminer/jbig2.py index 96a8392..a5b4ebb 100644 --- a/pdfminer/jbig2.py +++ b/pdfminer/jbig2.py @@ -237,39 +237,6 @@ class JBIG2StreamWriter: return data_len - def write_file( - self, - segments: Iterable[JBIG2Segment], - fix_last_page: bool = True, ...
["tests/test_tools_pdf2txt.py::TestDumpImages::test_jbig2_image_export"]
["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
58
1
1,063
0
0.6
1
0.75
1
0.3705
81.3865
4,646
swe_smith::train::50800
swe_smith
train
50,800
python-hyper__h11.bed0dd4a.combine_file__u9gkt7ch
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
LocalProtocolError re-raising broken after recent changes #### Description The `_reraise_as_remote_protocol_error` method in `LocalProtocolError` is not working correctly. Instead of re-raising the exception as a `RemoteProtocolError`, it's raising a `RuntimeError` with the message "Re-raised as RuntimeError". #### ...
diff --git a/h11/_util.py b/h11/_util.py index 6718445..a2f9c36 100644 --- a/h11/_util.py +++ b/h11/_util.py @@ -38,13 +38,10 @@ class ProtocolError(Exception): """ - def __init__(self, msg: str, error_status_hint: int = 400) -> None: - if type(self) is ProtocolError: - raise TypeError("tr...
["h11/tests/test_connection.py::test_close_simple", "h11/tests/test_connection.py::test_close_different_states", "h11/tests/test_connection.py::test_errors", "h11/tests/test_connection.py::test_empty_request", "h11/tests/test_connection.py::test_empty_response", "h11/tests/test_connection.py::test_early_detection_of_in...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_conn...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
49
12
1,243
0
0.6
1
0.75
1
0.3705
81.3865
4,647
swe_smith::train::26630
swe_smith
train
26,630
pylint-dev__astroid.b114f6b5.lm_rewrite__y19ktbhu
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
AttributeError when accessing slots in class hierarchy Description It seems there's an issue with how slots are being handled in class hierarchies. When attempting to access slots from a class that inherits from another class with defined slots, an AttributeError is raised. This problem appears to occur when the slot...
diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index 99ed796..719ad6c 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -2767,36 +2767,38 @@ class ClassDef( Also, it will return None in the case ...
["tests/brain/test_brain.py::TypingBrain::test_collections_generic_alias_slots", "tests/brain/test_brain.py::TypingBrain::test_typing_generic_slots", "tests/test_builder.py::BuilderTest::test_infer_can_assign_has_slots", "tests/test_inference.py::InferenceTest::test_delayed_attributes_without_slots", "tests/test_scoped...
["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
60
11
1,023
0
0.6
1
0.75
1
0.3705
81.3865
4,648
r2e_gym::train::4580
r2e_gym
train
4,580
numpy__1821e585b3858ad81e4d5b4bdce5d7f2e720f73b
numpy
numpy/numpy
python
1821e585b3858ad81e4d5b4bdce5d7f2e720f73b
**Title:** `diff` Function Raises `IndexError` for Invalid Axis Parameter **Description:** When using the `diff` function with an axis parameter that is out of the array's range, it raises an `IndexError` instead of the expected `AxisError`. This makes it unclear that the issue is with the axis provided. **Example Co...
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -15,7 +15,7 @@ ) from numpy.core.umath import ( pi, multiply, add, arctan2, frompyfunc, cos, less_equal, sqrt, sin, - mod, exp, log10 + mod, exp, log10, not_equal, s...
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -6,6 +6,7 @@ import decimal import numpy as np +from numpy import ma from numpy.testing import ( run_module_suite, assert_, asse...
null
null
namanjain12/numpy_final:1821e585b3858ad81e4d5b4bdce5d7f2e720f73b
true
null
1
58
null
1,774
0
0.75
1
0.6375
1
0.489
81.38575
4,649
swe_smith::train::10202
swe_smith
train
10,202
paramiko__paramiko.23f92003.combine_file__vbze6sod
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
File operations broken after recent changes I'm encountering issues with basic file operations in paramiko. When trying to write to files or perform other file operations, I'm getting "File not open for writing" errors even when the file should be writable. #### Steps to Reproduce ```python import paramiko # Connec...
diff --git a/paramiko/file.py b/paramiko/file.py index a36abb9..8181935 100644 --- a/paramiko/file.py +++ b/paramiko/file.py @@ -139,7 +139,7 @@ class BufferedFile(ClosingContextManager): `True` if the file supports random access. If `False`, `seek` will raise an exception. """ - ...
["tests/test_channelfile.py::TestChannelFile::test_read_recvs_from_channel", "tests/test_channelfile.py::TestChannelFile::test_write_calls_channel_sendall", "tests/test_channelfile.py::TestChannelStderrFile::test_read_calls_channel_recv_stderr", "tests/test_channelfile.py::TestChannelStderrFile::test_write_calls_channe...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
45
79
1,321
0
0.6
1
0.75
1
0.370167
81.3855
4,650
swe_smith::train::31683
swe_smith
train
31,683
benoitc__gunicorn.bacbf8aa.lm_rewrite__gi2nqiu9
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
### Bug report **Issue summary** It seems there's an issue with the Statsd logger where certain configurations lead to an `IndexError`. This occurs when attempting to log metrics with specific prefixes or tags. The problem appears to be related to how the logger processes the `extra` data for metrics. **Steps to rep...
diff --git a/gunicorn/instrument/statsd.py b/gunicorn/instrument/statsd.py index 7bc4e6f..a9713b9 100644 --- a/gunicorn/instrument/statsd.py +++ b/gunicorn/instrument/statsd.py @@ -67,28 +67,20 @@ class Statsd(Logger): def log(self, lvl, msg, *args, **kwargs): """Log a given statistic if metric, value and...
["tests/test_statsd.py::test_dogstatsd_tags", "tests/test_statsd.py::test_instrument", "tests/test_statsd.py::test_prefix", "tests/test_statsd.py::test_prefix_no_dot", "tests/test_statsd.py::test_prefix_multiple_dots", "tests/test_statsd.py::test_prefix_nested"]
["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
36
6
1,501
0
0.6
1
0.75
1
0.370167
81.3855
4,651
swe_smith::train::2394
swe_smith
train
2,394
pdfminer__pdfminer.six.1a8bd2f7.func_pm_class_rm_funcs__ti85nvqu
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFTextDevice missing render_string method causes AttributeError #### Description When processing PDF files, the PDFTextDevice class is missing the `render_string` method, causing an AttributeError when the PDF interpreter tries to call this method during text rendering operations. #### Steps/Code to Reproduce ```p...
diff --git a/pdfminer/pdfdevice.py b/pdfminer/pdfdevice.py index 2374601..2d6cc7f 100644 --- a/pdfminer/pdfdevice.py +++ b/pdfminer/pdfdevice.py @@ -96,55 +96,6 @@ class PDFDevice: class PDFTextDevice(PDFDevice): - def render_string( - self, - textstate: "PDFTextState", - seq: PDFTextSeq, -...
["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cid_range", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cmap_bytes", "tests/test_highlevel_extracttext.py::TestExtractText::test_iss...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
63
19
960
0
0.6
1
0.75
1
0.37
81.385
4,652
swe_smith::train::48114
swe_smith
train
48,114
sqlfluff__sqlfluff.50a1c4b6.func_pm_class_rm_funcs__wil8xo4u
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
ReflowConfig.get_block_config method missing after refactor Description The `get_block_config` method was accidentally removed from the `ReflowConfig` class during a recent refactor. This method is essential for the reflow functionality as it provides spacing configuration for different block types based on their cla...
diff --git a/src/sqlfluff/utils/reflow/config.py b/src/sqlfluff/utils/reflow/config.py index 71a31c7..53bec39 100644 --- a/src/sqlfluff/utils/reflow/config.py +++ b/src/sqlfluff/utils/reflow/config.py @@ -103,61 +103,4 @@ class ReflowConfig: ), trailing_comments=config.get("trailing_comments",...
["test/utils/reflow/reindent_test.py::test_reflow__crawl_indent_points[select\\n1-raw-points_out2]", "test/utils/reflow/respace_test.py::test_reflow__point_respace_point[select\\n1-1-kwargs4-\\n-fixes_out4]", "test/utils/reflow/sequence_test.py::test_reflow_sequence_from_around_target_non_raw"]
["test/utils/reflow/depthmap_test.py::test_reflow_depthmap_from_parent", "test/utils/reflow/depthmap_test.py::test_reflow_depthmap_from_raws_and_root", "test/utils/reflow/depthmap_test.py::test_reflow_depthmap_order_by", "test/utils/reflow/reindent_test.py::test_reflow__desired_indent_units[indent_line0-forced_indents0...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
59
3
1,040
0
0.6
1
0.75
1
0.37
81.385
4,653
swe_smith::train::10311
swe_smith
train
10,311
paramiko__paramiko.23f92003.func_basic__51w8w2x8
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH connection fails after key exchange with "SSHException: Incompatible ssh peer" #### Description SSH connections are failing during the key exchange process. After establishing a connection and completing the initial handshake, the transport throws an SSHException with the message "Incompatible ssh peer" or simila...
diff --git a/paramiko/transport.py b/paramiko/transport.py index f0fcb97..7fa9f5e 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -2794,20 +2794,18 @@ class Transport(threading.Thread, ClosingContextManager): m = Message() m.add_byte(cMSG_NEWKEYS) self._send_message(m) - ...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::AuthHandler_::interactive_auth", "tests/auth.py::AuthHandler_::interactive_fallback", "tests/auth.py::AuthHandler_::utf8", "tests/auth.py::AuthHandler_::non_utf8", "...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
52
116
1,179
0
0.6
1
0.75
1
0.369833
81.3845
4,654
swe_smith::train::38027
swe_smith
train
38,027
weaveworks__grafanalib.5c3b17ed.combine_file__6r8fkq6p
swesmith/weaveworks__grafanalib.5c3b17ed
weaveworks/grafanalib
python
null
# Grafanalib loader function fails to parse dashboard and alertgroup files correctly ## Description I've been working with grafanalib and noticed that the loader function is not correctly parsing dashboard and alertgroup files. The issue appears to be in the `_gen.py` file. When trying to generate dashboards or aler...
diff --git a/grafanalib/_gen.py b/grafanalib/_gen.py index 4094edf..8d048be 100644 --- a/grafanalib/_gen.py +++ b/grafanalib/_gen.py @@ -51,7 +51,7 @@ def loader(path): :param str path: Path to a *.<type>.py file that defines a variable called <type>. """ - gtype = path.split(".")[-2] + gtype = path.s...
["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
33
1
1,559
0
0.6
1
0.75
1
0.369833
81.3845
4,655
swe_smith::train::32791
swe_smith
train
32,791
pydantic__pydantic.acb0f10f.lm_rewrite__ilicrk3x
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
parse_raw method broken after recent changes #### Description The `parse_raw` method is not working correctly and raises an AttributeError when trying to parse raw data. #### Steps/Code to Reproduce ```python from pydantic import BaseModel class Model(BaseModel): x: int y: int # This should work but raise...
diff --git a/pydantic/main.py b/pydantic/main.py index 03cb511..5499557 100644 --- a/pydantic/main.py +++ b/pydantic/main.py @@ -1326,54 +1326,41 @@ class BaseModel(metaclass=_model_construction.ModelMetaclass): 'otherwise load the data then use `model_validate` instead.', category=None, ) - d...
["tests/test_deprecated.py::test_parse_raw_pass", "tests/test_deprecated.py::test_parse_raw_pass_fail"]
["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
69
2
839
0
0.6
1
0.75
1
0.369833
81.3845
4,656
swe_smith::train::19522
swe_smith
train
19,522
seperman__deepdiff.ed252022.lm_rewrite__ghqrpsau
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
### Issue: Delta Conversion Error with Non-Bidirectional Deltas #### Code Sample Here's a minimal example to reproduce the issue: ```python from deepdiff import DeepDiff, Delta l1 = 'A B C D E F G D H'.split() l2 = 'B C X D H Y Z'.split() diff = DeepDiff(l1, l2) delta = Delta(diff) # This should work assert l2 == ...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..e4f6d55 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -884,26 +884,37 @@ class Delta: Converts op_codes to FlatDeltaRows """ result = [] - for path, op_codes in self.diff['_iterable_opcodes'].items(): - ...
["tests/test_delta.py::TestDeltaCompareFunc::test_list_of_alphabet_and_its_delta"]
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
49
1
1,239
0
0.6
1
0.75
1
0.369833
81.3845
4,657
swe_smith::train::48097
swe_smith
train
48,097
sqlfluff__sqlfluff.50a1c4b6.func_pm_class_rm_funcs__2e80wq0e
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
LintingResult missing check_tuples method after refactoring #### Description After some recent changes, the `LintingResult` class is missing the `check_tuples()` method, causing `AttributeError` when trying to call it. #### Steps/Code to Reproduce ```python from sqlfluff import Linter lntr = Linter() result = lntr...
diff --git a/src/sqlfluff/core/linter/linting_result.py b/src/sqlfluff/core/linter/linting_result.py index f2dc345..4e6ea60 100644 --- a/src/sqlfluff/core/linter/linting_result.py +++ b/src/sqlfluff/core/linter/linting_result.py @@ -63,22 +63,6 @@ class LintingResult: """Stop the linting timer.""" sel...
["test/core/linter/linter_test.py::test__linter__linting_result_check_tuples", "test/core/linter/linter_test.py::test_unparsable_fix_output[False]", "test/core/linter/linter_test.py::test_unparsable_fix_output[True]"]
["test/core/linter/discovery_test.py::test__linter__path_from_paths__dir", "test/core/linter/discovery_test.py::test__linter__path_from_paths__default", "test/core/linter/discovery_test.py::test__linter__path_from_paths__exts", "test/core/linter/discovery_test.py::test__linter__path_from_paths__file", "test/core/linter...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
68
3
858
0
0.6
1
0.75
1
0.369667
81.384
4,658
swe_smith::train::162
swe_smith
train
162
oauthlib__oauthlib.1fd52536.combine_file__wrnd3hwj
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RequestValidator methods should raise NotImplementedError instead of returning values Description Several methods in the RequestValidator class have been implemented with concrete return values instead of raising NotImplementedError. This breaks the contract that subclasses are expected to implement these methods. F...
diff --git a/oauthlib/oauth2/rfc6749/request_validator.py b/oauthlib/oauth2/rfc6749/request_validator.py index 6d6ebaa..6b2c573 100644 --- a/oauthlib/oauth2/rfc6749/request_validator.py +++ b/oauthlib/oauth2/rfc6749/request_validator.py @@ -181,7 +181,7 @@ class RequestValidator: Method is used by: ...
["tests/oauth2/rfc6749/test_request_validator.py::RequestValidatorTest::test_method_contracts"]
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
34
1
1,536
0
0.6
1
0.75
1
0.369333
81.383
4,659
r2e_gym::train::6281
r2e_gym
train
6,281
pillow__b142560488c77acc5319f98964224b4c576f58ef
pillow
python-pillow/pillow
python
b142560488c77acc5319f98964224b4c576f58ef
**Title:** `regular_polygon` Method Fails with `bounding_circle` as `((x, y), r)` **Description:** When using the `regular_polygon` method from `PIL.ImageDraw`, providing the `bounding_circle` parameter in the format `((x, y), r)` results in an error. The method was originally designed to accept `bounding_circle` as a...
diff --git a/docs/reference/ImageDraw.rst b/docs/reference/ImageDraw.rst --- a/docs/reference/ImageDraw.rst +++ b/docs/reference/ImageDraw.rst @@ -255,17 +255,19 @@ :param fill: Color to use for the fill. -.. py:method:: ImageDraw.regular_polygon(b_circle, n_sides, rotation=0, fill=None, outline=None) - - D...
diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -1107,7 +1107,8 @@ else f"{filename_base}_rotate_{rotation}.png" ) draw = ImageDraw.Draw(im) - draw.regular_polygon([W // 2, H // 2, 25], n_sides, rotation=rotation, fill="...
null
null
namanjain12/pillow_final:b142560488c77acc5319f98964224b4c576f58ef
true
null
2
81
null
1,308
0
0.75
1
0.6375
1
0.488
81.38275
4,660
swe_smith::train::24538
swe_smith
train
24,538
sunpy__sunpy.f8edfd5c.combine_module__t4pzblnh
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Missing variable definitions in EVE and NOAA timeseries modules I found some issues with the EVE and NOAA timeseries modules that cause errors when trying to use them. ## EVE TimeSeries Issue When trying to parse an EVE Level 0CS file, I'm getting errors because several variables are being used before they're defi...
diff --git a/sunpy/timeseries/sources/eve.py b/sunpy/timeseries/sources/eve.py index c92060b..420079a 100644 --- a/sunpy/timeseries/sources/eve.py +++ b/sunpy/timeseries/sources/eve.py @@ -279,17 +279,13 @@ class EVESpWxTimeSeries(GenericTimeSeries): """ Parses and EVE Level 0CS file. """ - ...
["sunpy/timeseries/sources/tests/test_eve.py::test_eve", "sunpy/timeseries/sources/tests/test_noaa.py::test_noaa_json_ind_plot_column"]
["sunpy/timeseries/sources/tests/test_eve.py::test_implicit_esp", "sunpy/timeseries/sources/tests/test_eve.py::test_esp", "sunpy/timeseries/sources/tests/test_eve.py::test_esp_plot_column", "sunpy/timeseries/sources/tests/test_noaa.py::test_noaa_ind_json", "sunpy/timeseries/sources/tests/test_noaa.py::test_noaa_pre_jso...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
33
2
1,555
0
0.6
1
0.75
1
0.369167
81.3825
4,661
swe_smith::train::22580
swe_smith
train
22,580
graphql-python__graphene.82903263.combine_file__io1m70nd
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
# DataLoader broken after recent changes **Describe the bug** I'm experiencing issues with the DataLoader utility after updating to the latest version. The DataLoader is not properly loading data and is returning `None` instead of the expected Future object. ## Code that reproduces the issue ```python from graphene....
diff --git a/graphene/utils/dataloader.py b/graphene/utils/dataloader.py index c75b9ee..f25a857 100644 --- a/graphene/utils/dataloader.py +++ b/graphene/utils/dataloader.py @@ -43,7 +43,7 @@ class DataLoader(object): ), "batch_load_fn must be coroutine. Received: {}".format(self.batch_load_fn) if no...
["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_can_build_a_data_loader_from_a_partial", "graphene/utils/tests/test_dataloader.py::test_supports_loading_multiple_keys_in_one_call...
["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
1
35
19
1,513
0
0.6
1
0.75
1
0.368833
81.3815
4,662
swe_smith::train::27797
swe_smith
train
27,797
arrow-py__arrow.1d70d009.lm_rewrite__5thf82v0
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
# Timezone parsing issues with invalid timezone strings When trying to use invalid timezone strings, the parser is not properly raising errors and is instead returning UTC timezone. ## Background The timezone parser in Arrow should reject invalid timezone strings and raise a `ParserError`, but it's currently falling...
diff --git a/arrow/parser.py b/arrow/parser.py index 3929788..e55915a 100644 --- a/arrow/parser.py +++ b/arrow/parser.py @@ -904,33 +904,26 @@ class TzinfoParser: :rtype: datetime.timezone :raises ParserError: If the timezone string cannot be parsed. """ - tzinfo: Optional[dt_tzinfo] =...
["tests/test_arrow.py::TestArrowUtil::test_get_tzinfo", "tests/test_factory.py::TestGet::test_kwarg_tzinfo_string", "tests/test_parser.py::TestDateTimeParserISO::test_invalid_Z", "tests/test_parser.py::TestTzinfoParser::test_parse_utc", "tests/test_parser.py::TestTzinfoParser::test_parse_fails"]
["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
49
5
1,233
0
0.6
1
0.75
1
0.368833
81.3815
4,663
swe_smith::train::26544
swe_smith
train
26,544
pylint-dev__astroid.b114f6b5.lm_rewrite__7r1yx0gm
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
# Module import fails when module is already in sys.modules ## Description When trying to import a module that is already in `sys.modules`, the code fails with an `ImportError` instead of returning the cached module. This behavior is inconsistent with Python's import system which should return the cached module when ...
diff --git a/astroid/modutils.py b/astroid/modutils.py index 29d09f8..15456bd 100644 --- a/astroid/modutils.py +++ b/astroid/modutils.py @@ -169,31 +169,11 @@ def load_module_from_name(dotted_name: str) -> types.ModuleType: :return: the loaded module """ try: - return sys.modules[dotted_name] - ...
["tests/test_modutils.py::test_import_dotted_library"]
["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
30
1
1,612
0
0.6
1
0.75
1
0.368667
81.381
4,664
swe_smith::train::24447
swe_smith
train
24,447
sunpy__sunpy.f8edfd5c.combine_file__3a6gzrfy
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Variable initialization and order issues in GenericMap class ## Description I've discovered a bug in the `GenericMap` class where variables are being used before they're properly initialized. This is causing several issues when working with map objects. When trying to create and display a map, I'm getting errors l...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..e09d578 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -294,12 +294,8 @@ class GenericMap(NDData): def _text_summary(self): dt = self.exposure_time - wave = self.wavelength - measurement = self.measure...
["sunpy/map/tests/test_mapbase.py::test_wcs", "sunpy/map/tests/test_mapbase.py::test_name", "sunpy/map/tests/test_mapbase.py::test_coordinate_system", "sunpy/map/tests/test_mapbase.py::test_default_coordinate_system", "sunpy/map/tests/test_mapbase.py::test_coordinate_system_solar_x_solar_y", "sunpy/map/tests/test_mapba...
["sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase.py::test_f...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
42
12
1,372
0
0.6
1
0.75
1
0.368667
81.381
4,665
swe_smith::train::18526
swe_smith
train
18,526
HIPS__autograd.ac044f0d.lm_rewrite__cetfos0u
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Bug Description It seems there's an issue with the recent changes in the FFT gradient calculations. The `irfft` and `rfft` functions are not handling certain input shapes correctly, leading to unexpected behavior during gradient checks. This is causing several tests related to FFT operations to fail. ### Steps to...
diff --git a/autograd/numpy/fft.py b/autograd/numpy/fft.py index e401b4c..3b8dfff 100644 --- a/autograd/numpy/fft.py +++ b/autograd/numpy/fft.py @@ -52,28 +52,33 @@ def rfft_grad(get_args, irfft_fun, ans, x, *args, **kwargs): def irfft_grad(get_args, rfft_fun, ans, x, *args, **kwargs): - axes, gs, norm = get_ar...
["tests/test_fft.py::test_rfftn_subset", "tests/test_fft.py::test_rfftn_axes", "tests/test_fft.py::test_rfft2_s", "tests/test_fft.py::test_irfftn", "tests/test_fft.py::test_irfft2_s", "tests/test_fft.py::test_irfftn_subset", "tests/test_fft.py::test_rfftn_s", "tests/test_fft.py::test_irfftn_s", "tests/test_fft.py::test...
["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
35
19
1,511
0
0.6
1
0.75
1
0.3685
81.3805
4,666
swe_smith::train::9776
swe_smith
train
9,776
marshmallow-code__webargs.dbde72fe.lm_rewrite__y3kee8nt
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
### Issue with DelimitedFieldMixin Deserialization #### Description I've encountered an issue with the `DelimitedFieldMixin` when attempting to deserialize certain inputs. Specifically, when using `DelimitedList` or `DelimitedTuple`, the deserialization process does not handle empty strings or lists as expected. This...
diff --git a/src/webargs/fields.py b/src/webargs/fields.py index edd670e..9e31a2c 100644 --- a/src/webargs/fields.py +++ b/src/webargs/fields.py @@ -78,15 +78,20 @@ class DelimitedFieldMixin: ) def _deserialize(self, value, attr, data, **kwargs): - # attempting to deserialize from a non-string so...
["tests/test_core.py::test_delimited_list_empty_string", "tests/test_core.py::test_delimited_list_load_list_errors", "tests/test_core.py::test_delimited_tuple_load_list_errors", "tests/test_core.py::test_delimited_list_custom_empty_value", "tests/test_core.py::test_delimited_tuple_custom_empty_value", "tests/test_core....
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
19
6
1,830
0
0.6
1
0.75
1
0.368333
81.38
4,667
swe_smith::train::28164
swe_smith
train
28,164
Mimino666__langdetect.a1598f1a.combine_file__8ahfsx60
swesmith/Mimino666__langdetect.a1598f1a
mimino666/langdetect
python
null
# [Bug]: Language detection fails for all text inputs ## Description I'm experiencing a critical issue with the language detection functionality. When trying to detect the language of any text, the detector fails with a TypeError. This happens with various inputs including English, French, and Japanese text. ## Step...
diff --git a/langdetect/detector.py b/langdetect/detector.py index cc831a0..f1de582 100644 --- a/langdetect/detector.py +++ b/langdetect/detector.py @@ -54,18 +54,18 @@ class Detector(object): MAIL_RE = re.compile(r'[-_.0-9A-Za-z]{1,64}@[-_0-9A-Za-z]{1,255}[-_.0-9A-Za-z]{1,255}') def __init__(self, factory)...
["langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_detector4"]
["langdetect/tests/test_detector.py::DetectorTest::test_factory_from_json_string", "langdetect/tests/test_detector.py::DetectorTest::test_lang_list", "langdetect/tests/test_language.py::LanguageTest::test_cmp", "langdetect/tests/test_language.py::LanguageTest::test_language", "langdetect/tests/utils/test_lang_profile.p...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
true
null
1
47
4
1,269
0
0.6
1
0.75
1
0.368167
81.3795
4,668
swe_smith::train::21749
swe_smith
train
21,749
pexpect__ptyprocess.1067dbda.combine_file__z9xh0tlg
swesmith/pexpect__ptyprocess.1067dbda
pexpect/ptyprocess
python
null
# Multiple issues with PtyProcess close() and read_nonblocking() methods While working with the ptyprocess library, I've discovered several issues with the `PtyProcess` class that cause unexpected behavior: ## Issue 1: close() method raises exception when process is not alive When calling `close()` on a `PtyProcess`...
diff --git a/ptyprocess/ptyprocess.py b/ptyprocess/ptyprocess.py index 0f05803..d9bdfa6 100644 --- a/ptyprocess/ptyprocess.py +++ b/ptyprocess/ptyprocess.py @@ -397,15 +397,15 @@ class PtyProcess(object): the child is terminated (SIGKILL is sent if the child ignores SIGHUP and SIGINT). ''' if...
["tests/test_preexec_fn.py::PreexecFns::test_preexec", "tests/test_spawn.py::PtyTestCase::test_spawn_sh", "tests/test_spawn.py::PtyTestCase::test_spawn_sh_unicode"]
["tests/test_echo.py::PtyEchoTestCase::test_waitnoecho_forever", "tests/test_echo.py::PtyEchoTestCase::test_waitnoecho_timeout", "tests/test_invalid_binary.py::InvalidBinaryChars::test_invalid_binary", "tests/test_preexec_fn.py::PreexecFns::test_preexec_error", "tests/test_spawn.py::PtyTestCase::test_pass_fds", "tests/...
jyangballin/swesmith.x86_64.pexpect_1776_ptyprocess.1067dbda
true
null
1
20
3
1,809
0
0.6
1
0.75
1
0.368167
81.3795
4,669
swe_smith::train::5904
swe_smith
train
5,904
mahmoud__boltons.3bfcfdd0.combine_file__zrhbqatu
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
# Stats class in statsutils.py has incorrect sorting and quantile calculation I've found a bug in the `Stats` class in `boltons.statsutils`. The class is not correctly handling sorted data, which affects several statistical calculations. ## What happened? When using the `Stats` class to calculate statistics like min...
diff --git a/boltons/statsutils.py b/boltons/statsutils.py index 36a8223..b6289af 100644 --- a/boltons/statsutils.py +++ b/boltons/statsutils.py @@ -193,18 +193,10 @@ class Stats: return iter(self.data) def _get_sorted_data(self): - """When using a copy of the data, it's better to have that copy ...
["tests/test_statsutils.py::test_stats_basic", "tests/test_statsutils_histogram.py::test_check_sum", "tests/test_statsutils_histogram.py::test_norm_regression"]
["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac...
jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0
true
null
1
28
3
1,648
0
0.6
1
0.75
1
0.368
81.379
4,670
swe_smith::train::1628
swe_smith
train
1,628
Cog-Creators__Red-DiscordBot.33e0eac7.lm_rewrite__1xt89hhu
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
# [Bug]: Downloader cog fails when info.json file is missing ## Description When using the downloader cog to manage repositories, it now fails when a repository doesn't have an info.json file. Previously, the cog would gracefully handle missing info files by creating an empty dictionary, but now it raises a FileNotFo...
diff --git a/redbot/cogs/downloader/json_mixins.py b/redbot/cogs/downloader/json_mixins.py index 441d016..e293009 100644 --- a/redbot/cogs/downloader/json_mixins.py +++ b/redbot/cogs/downloader/json_mixins.py @@ -23,25 +23,20 @@ class RepoJSONMixin: self._read_info_file() def _read_info_file(self) -> No...
["tests/cogs/downloader/test_downloader.py::test_existing_git_repo", "tests/cogs/downloader/test_downloader.py::test_add_repo", "tests/cogs/downloader/test_downloader.py::test_remove_repo"]
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
1
39
3
1,428
0
0.6
1
0.75
1
0.368
81.379
4,671
swe_smith::train::18361
swe_smith
train
18,361
msiemens__tinydb.10644a0e.func_pm_ctrl_shuffle__qppw079o
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
# upsert method always inserts a new document instead of updating existing ones ## Description I've found a bug in the `upsert` method of TinyDB. The method is supposed to update documents if they exist, or insert them if they don't. However, it's currently always inserting a new document regardless of whether a matc...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..088c8c3 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -511,6 +511,16 @@ class Table: return updated_ids def upsert(self, document: Mapping, cond: Optional[QueryLike] = None) -> List[int]: + + # There are no documents that match...
["tests/test_tinydb.py::test_upsert[memory]", "tests/test_tinydb.py::test_upsert[json]", "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
21
4
1,787
0
0.6
1
0.75
1
0.367833
81.3785
4,672
swe_smith::train::10145
swe_smith
train
10,145
paramiko__paramiko.23f92003.combine_file__lasxfpw4
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH authentication logic broken after recent changes #### Description SSH authentication is failing in unexpected ways. When attempting to authenticate with password or public key, the authentication process behaves incorrectly - sometimes succeeding when it should fail, and sometimes failing when it should succeed. ...
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py index bc7f298..d2829b5 100644 --- a/paramiko/auth_handler.py +++ b/paramiko/auth_handler.py @@ -265,18 +265,18 @@ class AuthHandler: def _parse_service_request(self, m): service = m.get_text() - if self.transport.server_mode and (se...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/test_client.py::SSHClientTest::test_multiple_key_files", "tests/test_client.py::SSHClientTest::test_multiple_key_files_failure", "tests/test_client.py::PasswordPassphraseTest...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
39
6
1,426
0
0.6
1
0.75
1
0.367667
81.378
4,673
swe_smith::train::138
swe_smith
train
138
oauthlib__oauthlib.1fd52536.combine_file__ths48j4y
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Custom validators swapped and CORS headers broken #### Description The custom validator setup is incorrectly mapping validator types, causing authorization validators to be assigned to token validator slots and vice versa. Additionally, CORS header logic appears to be inverted - secure origins are being rejected whil...
diff --git a/oauthlib/oauth2/rfc6749/grant_types/base.py b/oauthlib/oauth2/rfc6749/grant_types/base.py index d96a2db..d4ec59b 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/base.py +++ b/oauthlib/oauth2/rfc6749/grant_types/base.py @@ -93,19 +93,18 @@ class GrantTypeBase: setattr(self, kw, val) def...
["tests/oauth2/rfc6749/grant_types/test_authorization_code.py::AuthorizationCodeGrantTest::test_create_cors_headers", "tests/oauth2/rfc6749/grant_types/test_authorization_code.py::AuthorizationCodeGrantTest::test_create_cors_headers_insecure_origin", "tests/oauth2/rfc6749/grant_types/test_authorization_code.py::Authori...
["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
37
46
1,466
0
0.6
1
0.75
1
0.367667
81.378
4,674
swe_smith::train::34432
swe_smith
train
34,432
iterative__dvc.1d6ea681.pr_8282
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
# Error in `_data_versions_count` function in plots command While working with the plots command, I noticed an issue with the `_data_versions_count` function in the plots.py file. The function is trying to get the length of a set of values, but it's not properly accessing the data from the renderer. ## Description W...
diff --git a/dvc/commands/plots.py b/dvc/commands/plots.py index 16ff35e..2e614d6 100644 --- a/dvc/commands/plots.py +++ b/dvc/commands/plots.py @@ -50,6 +50,38 @@ def _show_json( ui.write_json(compact({"errors": all_errors, "data": data}), highlight=False) +def _adjust_vega_renderers(renderers): + from dvc...
["tests/integration/plots/test_plots.py::test_no_plots", "tests/integration/plots/test_plots.py::test_repo_with_plots", "tests/integration/plots/test_plots.py::test_repo_with_removed_plots", "tests/integration/plots/test_plots.py::test_config_output_dir", "tests/integration/plots/test_plots.py::test_repo_with_config_pl...
["tests/unit/command/test_plots.py::test_should_pass_template_dir", "tests/unit/command/test_plots.py::test_plots_templates[t1-\"{'t1'}\"-0]", "tests/unit/command/test_plots.py::test_plots_templates[None-t1\\nt2-0]", "tests/unit/command/test_plots.py::test_plots_templates[t3--1]", "tests/unit/command/test_plots.py::tes...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
3
56
22
1,085
0
0.6
1
0.75
1
0.3675
81.3775
4,675
swe_smith::train::1916
swe_smith
train
1,916
agronholm__typeguard.b6a7e438.func_pm_remove_cond__oomrm2nz
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Callable type checking not working for argument validation #### Description When checking if a callable matches a `Callable` type annotation, the argument count and signature validation is not being performed. Functions with incorrect number of arguments or mandatory keyword-only arguments are incorrectly passing typ...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..8213680 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -152,56 +152,6 @@ def check_callable( if not callable(value): raise TypeCheckError("is not callable") - if args: - try: - ...
["tests/test_checkers.py::TestCallable::test_too_few_arguments", "tests/test_checkers.py::TestCallable::test_too_many_arguments", "tests/test_checkers.py::TestCallable::test_mandatory_kwonlyargs"]
["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
50
3
1,204
0
0.6
1
0.75
1
0.367333
81.377
4,676
swe_smith::train::31689
swe_smith
train
31,689
benoitc__gunicorn.bacbf8aa.lm_rewrite__jfyc5u5f
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
# StatsD address validation broken **Describe the bug** When configuring StatsD in Gunicorn, I'm getting errors with addresses that used to work fine. The validation for StatsD addresses seems to be broken. **To Reproduce** I'm trying to use the following StatsD configurations: ```python # This used to work but now ...
diff --git a/gunicorn/config.py b/gunicorn/config.py index 402a26b..5050b2c 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -512,25 +512,32 @@ def validate_chdir(val): def validate_statsd_address(val): - val = validate_string(val) if val is None: return None - - # As of major releas...
["tests/test_config.py::test_statsd_host", "tests/test_config.py::test_statsd_host_with_unix_as_hostname", "tests/test_statsd.py::test_statsd_host_initialization"]
["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
39
3
1,422
0
0.6
1
0.75
1
0.367
81.376
4,677
swe_smith::train::49409
swe_smith
train
49,409
mozilla__bleach.73871d76.func_pm_class_shuffle_funcs__9w1txkpx
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
NameError in html5parser after method reorganization #### Description After recent changes to the html5parser module, many functions are throwing `NameError` exceptions when trying to access methods that appear to have been moved or reorganized within the `InCellPhase` class. #### Steps/Code to Reproduce ```python ...
diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py index 5427b7d..15da5aa 100644 --- a/bleach/_vendor/html5lib/html5parser.py +++ b/bleach/_vendor/html5lib/html5parser.py @@ -2212,19 +2212,19 @@ def getPhases(debug): # http://www.whatwg.org/specs/web-apps/current-work/...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["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
61
185
982
0
0.6
1
0.75
1
0.367
81.376
4,678
swe_smith::train::30504
swe_smith
train
30,504
gweis__isodate.17cb25eb.combine_file__ro4209l9
swesmith/gweis__isodate.17cb25eb
gweis/isodate
python
null
time_isoformat function broken with argument order change #### Description The `time_isoformat` function is not working correctly after recent changes. When trying to format time objects, it raises a `TypeError` about argument order. #### Steps/Code to Reproduce ```python from datetime import time from isodate impo...
diff --git a/src/isodate/isotime.py b/src/isodate/isotime.py index 78b4de2..d030250 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
69
66
821
0
0.6
1
0.75
1
0.366833
81.3755
4,679
swe_smith::train::43010
swe_smith
train
43,010
gawel__pyquery.811cd048.combine_file__kvj1j11b
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
# Multiple PyQuery methods broken after recent changes ## Description I've been using PyQuery in my project and after updating to the latest version, several methods are not working as expected. The issues seem to be widespread across different parts of the library. ## To Reproduce Here's a simple example that demo...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..46185bc 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -151,9 +151,9 @@ class FlexibleElement(object): def __set__(self, instance, value): if self.pset is not no_default: - self.pset(instance, value) + ...
["docs/css.rst::css.rst", "docs/manipulating.rst::manipulating.rst", "docs/traversing.rst::traversing.rst", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.__str__", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.filter", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.hide", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.html",...
["README.rst::README.rst", "docs/attributes.rst::attributes.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "pyquery/cssselectpatch.py::pyquery.cssselectpatch.JQueryTranslator.xpath_button_pseudo", "pyquery/cssselectpatch.py::pyquery.cssselectpatch.JQueryTran...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
26
31
1,680
0
0.6
1
0.75
1
0.366667
81.375
4,680
swe_smith::train::8235
swe_smith
train
8,235
cantools__cantools.0c6a7871.lm_rewrite__7d7x3i7n
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
#### Description Encountered an issue where certain functions in the `cantools` library are unexpectedly raising a `TypeError`. The error message indicates that a `'str' object is not callable`. This seems to occur when attempting to convert or dump KCD formatted data. #### Steps/Code to Reproduce To reproduce the i...
diff --git a/src/cantools/database/can/formats/kcd.py b/src/cantools/database/can/formats/kcd.py index a54c86c..1025156 100644 --- a/src/cantools/database/can/formats/kcd.py +++ b/src/cantools/database/can/formats/kcd.py @@ -435,33 +435,34 @@ def _dump_messages(messages, node_refs, parent, sort_signals): _dump...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_convert.py::CanToolsConvertFullTest::test_kcd_dump_default_sort_signals", "tests/test_database.py::CanToolsDatabaseTest::test_as_kcd_string", "tests/test_database.py::CanToolsDatabaseTest::test_vehicle"]
["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
49
4
1,220
0
0.6
1
0.75
1
0.366667
81.375
4,681
swe_smith::train::45049
swe_smith
train
45,049
mahmoud__glom.fb3c4e76.lm_rewrite__c2jyxhuv
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
Error Handling in _unpack_stack Function Fails with AttributeError I've encountered an issue with the `_unpack_stack` function in the `glom` library. It seems that the recent changes have introduced a problem when handling error stacks. Specifically, the function now raises an `AttributeError` when processing certain ...
diff --git a/glom/core.py b/glom/core.py index cee71a3..1caa7fa 100644 --- a/glom/core.py +++ b/glom/core.py @@ -198,35 +198,33 @@ def _unpack_stack(scope, only_errors=True): only_errors=False could be useful for debugger / introspection (similar to traceback.print_stack()) """ - stack = [] - scope...
["glom/test/test_check.py::test_check_basic", "glom/test/test_error.py::test_line_trace", "glom/test/test_error.py::test_regular_error_stack", "glom/test/test_error.py::test_glom_error_stack", "glom/test/test_error.py::test_glom_error_double_stack", "glom/test/test_error.py::test_branching_stack", "glom/test/test_error...
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
56
14
1,078
0
0.6
1
0.75
1
0.366333
81.374
4,682
swe_smith::train::46201
swe_smith
train
46,201
conan-io__conan.86f29e13.pr_14338
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### Build Mode Pattern Handling Issue I've encountered an issue with the handling of build patterns in the `BuildMode` class. It seems that the recent changes have introduced unexpected behavior when using the `--build=missing:pattern` and `--build=missing:~pattern` syntax. ### Expected Behavior When using the `--bu...
diff --git a/conans/client/graph/build_mode.py b/conans/client/graph/build_mode.py index 0426520..88d4a1b 100644 --- a/conans/client/graph/build_mode.py +++ b/conans/client/graph/build_mode.py @@ -37,20 +37,14 @@ class BuildMode: else: if param.startswith("missing:"): ...
["test/integration/command/create_test.py::test_create_no_user_channel", "test/integration/command/create_test.py::test_create_build_missing_negation"]
["test/integration/command/create_test.py::test_dependencies_order_matches_requires", "test/integration/command/create_test.py::test_create", "test/integration/command/create_test.py::test_error_create_name_version", "test/integration/command/create_test.py::test_create_user_channel", "test/integration/command/create_t...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
24
2
1,717
0
0.6
1
0.75
1
0.366167
81.3735
4,683
swe_smith::train::32386
swe_smith
train
32,386
pydantic__pydantic.acb0f10f.combine_file__qppbtrpx
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Pipeline validation fails with UnboundLocalError when using handler function #### Description When using the experimental pipeline functionality, validation fails with an `UnboundLocalError` because the `handler` function is referenced before it's defined in the `_check_func` function. #### Steps/Code to Reproduce ...
diff --git a/pydantic/experimental/pipeline.py b/pydantic/experimental/pipeline.py index 9a3dbc4..20133a0 100644 --- a/pydantic/experimental/pipeline.py +++ b/pydantic/experimental/pipeline.py @@ -361,18 +361,17 @@ transform = _Pipeline[Any, Any]((_ValidateAs(_FieldTypeMarker),)).transform def _check_func( func: ...
["tests/test_docs.py::test_docs_examples[docs/concepts/experimental.md:46-79]", "tests/test_pipeline.py::test_parse_str[potato]", "tests/test_pipeline.py::test_parse_str_with_pattern", "tests/test_pipeline.py::test_ge_le_gt_lt[int-pipeline0-valid_cases0-invalid_cases0]", "tests/test_pipeline.py::test_ge_le_gt_lt[float-...
["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
52
56
1,157
0
0.6
1
0.75
1
0.366167
81.3735
4,684
swe_smith::train::45415
swe_smith
train
45,415
dask__dask.5f61e423.lm_rewrite__ei4edmzw
swesmith/dask__dask.5f61e423
dask/dask
python
null
### Issue: Inconsistent Behavior in `shuffle_slice` Function #### Description It seems that the recent changes to the `shuffle_slice` function have introduced an inconsistency when handling certain input shapes and chunk sizes. Specifically, the function is not correctly managing cases where the chunks and shape dime...
diff --git a/dask/array/slicing.py b/dask/array/slicing.py index aebbfbf..5c9dd7b 100644 --- a/dask/array/slicing.py +++ b/dask/array/slicing.py @@ -1208,16 +1208,33 @@ def shuffle_slice(x, index): ------- Array """ - from dask.array.core import PerformanceWarning - - chunks1 = chunks2 = x.chunks -...
["dask/array/tests/test_slicing.py::test_shuffle_slice[size0-chunks0]", "dask/array/tests/test_slicing.py::test_shuffle_slice[size1-chunks1]"]
["dask/array/tests/test_slicing.py::test_slice_1d", "dask/array/tests/test_slicing.py::test_slice_singleton_value_on_boundary", "dask/array/tests/test_slicing.py::test_slice_array_1d", "dask/array/tests/test_slicing.py::test_slice_array_2d", "dask/array/tests/test_slicing.py::test_slice_optimizations", "dask/array/test...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
37
2
1,456
0
0.6
1
0.75
1
0.366
81.373
4,685
swe_smith::train::18638
swe_smith
train
18,638
seperman__deepdiff.ed252022.combine_file__24qpwc9c
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
# AnySet equality and length calculation broken ## Description In the latest version of deepdiff, the AnySet class has several issues that make it unusable. The implementation of `__eq__` and `__len__` methods has been changed, causing incompatibility with existing code. The equality comparison (`__eq__`) now expect...
diff --git a/deepdiff/anyset.py b/deepdiff/anyset.py index cd87ac3..1660cf5 100644 --- a/deepdiff/anyset.py +++ b/deepdiff/anyset.py @@ -42,18 +42,36 @@ class AnySet: return self._hash_to_objects.pop(next(iter(self._hash_to_objects))) def __eq__(self, other): - set_part, hashes_to_objs_part =...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1"]
["tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_do_not_overlap", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_overlap", "tests/test_cache.py::TestCache::test_...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
28
4
1,636
0
0.6
1
0.75
1
0.366
81.373
4,686
swe_smith::train::45849
swe_smith
train
45,849
conan-io__conan.86f29e13.lm_rewrite__9icge7kg
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### Bug Report: Profile Parsing Fails with Incorrect Include Statements **Description** It seems there's an issue with the profile parser when handling include statements. The parser fails to correctly identify and process include statements that do not follow the expected format. This behavior is observed in the lat...
diff --git a/conan/internal/api/profile/profile_loader.py b/conan/internal/api/profile/profile_loader.py index 5ed77b1..d925fed 100644 --- a/conan/internal/api/profile/profile_loader.py +++ b/conan/internal/api/profile/profile_loader.py @@ -199,23 +199,23 @@ class _ProfileParser: """ self.includes = [...
["test/unittests/client/profile_loader/profile_loader_test.py::test_profile_parser"]
["test/unittests/client/profile_loader/profile_loader_test.py::test_profiles_includes", "test/unittests/client/profile_loader/profile_loader_test.py::test_profile_compose_platform_tool_requires", "test/unittests/client/profile_loader/profile_loader_test.py::test_profile_compose_tool_requires", "test/unittests/client/pr...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
26
1
1,676
0
0.6
1
0.75
1
0.366
81.373
4,687
swe_smith::train::35424
swe_smith
train
35,424
alecthomas__voluptuous.a7a55f83.lm_rewrite__6q829zhi
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
# Set validation fails with missing SetInvalid error class ## Description When trying to validate sets or frozensets using Schema, I'm getting an error about a missing error class: ```python import voluptuous as v schema = v.Schema({int}) schema(set([1, 2, 3])) # Should work schema(set(['abc'])) # Should fail w...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..5760600 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -650,33 +650,34 @@ class Schema(object): >>> with raises(er.MultipleInvalid, 'invalid value in set'): ... validator(set(['a'...
["voluptuous/tests/tests.py::test_set_of_integers", "voluptuous/tests/tests.py::test_frozenset_of_integers", "voluptuous/tests/tests.py::test_set_of_integers_and_strings", "voluptuous/tests/tests.py::test_frozenset_of_integers_and_strings"]
["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
45
4
1,296
0
0.6
1
0.75
1
0.366
81.373
4,688
swe_bench::test::1567
swe_bench
test
1,567
scikit-learn__scikit-learn-12908
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
314686a65d543bd3b36d2af4b34ed23711991a57
OneHotEncoder - add option for 1 of k-1 encoding Like the title says. Would it be possible to add an option, say "independent = True" to OneHotEncoder that would return a 1 of k-1 encoding instead of a 1 of k encoding. This would be very useful to me when I am encoding categorical variables since the 1 of k encoding ad...
I guess we could do that as many people ask about it. I don't think there is that much of a point in doing that. Nearly all the models in scikit-learn are regularized, so this doesn't matter afaik. I guess you are using a linear model? @vighneshbirodkar is working on the `OneHotEncoder`, it might be worth waiting till...
diff --git a/sklearn/preprocessing/_encoders.py b/sklearn/preprocessing/_encoders.py --- a/sklearn/preprocessing/_encoders.py +++ b/sklearn/preprocessing/_encoders.py @@ -2,7 +2,6 @@ # Joris Van den Bossche <jorisvandenbossche@gmail.com> # License: BSD 3 clause - import numbers import warnings @@ -158,...
diff --git a/sklearn/preprocessing/tests/test_encoders.py b/sklearn/preprocessing/tests/test_encoders.py --- a/sklearn/preprocessing/tests/test_encoders.py +++ b/sklearn/preprocessing/tests/test_encoders.py @@ -96,6 +96,20 @@ def test_one_hot_encoder_sparse(): enc.fit([[0], [1]]) assert_raises(ValueError,...
["sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_sparse", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_inverse[None-False]", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_inverse[None-True]", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_enc...
["sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_dense", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_deprecationwarnings", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_encoder_force_new_behaviour", "sklearn/preprocessing/tests/test_encoders.py::test_one_hot_enc...
null
true
2019-01-03T04:21:02Z
1
204
13
2,319
0
0.8
1
0.7
0.75
0.8865
81.372
4,689
swe_smith::train::6891
swe_smith
train
6,891
joke2k__faker.8b401a7d.lm_rewrite__v7i1xydo
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
Parsing Date Strings with Non-Standard Formats Fails Description (last modified by Alex Johnson) It seems there's an issue with parsing date strings when using non-standard formats. Specifically, when attempting to parse strings that include time deltas with years, the function raises a TypeError. This occurs when t...
diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py index f05538e..bd870f5 100644 --- a/faker/providers/date_time/__init__.py +++ b/faker/providers/date_time/__init__.py @@ -2014,30 +2014,44 @@ class Provider(BaseProvider): return cls._parse_date_time(value) + @cla...
["tests/providers/test_credit_card.py::TestRuRu::test_credit_card_full", "tests/providers/test_credit_card.py::TestUkUa::test_credit_card_full", "tests/providers/test_date_time.py::TestDateTime::test_date_between", "tests/providers/test_date_time.py::TestDateTime::test_date_between_months", "tests/providers/test_date_t...
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
56
13
1,074
0
0.6
1
0.75
1
0.365667
81.372
4,690
swe_smith::train::1165
swe_smith
train
1,165
jd__tenacity.0d40e76f.func_pm_ctrl_shuffle__ny0tmyi3
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
before_sleep_log function returns before defining log_it function When using the before_sleep_log function with a retry operation, the retry operation fails because the function returns before the log_it function is defined. This causes the retry operation to fail when it tries to log information before sleeping. ###...
diff --git a/tenacity/before_sleep.py b/tenacity/before_sleep.py index 153edb7..bf04dc8 100644 --- a/tenacity/before_sleep.py +++ b/tenacity/before_sleep.py @@ -33,14 +33,29 @@ def before_sleep_log( log_level: int, exc_info: bool = False, ) -> typing.Callable[["RetryCallState"], None]: + + return log_it ...
["tests/test_tenacity.py::TestBeforeAfterAttempts::test_before_sleep_log_raises", "tests/test_tenacity.py::TestBeforeAfterAttempts::test_before_sleep_log_raises_with_exc_info", "tests/test_tenacity.py::TestBeforeAfterAttempts::test_before_sleep_log_returns", "tests/test_tenacity.py::TestBeforeAfterAttempts::test_before...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
34
4
1,514
0
0.6
1
0.75
1
0.365667
81.372
4,691
swe_smith::train::34140
swe_smith
train
34,140
iterative__dvc.1d6ea681.combine_module__ixxgp1s2
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
# Cloud filesystem configuration breaks with recent changes I've discovered an issue with the cloud filesystem configuration in DVC. After recent changes, it seems that the code for resolving remote URLs and configuring cloud filesystems is broken. ## To Reproduce Here's a minimal example that demonstrates the issue...
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
30
2
1,593
0
0.6
1
0.75
1
0.3655
81.3715
4,692
swe_smith::train::1960
swe_smith
train
1,960
agronholm__typeguard.b6a7e438.lm_rewrite__f4wpz3g8
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Staticmethods and classmethods not being type checked when using @typechecked I've found an issue with the `@typechecked` decorator when used with classes that have `@staticmethod` or `@classmethod` methods. The type checking is not being applied to these methods. ## Description When a class is decorated with `@ty...
diff --git a/src/typeguard/_utils.py b/src/typeguard/_utils.py index e8f9b03..ab6e7cb 100644 --- a/src/typeguard/_utils.py +++ b/src/typeguard/_utils.py @@ -143,12 +143,31 @@ def resolve_reference(reference: str) -> Any: def is_method_of(obj: object, cls: type) -> bool: - return ( - inspect.isfunction(ob...
["tests/test_instrumentation.py::test_type_checked_staticmethod[typechecked]", "tests/test_typechecked.py::test_classmethod", "tests/test_typechecked.py::test_staticmethod", "tests/test_typechecked.py::test_getter_setter"]
["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
31
4
1,573
0
0.6
1
0.75
1
0.3655
81.3715
4,693
swe_smith::train::47869
swe_smith
train
47,869
sqlfluff__sqlfluff.50a1c4b6.func_basic__ev9t5fab
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Looking at the patch and test output, I can see there's a bug in the `_handle_lint_result` method where the logic for handling template safe fixes and filter checks has been inverted, and there's also a bug where `new_lerrs` and `new_fixes` are being assigned the wrong values at the end. Based on the demonstration iss...
diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py index 1f00fb3..94f809b 100644 --- a/src/sqlfluff/core/rules/base.py +++ b/src/sqlfluff/core/rules/base.py @@ -620,45 +620,35 @@ class BaseRule(metaclass=RuleMetaclass): new_fixes: List[LintFix], root: BaseSegment, ) ->...
["test/core/rules/docstring_test.py::test_backtick_replace", "test/core/rules/noqa_test.py::test_linter_noqa", "test/core/rules/noqa_test.py::test_linter_noqa_disable", "test/core/rules/noqa_test.py::test_linter_disable_noqa_except", "test/core/rules/rules_test.py::test__rules__filter_unparsable", "test/core/rules/rule...
["test/core/rules/docstring_test.py::test_content_count[\\\\*\\\\*Anti-pattern\\\\*\\\\*-1]", "test/core/rules/docstring_test.py::test_keyword_anti_before_best", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input0-True]", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
34
6
1,513
0
0.6
1
0.75
1
0.3655
81.3715
4,694
swe_smith::train::5607
swe_smith
train
5,607
PyCQA__flake8.cf1542ce.lm_rewrite__azwlwsyj
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
# Missing logical lines statistics in FileChecker ## Description I've noticed that when running flake8 on files with syntax errors, the statistics for "logical lines" are missing from the output. This happens because the code is returning early from the `run_checks` method in `FileChecker` class when a syntax error i...
diff --git a/src/flake8/checker.py b/src/flake8/checker.py index 329a2cc..0f5fe56 100644 --- a/src/flake8/checker.py +++ b/src/flake8/checker.py @@ -525,16 +525,26 @@ class FileChecker: try: self.run_ast_checks() self.process_tokens() - except (SyntaxError, tokenize.TokenError)...
["tests/integration/test_main.py::test_tokenization_error_but_not_syntax_error", "tests/integration/test_main.py::test_tokenization_error_is_a_syntax_error", "tests/integration/test_main.py::test_benchmark_successful"]
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker....
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
1
26
3
1,672
0
0.6
1
0.75
1
0.365333
81.371
4,695
swe_smith::train::30753
swe_smith
train
30,753
mido__mido.a0158ff9.combine_module__jjtqxm4w
swesmith/mido__mido.a0158ff9
mido/mido
python
null
# MIDI message validation and decoding issues I've found several issues with the MIDI message validation and decoding in the latest version. The problems appear to be in the `mido/messages/checks.py` and `mido/messages/decode.py` files. ## Issue 1: Channel validation is inverted When trying to create a MIDI message ...
diff --git a/mido/messages/checks.py b/mido/messages/checks.py index 2d71918..0920eee 100644 --- a/mido/messages/checks.py +++ b/mido/messages/checks.py @@ -19,9 +19,9 @@ def check_type(type_): def check_channel(channel): - if not isinstance(channel, Integral): + if isinstance(channel, Integral): ra...
["../dev/tests/test_frozen.py::test_hashability", "../dev/tests/test_frozen.py::test_freeze_and_thaw", "../dev/tests/test_frozen.py::test_thawed_message_is_copy", "../dev/tests/test_frozen.py::test_is_frozen", "../dev/tests/test_frozen.py::test_frozen_repr", "../dev/tests/test_parser.py::test_parse", "../dev/tests/test...
["../dev/tests/test_frozen.py::test_frozen_meta_repr", "../dev/tests/test_frozen.py::test_frozen_unknown_meta_repr", "../dev/tests/test_parser.py::test_parse_stray_data", "../dev/tests/test_parser.py::test_parse_stray_status_bytes", "../dev/tests/test_parser.py::test_feed_byte", "../dev/tests/test_parser.py::test_feed"...
jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9
true
null
2
18
33
1,830
0
0.6
1
0.75
1
0.365
81.37
4,696
swe_smith::train::22612
swe_smith
train
22,612
graphql-python__graphene.82903263.combine_file__s4bd1j94
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
# Multiple issues with scalar type handling in graphene ## Description I've found several issues with the scalar type handling in graphene that cause unexpected behavior when serializing and parsing values. ## Steps to Reproduce ### Issue 1: Int scalar coercion is broken ```python from graphene.types.scalars import ...
diff --git a/graphene/types/scalars.py b/graphene/types/scalars.py index 8546bc8..02905c8 100644 --- a/graphene/types/scalars.py +++ b/graphene/types/scalars.py @@ -62,6 +62,9 @@ class Int(Scalar): @staticmethod def coerce_int(value): + if MIN_INT <= num <= MAX_INT: + return num + r...
["graphene/types/tests/test_scalar.py::test_ints", "graphene/types/tests/test_scalars_serialization.py::test_serializes_output_int", "graphene/types/tests/test_scalars_serialization.py::test_serializes_output_float", "graphene/types/tests/test_scalars_serialization.py::test_serializes_output_string"]
["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
1
17
4
1,848
0
0.6
1
0.75
1
0.364667
81.369
4,697
swe_smith::train::35715
swe_smith
train
35,715
stanfordnlp__dspy.651a4c71.func_pm_remove_assign__n8azewz7
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# [BUG] BootstrapFewShot teleprompter fails to restore predictor demos and loses track of predictors ## Reproduction Steps ```python import dspy from dspy.teleprompt import BootstrapFewShot # Create a simple module and dataset class SimpleModule(dspy.Module): def __init__(self, signature): super().__init...
diff --git a/dspy/teleprompt/bootstrap.py b/dspy/teleprompt/bootstrap.py index 81ab80a..d580db4 100644 --- a/dspy/teleprompt/bootstrap.py +++ b/dspy/teleprompt/bootstrap.py @@ -183,19 +183,16 @@ class BootstrapFewShot(Teleprompter): try: with dspy.settings.context(trace=[], **self.teacher_settings...
["tests/primitives/test_module.py::test_save_and_load_with_pkl", "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::t...
["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
10
11
1,987
0
0.6
1
0.75
1
0.3645
81.3685
4,698
swe_smith::train::47494
swe_smith
train
47,494
sqlfluff__sqlfluff.50a1c4b6.combine_file__prwthmos
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
LintedDir statistics and file handling broken after recent changes #### Description The linting results are showing incorrect statistics and file handling behavior. When running the linter, several issues are occurring: 1. Clean/unclean file counts are inverted 2. Source and templated character counts are swapped 3....
diff --git a/src/sqlfluff/core/linter/linted_dir.py b/src/sqlfluff/core/linter/linted_dir.py index 45304ff..f9a2399 100644 --- a/src/sqlfluff/core/linter/linted_dir.py +++ b/src/sqlfluff/core/linter/linted_dir.py @@ -67,12 +67,9 @@ class LintedDir: or may not persist the `file` object itself depending on the ...
["test/core/linter/linter_test.py::test__linter__skip_large_bytes[0-False]", "test/core/linter/linter_test.py::test__linter__skip_large_bytes[2000-False]", "test/core/linter/linter_test.py::test__linter__lint_string_vs_file[test/fixtures/linter/indentation_errors.sql]", "test/core/linter/linter_test.py::test__linter__l...
["test/core/linter/discovery_test.py::test__linter__path_from_paths__dir", "test/core/linter/discovery_test.py::test__linter__path_from_paths__default", "test/core/linter/discovery_test.py::test__linter__path_from_paths__exts", "test/core/linter/discovery_test.py::test__linter__path_from_paths__file", "test/core/linter...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
44
17
1,307
0
0.6
1
0.75
1
0.3645
81.3685
4,699
swe_smith::train::12098
swe_smith
train
12,098
lepture__mistune.bf54ef67.combine_file__ozl5jgqo
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
# Multiple issues with MarkdownRenderer #### Description I've found several issues with the `MarkdownRenderer` class that cause it to generate incorrect markdown output. The issues affect headings, reference links, and lists. #### Steps/Code to Reproduce ```python from mistune import create_markdown from mistune.re...
diff --git a/src/mistune/renderers/markdown.py b/src/mistune/renderers/markdown.py index b49081a..ac0a381 100644 --- a/src/mistune/renderers/markdown.py +++ b/src/mistune/renderers/markdown.py @@ -19,16 +19,19 @@ class MarkdownRenderer(BaseRenderer): out += '\n\n'.join(self.render_referrences(state)) + '\n' ...
["tests/test_renderers.py::TestRendererMarkdown::test_heading_001", "tests/test_renderers.py::TestRendererMarkdown::test_images_001", "tests/test_renderers.py::TestRendererMarkdown::test_links_001", "tests/test_renderers.py::TestRendererMarkdown::test_links_002", "tests/test_renderers.py::TestRendererMarkdown::test_lis...
["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
27
10
1,646
0
0.6
1
0.75
1
0.364333
81.368