selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
5,500
swe_smith::train::5151
swe_smith
train
5,151
agronholm__exceptiongroup.0b4f4937.func_pm_class_rm_funcs__bgr4pb5e
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
Context manager catch() doesn't work as expected #### Description The `catch()` context manager is not properly handling exceptions. When using it to catch exceptions, it seems like the context manager is not functioning correctly and exceptions are not being caught or handled as expected. #### Steps/Code to Reprodu...
diff --git a/src/exceptiongroup/_catch.py b/src/exceptiongroup/_catch.py index 0246568..a4ae99b 100644 --- a/src/exceptiongroup/_catch.py +++ b/src/exceptiongroup/_catch.py @@ -21,32 +21,6 @@ class _Catcher: def __enter__(self) -> None: pass - def __exit__( - self, - etype: type[BaseExc...
["tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_no_match", "tests/test_catch.py::test_catch_single_no_match", "tests/test_catch.py::test_catch_full_match", "tests/test_catch.py::test_catch_handler_rai...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
27
11
1,256
0
0.6
1
0.75
1
0.299333
81.173
5,501
swe_smith::train::4910
swe_smith
train
4,910
bottlepy__bottle.a8dfef30.func_pm_class_rm_funcs__weo8gf3c
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
BaseRequest missing __init__ method causes TypeError on instantiation #### Description After recent changes, creating a BaseRequest instance fails with a TypeError because the `__init__` method has been removed. #### Steps/Code to Reproduce ```python import bottle # This should work but now raises TypeError reques...
diff --git a/bottle.py b/bottle.py index 286b5bc..52ef6c4 100755 --- a/bottle.py +++ b/bottle.py @@ -1146,13 +1146,6 @@ class BaseRequest(object): #: Maximum size of memory buffer for :attr:`body` in bytes. MEMFILE_MAX = 102400 - def __init__(self, environ=None): - """ Wrap a WSGI environ dictiona...
["test/test_auth.py::TestBasicAuth::test__header", "test/test_contextlocals.py::TestThreadLocals::test_request", "test/test_environ.py::TestRequest::test_app_property", "test/test_environ.py::TestRequest::test_auth", "test/test_environ.py::TestRequest::test_bigbody", "test/test_environ.py::TestRequest::test_body", "tes...
["test/test_app.py::TestApplicationObject::test_setattr", "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", "test/test_config.py::TestConfDict::test_meta", ...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
45
153
896
0
0.6
1
0.75
1
0.299333
81.173
5,502
swe_smith::train::24790
swe_smith
train
24,790
marshmallow-code__marshmallow.9716fc62.func_basic__wz50j3c4
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Schema decorators not working correctly with inheritance #### Description When using schema decorators like `@validates`, `@post_load`, `@post_dump`, etc. with class inheritance, the decorators are not being applied correctly. The decorated methods from parent classes are not being inherited properly, and the `many` ...
diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py index e21768e..c529762 100644 --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -156,33 +156,23 @@ class SchemaMeta(ABCMeta): hooks = defaultdict(list) # type: dict[str, list[tuple[str, bool, dict]]] - for attr_name...
["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...
["tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_invalid_data", "tests/test_decorators.py::test_decorator_post_dump_with_nested_original_and_pass_many[data0-expected_data0-expected_original_data0]", "tests/test_decorators.py::test_decorator_post_load_with_nested_original_and_pass_man...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
18
42
1,436
0
0.6
1
0.75
1
0.299333
81.173
5,503
swe_smith::train::45483
swe_smith
train
45,483
dask__dask.5f61e423.pr_11263
swesmith/dask__dask.5f61e423
dask/dask
python
null
### Issue: NameError in `order` function due to undefined `get_dependencies` #### Description After applying the recent changes, it seems that the `order` function in `dask/order.py` is encountering a `NameError` because the function `get_dependencies` is not defined. This issue is causing several parts of the code t...
diff --git a/dask/order.py b/dask/order.py index d76ac85..dba3840 100644 --- a/dask/order.py +++ b/dask/order.py @@ -46,6 +46,7 @@ graph types laid out very carefully to show the kinds of situations that often arise, and the order we would like to be determined. """ +import copy from collections import defaultdict...
["dask/tests/test_order.py::test_ordering_keeps_groups_together[abcde]", "dask/tests/test_order.py::test_ordering_keeps_groups_together[edcba]", "dask/tests/test_order.py::test_avoid_broker_nodes[abcde]", "dask/tests/test_order.py::test_avoid_broker_nodes[edcba]", "dask/tests/test_order.py::test_base_of_reduce_preferre...
["dask/tests/test_order.py::test_stacklimit[abcde]", "dask/tests/test_order.py::test_stacklimit[edcba]", "dask/tests/test_order.py::test_order_empty", "dask/tests/test_order.py::test_array_vs_dataframe[True]", "dask/tests/test_order.py::test_array_vs_dataframe[False]", "dask/tests/test_order.py::test_anom_mean", "dask/...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
29
84
1,216
0
0.6
1
0.75
1
0.299333
81.173
5,504
swe_smith::train::9844
swe_smith
train
9,844
keleshev__schema.24a30457.func_pm_op_change__ddwjlv59
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
Schema validation fails with TypeError on set operations and string formatting #### Description Schema validation is throwing TypeErrors when validating dictionaries with missing keys or when handling callable validators. The errors seem to be related to incorrect operators being used in set operations and string for...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..34c05e8 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -497,7 +497,7 @@ class Schema(object): break required = set(k for k in s if not self._is_optional_type(k)) if not require...
["test_schema.py::test_schema", "test_schema.py::test_validate_file", "test_schema.py::test_or_only_one", "test_schema.py::test_test", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_dict", "test_schema.py::test_dict_keys", "test_schema.py::test_ignore_extra_keys", "test_schema...
["test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_list_tuple_set_frozenset", "test_schema.py::test_strictly", "test_schema.py::test_dict_key_error", "test_schema.py::test_nice_errors", "test_schema.py::test_use_error_handling", "test_schema.py::test_or_error_handling", "test_schema.py::test_...
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
10
35
1,596
0
0.6
1
0.75
1
0.299333
81.173
5,505
swe_smith::train::32815
swe_smith
train
32,815
pydantic__pydantic.acb0f10f.lm_rewrite__rr3nwkes
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
`parse_obj_as` no longer warns about deprecated `type_name` parameter #### Description The `parse_obj_as` function in `pydantic.deprecated.tools` is supposed to emit a deprecation warning when the `type_name` parameter is used, but this warning is no longer being triggered. #### Steps/Code to Reproduce ```python im...
diff --git a/pydantic/deprecated/tools.py b/pydantic/deprecated/tools.py index 5ad7fae..59eabcc 100644 --- a/pydantic/deprecated/tools.py +++ b/pydantic/deprecated/tools.py @@ -27,21 +27,28 @@ T = TypeVar('T') '`parse_obj_as` is deprecated. Use `pydantic.TypeAdapter.validate_python` instead.', category=None, ...
["tests/test_tools.py::test_parsing_model_naming"]
["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
23
1
1,336
0
0.6
1
0.75
1
0.299333
81.173
5,506
swe_smith::train::19104
swe_smith
train
19,104
seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__i64r4nb9
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepSearch fails with AttributeError when searching custom objects #### Description When using DeepSearch on custom objects, the search functionality breaks with an AttributeError. This affects both simple custom objects and more complex scenarios like custom objects within dictionaries or named tuples. #### Steps/C...
diff --git a/deepdiff/search.py b/deepdiff/search.py index ae86ce0..123c9c5 100644 --- a/deepdiff/search.py +++ b/deepdiff/search.py @@ -149,13 +149,10 @@ class DeepSearch(dict): parent, parents_ids=frozenset(), is_namedtuple=False): - """Search o...
["tests/test_search.py::TestDeepSearch::test_custom_object", "tests/test_search.py::TestDeepSearch::test_custom_object_verbose", "tests/test_search.py::TestDeepSearch::test_custom_object_in_dictionary_verbose", "tests/test_search.py::TestDeepSearch::test_named_tuples_verbose", "tests/test_search.py::TestDeepSearch::tes...
["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
19
15
1,415
0
0.6
1
0.75
1
0.299167
81.1725
5,507
swe_smith::train::20091
swe_smith
train
20,091
kurtmckee__feedparser.cad965a3.func_pm_remove_assign__d9zrrxeq
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
ISO8601 date parser fails with UnboundLocalError for certain date formats #### Description The ISO8601 date parser throws an `UnboundLocalError` when parsing certain date string formats. This happens when trying to parse dates like `'031231'`, `'03-12-31'`, `'-03-12'`, `'03335'`, and others. #### Steps/Code to Repro...
diff --git a/feedparser/datetimes/iso8601.py b/feedparser/datetimes/iso8601.py index f8f6fe3..e4de47f 100644 --- a/feedparser/datetimes/iso8601.py +++ b/feedparser/datetimes/iso8601.py @@ -83,19 +83,17 @@ def _parse_date_iso8601(date_string): if m.span() == (0, 0): return params = m.groupdict() - ...
["tests/test_date_parsers.py::test_date_parser[_parse_date_iso8601-031231-expected_value6]", "tests/test_date_parsers.py::test_date_parser[_parse_date_iso8601--03-12-expected_value8]", "tests/test_date_parsers.py::test_date_parser[_parse_date_iso8601-03335-expected_value9]", "tests/test_date_parsers.py::test_date_parse...
["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
1
18
7
1,435
0
0.6
1
0.75
1
0.299167
81.1725
5,508
r2e_gym::train::5403
r2e_gym
train
5,403
aiohttp__0415a4ca18e15e734999925fd7f20607f05e2a4b
aiohttp
aio-libs/aiohttp
python
0415a4ca18e15e734999925fd7f20607f05e2a4b
**Title:** ClientSession Logs "Unclosed client session" Warning When Instantiated with Invalid Timeout **Description:** Creating a `ClientSession` with an invalid timeout value correctly raises a `ValueError`. However, it also results in an "Unclosed client session" warning, indicating that the session was not properl...
diff --git a/CHANGES/8253.bugfix b/CHANGES/8253.bugfix --- a/CHANGES/8253.bugfix +++ b/CHANGES/8253.bugfix @@ -0,0 +1 @@ +Fixed "Unclosed client session" when initialization of ClientSession fails -- by :user:`NewGlad`. diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -2...
diff --git a/tests/test_client_session.py b/tests/test_client_session.py --- a/tests/test_client_session.py +++ b/tests/test_client_session.py @@ -885,3 +885,13 @@ ) -> None: session = await create_session(base_url) assert session._build_url(url) == expected_url + + +async def test_instantiation_with_invalid...
null
null
namanjain12/aiohttp_final:0415a4ca18e15e734999925fd7f20607f05e2a4b
true
null
3
79
null
927
0
0.75
1
0.6375
1
0.417833
81.17225
5,509
swe_smith::train::36479
swe_smith
train
36,479
lincolnloop__python-qrcode.456b01d4.combine_file__qpmzkql1
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
QRCode generation fails with KeyError when using precomputed blanks #### Description When generating QR codes, the library fails with a `KeyError` when trying to access precomputed QR blanks. This affects basic QR code generation functionality. #### Steps/Code to Reproduce ```python import qrcode # Basic QR code g...
diff --git a/qrcode/main.py b/qrcode/main.py index 46116b5..ba4308b 100644 --- a/qrcode/main.py +++ b/qrcode/main.py @@ -41,15 +41,16 @@ def _check_border(size): def _check_mask_pattern(mask_pattern): - if mask_pattern is None: - return - if not isinstance(mask_pattern, int): - raise TypeError(...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_add_qrdata", "qrcode/tests/test_qrcode.py::test_fit", "qrcode/tests/test_qrcode.py::test_mode_number", "qr...
["qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_qrcode_bad_factory", "qrcode/tests/test_qrcode.py::test_optimize_longer_than_data", "qrcode/tests/test_qrcode.py::test_qrdata_repr", "qrcode/tests/test_qrcode.py::test_print_ascii...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
30
60
1,194
0
0.6
1
0.75
1
0.299
81.172
5,510
swe_bench::test::1714
swe_bench
test
1,714
scikit-learn__scikit-learn-7760
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
074a5216f8e35288045455ccda37f87a19d4cbde
Stronger common tests for setting init params? / check_estimator In #7477 a solution was proposed that did something like ``` python class Estimator(BaseEstimator): def __init__(self, param=None): self._param = param @property def param(self): return some_stuff(self._param) ``` The common...
I am interested in contributing. It sounds to me like you want `check_estimator` to verify that there are no properties which are parameter names? Thanks for wanting to contribute. I think we want to check that calling `set_params` is equivalent to passing parameters in `__init__`. Actually, I'm a bit appalled to see ...
diff --git a/sklearn/utils/_unittest_backport.py b/sklearn/utils/_unittest_backport.py --- a/sklearn/utils/_unittest_backport.py +++ b/sklearn/utils/_unittest_backport.py @@ -149,7 +149,7 @@ def __exit__(self, exc_type, exc_value, tb): class TestCase(unittest.TestCase): - longMessage = False + longMessage = ...
diff --git a/sklearn/utils/tests/test_estimator_checks.py b/sklearn/utils/tests/test_estimator_checks.py --- a/sklearn/utils/tests/test_estimator_checks.py +++ b/sklearn/utils/tests/test_estimator_checks.py @@ -10,7 +10,8 @@ from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.utils import deprecated ...
["sklearn/utils/tests/test_estimator_checks.py::test_check_estimator"]
["sklearn/utils/tests/test_estimator_checks.py::test_check_fit_score_takes_y_works_on_deprecated_fit", "sklearn/utils/tests/test_estimator_checks.py::test_check_estimator_transformer_no_mixin", "sklearn/utils/tests/test_estimator_checks.py::test_check_estimator_clones", "sklearn/utils/tests/test_estimator_checks.py::te...
null
true
2016-10-26T16:03:36Z
2
56
1
474
0
0.8
1
0.55
1
0.265667
81.172
5,511
swe_smith::train::1668
swe_smith
train
1,668
agronholm__typeguard.b6a7e438.combine_file__i6w51g2f
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking functions silently fail instead of raising exceptions #### Description When type checking fails in functions decorated with `@typechecked`, the errors are being silently ignored instead of raising `TypeCheckError` exceptions as expected. This affects argument validation, return value checking, and gener...
diff --git a/src/typeguard/_functions.py b/src/typeguard/_functions.py index ca21c14..8b7b112 100644 --- a/src/typeguard/_functions.py +++ b/src/typeguard/_functions.py @@ -128,20 +128,20 @@ def check_argument_types( exc = TypeCheckError( f"{func_name}() was declared never to be called but...
["tests/test_importhook.py::test_blanket_import", "tests/test_instrumentation.py::test_type_checked_func_error[typechecked]", "tests/test_instrumentation.py::test_type_checked_method[typechecked]", "tests/test_instrumentation.py::test_type_checked_classmethod[typechecked]", "tests/test_instrumentation.py::test_type_che...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
38
56
1,034
0
0.6
1
0.75
1
0.299
81.172
5,512
swe_smith::train::10263
swe_smith
train
10,263
paramiko__paramiko.23f92003.func_basic__28agkafp
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Channel.send() raises "Socket is open" error instead of working properly #### Description When trying to send data through a paramiko Channel, the send() method is raising an unexpected error "Socket is open" instead of sending the data. This appears to affect all channel operations that involve sending data. #### S...
diff --git a/paramiko/channel.py b/paramiko/channel.py index 25326ca..e65295d 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -1190,21 +1190,18 @@ class Channel(ClosingContextManager): size = len(s) self.lock.acquire() try: - if self.closed: - # this do...
["tests/test_client.py::SSHClientTest::test_auth_trickledown", "tests/test_client.py::SSHClientTest::test_certs_allowed_as_key_filename_values", "tests/test_client.py::SSHClientTest::test_certs_implicitly_loaded_alongside_key_filename_keys", "tests/test_client.py::SSHClientTest::test_client", "tests/test_client.py::SSH...
["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
15
42
1,493
0
0.6
1
0.75
1
0.298833
81.1715
5,513
swe_smith::train::10188
swe_smith
train
10,188
paramiko__paramiko.23f92003.combine_file__t6t0wwt6
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Curve25519 key exchange fails with AttributeError during SSH connection #### Description SSH connections using Curve25519 key exchange are failing with AttributeError exceptions. The connection process breaks during the key exchange phase, preventing successful SSH sessions from being established. #### Steps/Code to...
diff --git a/paramiko/kex_curve25519.py b/paramiko/kex_curve25519.py index 20c23e4..3de9e6d 100644 --- a/paramiko/kex_curve25519.py +++ b/paramiko/kex_curve25519.py @@ -21,8 +21,8 @@ class KexCurve25519: hash_algo = hashlib.sha256 def __init__(self, transport): - self.transport = transport - s...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::AuthHandler_::interactive_auth", "tests/auth.py::AuthHandler_::interactive_fallback", "tests/auth.py::AuthHandler_::utf8", "tests/auth.py::AuthHandler_::non_utf8", "...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
26
127
1,273
0
0.6
1
0.75
1
0.298833
81.1715
5,514
swe_smith::train::23958
swe_smith
train
23,958
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__8xxfsqu1
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Wavelength constructor fails when wavemax is None #### Description The Wavelength class constructor crashes with an UnboundLocalError when wavemax is None due to a variable scoping issue. The code tries to access the `unit` variable before it's defined in the control flow. #### Steps/Code to Reproduce ```python imp...
diff --git a/sunpy/net/_attrs.py b/sunpy/net/_attrs.py index 9b509c9..110fd84 100644 --- a/sunpy/net/_attrs.py +++ b/sunpy/net/_attrs.py @@ -88,6 +88,16 @@ class Wavelength(Range): type_name = 'wave' def __init__(self, wavemin, wavemax=None): + # Note that wave.min and wave.max are not rounded + ...
["sunpy/net/vso/tests/test_attrs.py::test_wave_inputQuantity", "sunpy/net/vso/tests/test_attrs.py::test_wave_toangstrom", "sunpy/net/vso/tests/test_attrs.py::test_wave_xor", "sunpy/net/vso/tests/test_attrs.py::test_wave_repr"]
["sunpy/net/vso/tests/test_attrs.py::test_simpleattr_apply", "sunpy/net/vso/tests/test_attrs.py::test_Time_timerange", "sunpy/net/vso/tests/test_attrs.py::test_input_error", "sunpy/net/vso/tests/test_attrs.py::test_simpleattr_and_duplicate", "sunpy/net/vso/tests/test_attrs.py::test_simpleattr_or_eq", "sunpy/net/vso/tes...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
29
4
1,213
0
0.6
1
0.75
1
0.298833
81.1715
5,515
swe_smith::train::28290
swe_smith
train
28,290
encode__starlette.db5063c2.combine_file__293h9vbu
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
ExceptionMiddleware debug flag inverted and handlers swapped When initializing ExceptionMiddleware with `debug=True`, the debug behavior is inverted - it acts as if debug is False. Additionally, HTTP and WebSocket exception handlers appear to be swapped, causing incorrect exception handling. #### Steps/Code to Reprod...
diff --git a/starlette/middleware/exceptions.py b/starlette/middleware/exceptions.py index d708929..266e139 100644 --- a/starlette/middleware/exceptions.py +++ b/starlette/middleware/exceptions.py @@ -22,25 +22,25 @@ class ExceptionMiddleware: debug: bool = False, ) -> None: self.app = app - ...
["tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[trio]", "tests/test_applications.py::test_400[asyncio]", "tests/test_applications.py::test_websocket_raise_websocket_exception[asyncio]", "tests/test_applications.py::test_websocket_ra...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTTPMiddle...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
15
58
1,493
0
0.6
1
0.75
1
0.298833
81.1715
5,516
swe_smith::train::49195
swe_smith
train
49,195
mozilla__bleach.73871d76.combine_module__jr3vy2hu
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
TreeWalker inheritance broken in html5lib treewalkers #### Description The TreeWalker class in the etree treewalker module is not properly inheriting from base.NonRecursiveTreeWalker, causing linkify and clean functions to fail with TypeError. #### Steps/Code to Reproduce ```python import bleach # Basic linkify te...
diff --git a/bleach/_vendor/html5lib/treewalkers/base.py b/bleach/_vendor/html5lib/treewalkers/base.py index 80c474c..fcd3414 100644 --- a/bleach/_vendor/html5lib/treewalkers/base.py +++ b/bleach/_vendor/html5lib/treewalkers/base.py @@ -60,10 +60,10 @@ class TreeWalker(object): :returns: EmptyTag token ...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
2
48
183
833
0
0.6
1
0.75
1
0.298833
81.1715
5,517
swe_smith::train::33935
swe_smith
train
33,935
pallets__click.fde47b4b.lm_rewrite__ytci3086
swesmith/pallets__click.fde47b4b
pallets/click
python
null
# Flag options with prompt_required=False crash when no value is provided ## Description When using a flag option with `prompt_required=False` and no value is provided, the application crashes. This happens because the flag value is not properly handled in the parser. ## Steps to reproduce Create a command with an ...
diff --git a/src/click/parser.py b/src/click/parser.py index a8b7d26..eb2f5f9 100644 --- a/src/click/parser.py +++ b/src/click/parser.py @@ -164,21 +164,22 @@ class _Option: return self.action in ("store", "append") def process(self, value: t.Any, state: _ParsingState) -> None: + if value is _fla...
["tests/test_termui.py::test_prompt_required_with_required[False-True-args3-prompt]"]
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
1
17
1
1,453
0
0.6
1
0.75
1
0.298833
81.1715
5,518
swe_smith::train::47445
swe_smith
train
47,445
sqlfluff__sqlfluff.50a1c4b6.combine_file__imdtyqzm
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
CLI formatter methods broken after recent changes #### Description The CLI output formatting is completely broken. When trying to use sqlfluff with any command that produces formatted output, it fails with various errors including `UnboundLocalError` and assertion failures. #### Steps/Code to Reproduce ```python fr...
diff --git a/src/sqlfluff/cli/formatters.py b/src/sqlfluff/cli/formatters.py index 4aa668f..bcb34b7 100644 --- a/src/sqlfluff/cli/formatters.py +++ b/src/sqlfluff/cli/formatters.py @@ -367,20 +367,11 @@ class OutputStreamFormatter(FormatterInterface): """ # First format all the values into strings ...
["test/cli/formatters_test.py::test__cli__formatters__filename_nocol", "test/cli/formatters_test.py::test__cli__formatters__violation", "test/cli/formatters_test.py::test__cli__helpers__cli_table"]
["test/cli/formatters_test.py::test__cli__helpers__colorize"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
30
3
1,192
0
0.6
1
0.75
1
0.298667
81.171
5,519
swe_smith::train::1912
swe_smith
train
1,912
agronholm__typeguard.b6a7e438.func_pm_remove_cond__jkyo0ml9
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking instrumentation broken after recent changes #### Description After some recent changes, type checking instrumentation appears to be completely broken. Functions with type annotations are no longer being instrumented properly, causing type checking to fail silently. #### Steps/Code to Reproduce ```pyth...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..5c14c62 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -654,14 +654,6 @@ class TypeguardTransformer(NodeTransformer): """ self._memo.local_names.add(node.name) - # Elim...
["tests/test_importhook.py::test_blanket_import", "tests/test_instrumentation.py::test_type_checked_func_error[typechecked]", "tests/test_instrumentation.py::test_type_checked_method[typechecked]", "tests/test_instrumentation.py::test_type_checked_classmethod[typechecked]", "tests/test_instrumentation.py::test_type_che...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
40
69
992
0
0.6
1
0.75
1
0.298667
81.171
5,520
swe_smith::train::10034
swe_smith
train
10,034
paramiko__paramiko.23f92003.combine_file__06ixfhti
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
DSS key operations failing after recent changes I'm encountering issues with DSS key operations that seem to have broken recently. When trying to use DSS keys for signing and verification, I'm getting various errors. #### Steps to Reproduce ```python from paramiko import DSSKey from paramiko._support import _support...
diff --git a/paramiko/dsskey.py b/paramiko/dsskey.py index 5215d28..70b08aa 100644 --- a/paramiko/dsskey.py +++ b/paramiko/dsskey.py @@ -67,20 +67,20 @@ class DSSKey(PKey): self._from_private_key_file(filename, password) return if (msg is None) and (data is not None): - msg...
["tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[dss]", "tests/agent.py::AgentKey_::fields::defers_to_inner_key_when_present[dss]", "tests/agent.py::AgentKey_::get_bits::defers_to_inner_key_when_present[dss]", "tests/agent.py::AgentKey_::asbytes::defers_to_inner_key_when_present[dss]", "tests/pkey.py::...
["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
29
18
1,212
0
0.6
1
0.75
1
0.298667
81.171
5,521
swe_smith::train::45398
swe_smith
train
45,398
dask__dask.5f61e423.lm_rewrite__7vxryfwk
swesmith/dask__dask.5f61e423
dask/dask
python
null
# Default block size for CSV reading changes when psutil is available but returns None values ## Description I'm experiencing an issue with the block size calculation when reading CSV files. When psutil is available but returns None values for either memory or CPU count, the code fails with a TypeError. Here's what ...
diff --git a/dask/dataframe/io/csv.py b/dask/dataframe/io/csv.py index 4dc9ad8..20509bc 100644 --- a/dask/dataframe/io/csv.py +++ b/dask/dataframe/io/csv.py @@ -401,18 +401,23 @@ def auto_blocksize(total_memory, cpu_count): def _infer_block_size(): - default = 2**25 + """Infer an appropriate block size for r...
["dask/dataframe/io/tests/test_csv.py::test__infer_block_size"]
["dask/dataframe/io/tests/test_csv.py::test_pandas_read_text[read_csv-files0]", "dask/dataframe/io/tests/test_csv.py::test_pandas_read_text[read_table-files1]", "dask/dataframe/io/tests/test_csv.py::test_pandas_read_text[read_fwf-files2]", "dask/dataframe/io/tests/test_csv.py::test_pandas_read_text_kwargs[read_csv-file...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
23
1
1,332
0
0.6
1
0.75
1
0.298667
81.171
5,522
swe_smith::train::52719
swe_smith
train
52,719
pydicom__pydicom.7d361b3d.lm_rewrite__qdcbunva
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# Dataset.walk() doesn't properly handle exceptions with tag information I'm working with the Dataset.walk() method and noticed that when an exception occurs during the walk, the tag information is not included in the exception message. ## Reproduction I have a dataset with an element that raises an exception when c...
diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py index e7abffd..cc37620 100644 --- a/src/pydicom/dataset.py +++ b/src/pydicom/dataset.py @@ -3040,9 +3040,8 @@ class Dataset: for ds in elem.value: yield from ds.iterall() - def walk( - self, callback: Callable...
["tests/test_dataset.py::TestDataset::test_tag_exception_walk"]
["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
21
1
1,372
0
0.6
1
0.75
1
0.298667
81.171
5,523
r2e_gym::train::4235
r2e_gym
train
4,235
numpy__09fb4205a1d56090e13257a181f23514684f532b
numpy
numpy/numpy
python
09fb4205a1d56090e13257a181f23514684f532b
**Title:** `np.unique()` Raises TypeError When Using `return_counts` Argument **Description:** When attempting to use the `return_counts` keyword argument with NumPy's `unique` function, a `TypeError` is raised because the function does not recognize this parameter. **Example Code:** ```python import numpy as np arr...
diff --git a/doc/release/1.9.0-notes.rst b/doc/release/1.9.0-notes.rst --- a/doc/release/1.9.0-notes.rst +++ b/doc/release/1.9.0-notes.rst @@ -140,6 +140,11 @@ The ordering of the columns of the Vandermonde matrix can be specified with this new boolean argument. +``unique_counts`` parameter added to ``np.unique`` +...
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py --- a/numpy/lib/tests/test_arraysetops.py +++ b/numpy/lib/tests/test_arraysetops.py @@ -14,31 +14,59 @@ def test_unique(self): - def check_all(a, b, i1, i2, dt): - msg = "check values failed for type '%s'" ...
null
null
namanjain12/numpy_final:09fb4205a1d56090e13257a181f23514684f532b
true
null
2
77
null
964
0
0.75
1
0.6375
1
0.417333
81.17075
5,524
swe_smith::train::4599
swe_smith
train
4,599
pygments__pygments.27649ebb.lm_rewrite__sici23s4
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
### Issue: AssertionError in TNTLexer with Unary Numerals #### Description After the recent changes, the `TNTLexer` is encountering an `AssertionError` when processing unary numeral strings like `S0` and `SSSSS0`. This seems to occur when the lexer attempts to tokenize these strings as numerals. #### Steps/Code to R...
diff --git a/pygments/lexers/tnt.py b/pygments/lexers/tnt.py index bb444fd..0d72839 100644 --- a/pygments/lexers/tnt.py +++ b/pygments/lexers/tnt.py @@ -82,30 +82,33 @@ class TNTLexer(Lexer): def term(self, start, text): """Tokenize a term.""" - if text[start] == 'S': # S...S(...) or S...0 - ...
["tests/test_tnt.py::test_numeral_positive_matches[S0]", "tests/test_tnt.py::test_numeral_positive_matches[SSSSS0]", "tests/examplefiles/tnt/example.tnt::"]
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
37
3
1,051
0
0.6
1
0.75
1
0.2985
81.1705
5,525
swe_smith::train::45421
swe_smith
train
45,421
dask__dask.5f61e423.lm_rewrite__gl7zyifm
swesmith/dask__dask.5f61e423
dask/dask
python
null
TypeError when using custom collections with get_collection_names #### Description It seems there's an issue when using `get_collection_names` with custom collections that implement the `__dask_graph__` method. The function raises a `TypeError` unexpectedly, which suggests that the function is not recognizing the cust...
diff --git a/dask/base.py b/dask/base.py index 3992ed3..d2f369f 100644 --- a/dask/base.py +++ b/dask/base.py @@ -203,7 +203,7 @@ def annotate(**annotations: Any) -> Iterator[None]: _annotations.reset(token) -def is_dask_collection(x) -> bool: +def is_dask_collection(x) ->bool: """Returns ``True`` if `...
["dask/tests/test_base.py::test_is_dask_collection", "dask/tests/test_base.py::test_get_collection_names"]
["dask/tests/test_base.py::test_is_dask_collection_dask_expr", "dask/tests/test_base.py::test_is_dask_collection_dask_expr_does_not_materialize", "dask/tests/test_base.py::test_unpack_collections", "dask/tests/test_base.py::test_get_name_from_key", "dask/tests/test_base.py::test_replace_name_in_keys", "dask/tests/test_...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
31
2
1,171
0
0.6
1
0.75
1
0.2985
81.1705
5,526
swe_smith::train::37992
swe_smith
train
37,992
kayak__pypika.1c9646f0.lm_rewrite__wxdcdolo
swesmith/kayak__pypika.1c9646f0
kayak/pypika
python
null
[Bug]: PostgreSQL RETURNING clause doesn't handle aggregate functions, NULL values, and tuples correctly ### Bug summary The PostgreSQL `RETURNING` clause in PyPika doesn't properly handle certain types of values: 1. Aggregate functions are allowed when they should be rejected 2. NULL values are not properly formatte...
diff --git a/pypika/dialects.py b/pypika/dialects.py index 57955d8..b98c5e6 100644 --- a/pypika/dialects.py +++ b/pypika/dialects.py @@ -591,19 +591,18 @@ class PostgreSQLQueryBuilder(QueryBuilder): return '' @builder - def returning(self, *terms: Any) -> "PostgreSQLQueryBuilder": + def returning(...
["pypika/tests/test_inserts.py::PostgresInsertIntoReturningTests::test_insert_returning_aggregate", "pypika/tests/test_inserts.py::PostgresInsertIntoReturningTests::test_insert_returning_null", "pypika/tests/test_inserts.py::PostgresInsertIntoReturningTests::test_insert_returning_tuple"]
["pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_0__ridley_scott_jimi_hendrix_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_1__1_2_3_4_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_2__toInt64_1_toInt64_2_toInt64_3_toInt64_4_", "pypika/tests/clickhouse/test_array...
jyangballin/swesmith.x86_64.kayak_1776_pypika.1c9646f0
true
null
1
11
3
1,571
0
0.6
1
0.75
1
0.2985
81.1705
5,527
r2e_gym::train::6518
r2e_gym
train
6,518
pillow__597dff7a8ae65bc0eaf8f485f6b8550c89701296
pillow
python-pillow/pillow
python
597dff7a8ae65bc0eaf8f485f6b8550c89701296
Title: ImageOps.pad Raises AttributeError and Alters Image Content for Palette-Based Images **Description:** When using the `ImageOps.pad` function on palette-based images ("P" or "PA"), the function encounters issues both when the image lacks a palette and when handling existing palettes. Specifically: 1. **Attribu...
diff --git a/src/PIL/ImageOps.py b/src/PIL/ImageOps.py --- a/src/PIL/ImageOps.py +++ b/src/PIL/ImageOps.py @@ -21,7 +21,7 @@ import operator import re -from . import Image +from . import Image, ImagePalette # # helpers @@ -291,9 +291,8 @@ out = resized else: out = Image.new(image.mode, si...
diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py --- a/Tests/test_imageops.py +++ b/Tests/test_imageops.py @@ -128,6 +128,21 @@ assert_image_similar_tofile( new_im, "Tests/images/imageops_pad_" + label + "_" + str(i) + ".jpg", 6 ) + + +@pytest.mark.parametrize("mod...
null
null
namanjain12/pillow_final:597dff7a8ae65bc0eaf8f485f6b8550c89701296
true
null
1
12
null
2,263
0
0.75
1
0.6375
1
0.417167
81.17025
5,528
swe_smith::train::29063
swe_smith
train
29,063
tox-dev__pipdeptree.c31b6418.combine_module__mrzx15yd
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
Package DAG reverse operation returns incorrect type #### Description When calling the `reverse()` method on a `PackageDAG` instance, it returns a plain `dict` instead of a `ReversedPackageDAG` object. This breaks functionality that expects the reversed DAG to have the proper type and methods. #### Steps/Code to Rep...
diff --git a/src/pipdeptree/_models/dag.py b/src/pipdeptree/_models/dag.py index 2f5df60..86ff1b0 100644 --- a/src/pipdeptree/_models/dag.py +++ b/src/pipdeptree/_models/dag.py @@ -110,9 +110,9 @@ class PackageDAG(Mapping[DistPackage, List[ReqPackage]]): """ try: - return self._index[node...
["tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_package_dag_reverse", "tests/_models/test_package.py::test_dist_packag...
["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_a", "tests/_models/test_dag.py::test_package_dag_filter_include_exclude_both_used", "tests/_models/test_dag.py::test_package_dag_filter_nonexistent_packages", "tests/_models/test_dag.py...
jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418
true
null
2
33
30
1,130
0
0.6
1
0.75
1
0.298333
81.17
5,529
swe_smith::train::5781
swe_smith
train
5,781
luozhouyang__python-string-similarity.115acaac.func_pm_class_rm_funcs__hv4o2all
swesmith/luozhouyang__python-string-similarity.115acaac
luozhouyang/python-string-similarity
python
null
SIFT4 class missing distance method #### Description The SIFT4 class is missing its distance method implementation. When trying to use the distance method, it raises an AttributeError. #### Steps/Code to Reproduce ```python from strsimpy.sift4 import SIFT4 s = SIFT4() result = s.distance('This is the first string'...
diff --git a/strsimpy/sift4.py b/strsimpy/sift4.py index 76adc52..f8cda55 100644 --- a/strsimpy/sift4.py +++ b/strsimpy/sift4.py @@ -124,65 +124,5 @@ class SIFT4Options(MetricStringDistance): class SIFT4: - # As described in https://siderite.dev/blog/super-fast-and-accurate-string-distance.html/ - def distan...
["strsimpy/sift4_test.py::SIFT4Test::testSIFT4"]
["strsimpy/cosine_test.py::TestCosine::test_cosine", "strsimpy/damerau_test.py::TestDamerau::test_damerau", "strsimpy/jaccard_test.py::TestJaccard::test_jaccard", "strsimpy/jaro_winkler_test.py::TestJaroWinkler::test_jarowinkler", "strsimpy/levenshtein_test.py::TestLevenshtein::test_levenshtein", "strsimpy/longest_comm...
jyangballin/swesmith.x86_64.luozhouyang_1776_python-string-similarity.115acaac
true
null
1
62
1
550
0
0.6
1
0.75
1
0.298333
81.17
5,530
swe_smith::train::43828
swe_smith
train
43,828
pydata__patsy.a5d16484.combine_file__thrpln3z
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Origin.combine() method returns early causing UnboundLocalError #### Description The `Origin.combine()` method has a bug where it returns early before defining required local variables, causing an `UnboundLocalError` when the method is called. #### Steps/Code to Reproduce ```python from patsy.origin import Origin ...
diff --git a/patsy/origin.py b/patsy/origin.py index fcabf21..5f785ab 100644 --- a/patsy/origin.py +++ b/patsy/origin.py @@ -40,6 +40,17 @@ class Origin(object): @classmethod def combine(cls, origin_objs): + return cls(codes.pop(), start, end) + for obj in origin_objs: + if obj is n...
["patsy/constraint.py::test_linear_constraint", "patsy/constraint.py::test_eval_errors", "patsy/desc.py::test_ModelDesc_from_formula", "patsy/desc.py::test_eval_formula", "patsy/desc.py::test_eval_formula_error_reporting", "patsy/desc.py::test_formula_factor_origin", "patsy/design_info.py::test_DesignInfo_linear_constr...
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
47
34
850
0
0.6
1
0.75
1
0.298333
81.17
5,531
swe_smith::train::26491
swe_smith
train
26,491
pylint-dev__astroid.b114f6b5.func_pm_remove_loop__xuz83dqq
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Metaclass detection broken - classes incorrectly identified as regular classes #### Description The metaclass detection logic appears to be broken. Classes that should be identified as metaclasses are now being classified as regular classes instead. #### Steps/Code to Reproduce ```python import astroid code = ''' ...
diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index 99ed796..8be03ad 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -1724,30 +1724,8 @@ def _is_metaclass( return True if seen is None: ...
["tests/test_inference.py::InferenceTest::test_infer_cls_in_class_methods", "tests/test_scoped_nodes.py::ClassNodeTest::test_type"]
["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
22
2
1,350
0
0.6
1
0.75
1
0.298333
81.17
5,532
swe_bench::test::1383
swe_bench
test
1,383
pytest-dev__pytest-10758
pytest-dev/pytest
pytest-dev/pytest
python
d5dda84ef346b83e0b634a92e00c62a8a10e0061
Walrus operator causes different behavior in PyTest. I am currently testing the following function but find that the function passes the test in the normal Python terminal but fails in a PyTest run. The walrus operator is relatively new and not many people use it. I think that there may be an inconsistency in the execu...
It's very likely a missed case in the asset rewrite Hi, I did some tests on this since I was curious about how this works. I created a module like this ``` def my_func(before, after): return before == after def change_value(value): return value.lower() def test_walrus_conversion(): a = "Hel...
diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py --- a/src/_pytest/assertion/rewrite.py +++ b/src/_pytest/assertion/rewrite.py @@ -44,9 +44,13 @@ if TYPE_CHECKING: from _pytest.assertion import AssertionState +if sys.version_info >= (3, 8): + namedExpr = ast.NamedExpr +else: +...
diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -1265,6 +1265,177 @@ def test_simple_failure(): result.stdout.fnmatch_lines(["*E*assert (1 + 1) == 3"]) +@pytest.mark.skipif( + sys.version_info < (3, 8),...
["testing/test_assertrewrite.py::TestIssue10743::test_assertion_walrus_operator", "testing/test_assertrewrite.py::TestIssue10743::test_assertion_inline_walrus_operator", "testing/test_assertrewrite.py::TestIssue10743::test_assertion_walrus_operator_true_assertion_and_changes_variable_value", "testing/test_assertrewrite...
["testing/test_assertrewrite.py::TestAssertionRewrite::test_place_initial_imports", "testing/test_assertrewrite.py::TestAssertionRewrite::test_location_is_set", "testing/test_assertrewrite.py::TestAssertionRewrite::test_dont_rewrite", "testing/test_assertrewrite.py::TestAssertionRewrite::test_name", "testing/test_asser...
null
true
2023-02-22T21:43:37Z
1
54
6
509
0
0.8
1
0.55
1
0.264833
81.1695
5,533
swe_smith::train::27739
swe_smith
train
27,739
arrow-py__arrow.1d70d009.func_pm_op_change__g9coy2ch
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
Humanize method produces incorrect output with mathematical operator errors #### Description The humanize method is producing incorrect time difference calculations due to mathematical operator errors in the code. This affects both single granularity and multiple granularity humanization, causing division by zero err...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..61e1faf 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -1187,10 +1187,10 @@ class Arrow: "seconds", seconds, only_distance=only_distance ) - elif diff < self._SECS_PER_MINUTE * 2: + ...
["tests/test_arrow.py::TestArrowHumanize::test_granularity", "tests/test_arrow.py::TestArrowHumanize::test_multiple_granularity", "tests/test_arrow.py::TestArrowHumanize::test_minute", "tests/test_arrow.py::TestArrowHumanize::test_minutes", "tests/test_arrow.py::TestArrowHumanize::test_month_plus_4_days", "tests/test_a...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
21
12
1,369
0
0.6
1
0.75
1
0.298167
81.1695
5,534
swe_smith::train::40312
swe_smith
train
40,312
scanny__python-pptx.278b47b1.combine_module__bgcynlw9
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Multiple issues with PowerPoint presentation handling in python-pptx Description I'm using python-pptx and found several issues when working with presentations: 1. When setting the last_printed property on a presentation, the year is always changed to 1970 regardless of what date I provide. For example, when I set l...
diff --git a/src/pptx/parts/coreprops.py b/src/pptx/parts/coreprops.py index 8471cc8..591fde1 100644 --- a/src/pptx/parts/coreprops.py +++ b/src/pptx/parts/coreprops.py @@ -114,7 +114,7 @@ class CorePropertiesPart(XmlPart): @last_printed.setter def last_printed(self, value: dt.datetime): - self._elem...
["tests/parts/test_coreprops.py::DescribeCorePropertiesPart::it_can_change_the_date_property_values[last_printed-cp:lastPrinted-value1-2014-06-04T04:00:00Z-]", "tests/parts/test_slide.py::DescribeBaseSlidePart::it_can_get_a_related_image_by_rId", "tests/parts/test_slide.py::DescribeNotesSlidePart::it_adds_a_notes_slide...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
2
18
4
1,429
0
0.6
1
0.75
1
0.298167
81.1695
5,535
swe_smith::train::48214
swe_smith
train
48,214
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__di5i02ah
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
`sqlfluff format` command broken due to variable reference before assignment #### Description The `sqlfluff format` command is currently broken and throws an `UnboundLocalError` when trying to format SQL files. The error occurs because variables are being referenced before they are assigned in the function. #### Ste...
diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py index 14e3c3e..b54c242 100644 --- a/src/sqlfluff/cli/commands.py +++ b/src/sqlfluff/cli/commands.py @@ -1169,25 +1169,10 @@ def cli_format( stdin_filename: Optional[str] = None, **kwargs, ) -> None: - """Autoformat SQL files. - - ...
["test/cli/commands_test.py::test__cli__command_no_dialect[command3]", "test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command3-0]", "test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command4-0]", "test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command5...
["test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_no_dialect[command0]", "test/cli/commands_test.py::test__cli__command_no_dialect[command1]", "test/cli/commands_test.py::test__cli__command_no_dialect[comman...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
49
4
809
0
0.6
1
0.75
1
0.298167
81.1695
5,536
swe_smith::train::24687
swe_smith
train
24,687
marshmallow-code__marshmallow.9716fc62.func_basic__edhtx8uf
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Email validator incorrectly rejects valid email addresses #### Description The Email validator is incorrectly rejecting several valid email addresses that should pass validation. This affects emails with quoted local parts, localhost domains, and internationalized domain names. #### Steps/Code to Reproduce ```pytho...
diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py index e4536d8..96d0f59 100644 --- a/src/marshmallow/validate.py +++ b/src/marshmallow/validate.py @@ -261,23 +261,23 @@ class Email(Validator): if not value or "@" not in value: raise ValidationError(message) - user_pa...
["tests/test_validate.py::test_email_valid[\"very.unusual.@.unusual.com\"@example.com]", "tests/test_validate.py::test_email_valid[niceandsimple@localhost]", "tests/test_validate.py::test_email_valid[\\u03b4\\u03bf\\u03ba.\\u03b9\\u03bc\\u03ae@\\u03c0\\u03b1\\u03c1\\u03ac\\u03b4\\u03b5\\u03b9\\u03b3\\u03bc\\u03b1.\\u03...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
24
3
1,309
0
0.6
1
0.75
1
0.298167
81.1695
5,537
swe_smith::train::27954
swe_smith
train
27,954
jsvine__pdfplumber.02ff4313.func_pm_remove_assign__f187fxpu
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
NameError in text extraction methods after recent changes #### Description Text extraction methods are failing with `NameError: name 'tuples_by_line' is not defined` when trying to extract text from PDF pages. This affects multiple text extraction functions including `extract_text()`, `extract_words()`, and related m...
diff --git a/pdfplumber/utils/text.py b/pdfplumber/utils/text.py index 8edafa1..88baac8 100644 --- a/pdfplumber/utils/text.py +++ b/pdfplumber/utils/text.py @@ -327,7 +327,6 @@ class WordMap: num_newlines = 0 line_cluster_key = get_line_cluster_key(line_dir) - char_sort_key = get_char_sort_ke...
["tests/test_basics.py::Test::test_outside_bbox", "tests/test_basics.py::Test::test_unicode_normalization", "tests/test_convert.py::Test::test_cli_text", "tests/test_dedupe_chars.py::Test::test_extra_attrs", "tests/test_dedupe_chars.py::Test::test_extract_text", "tests/test_dedupe_chars.py::Test::test_extract_text2", "...
["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
29
29
1,208
0
0.6
1
0.75
1
0.298
81.169
5,538
swe_smith::train::19238
swe_smith
train
19,238
seperman__deepdiff.ed252022.func_pm_remove_assign__hbmc5q2e
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
NameError when using ignore_order with certain data structures #### Description When using `ignore_order=True` with DeepDiff, a NameError is raised for undefined variables in the comparison logic. This affects various scenarios including lists with repetitions, nested structures, and custom objects. #### Steps/Code ...
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..bdaacab 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -1273,7 +1273,6 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): full_t2_hashtable = self._create_hashtable(level, 't2') t1_hashes = SetOrdered(full_t1...
["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_cache_does_not_affect_final_results", "tests/test_comm...
["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_command.py::TestCommands::test...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
25
116
1,288
0
0.6
1
0.75
1
0.298
81.169
5,539
swe_bench::test::1192
swe_bench
test
1,192
psf__requests-2821
psf/requests
psf/requests
python
978a89d5a32f6e91acf0812f7f2b29c9f97d6a0c
TypeError after 2.7.0 -> 2.8.0 upgrade (cannot make memory view...) I'm running into this traceback after upgrading to 2.8.0 from 2.7.0: ``` <snip> response = self.session.send(request) File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/requests/sessions.py", line 579, in send r = adapter....
Can I see a bit of sample code? I suspect you're passing a Unicode string somewhere. Good call. To reproduce this, you need both a unicode method and an https url, eg ``` python -c 'import requests; s = requests.Session(); r = requests.Request(u"POST", "https://httpbin.org/post"); pr = s.prepare_request(r); print s....
diff --git a/requests/models.py b/requests/models.py --- a/requests/models.py +++ b/requests/models.py @@ -319,7 +319,7 @@ def prepare_method(self, method): """Prepares the given HTTP method.""" self.method = method if self.method is not None: - self.method = self.method.upper() + ...
diff --git a/test_requests.py b/test_requests.py --- a/test_requests.py +++ b/test_requests.py @@ -568,6 +568,17 @@ def test_unicode_method_name(self): method=u('POST'), url=httpbin('post'), files=files) assert r.status_code == 200 + def test_unicode_method_name_with_request_object(self): + ...
["test_requests.py::RequestsTestCase::test_DIGESTAUTH_WRONG_HTTP_401_GET", "test_requests.py::RequestsTestCase::test_DIGEST_HTTP_200_OK_GET", "test_requests.py::RequestsTestCase::test_HTTP_200_OK_GET_WITH_MIXED_PARAMS", "test_requests.py::RequestsTestCase::test_HTTP_200_OK_PUT", "test_requests.py::RequestsTestCase::tes...
["test_requests.py::RequestsTestCase::test_BASICAUTH_TUPLE_HTTP_200_OK_GET", "test_requests.py::RequestsTestCase::test_DIGESTAUTH_QUOTES_QOP_VALUE", "test_requests.py::RequestsTestCase::test_DIGEST_AUTH_RETURNS_COOKIE", "test_requests.py::RequestsTestCase::test_DIGEST_AUTH_SETS_SESSION_COOKIES", "test_requests.py::Requ...
null
true
2015-10-12T09:49:35Z
2
5
11
2,437
0
0.8
1
0.7
0.8
0.422833
81.1685
5,540
swe_smith::train::32940
swe_smith
train
32,940
pydantic__pydantic.acb0f10f.pr_6326
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Protected namespace validation raises NameError instead of warning #### Description When defining a model field that conflicts with a protected namespace, the validation now raises a `NameError` instead of issuing a `UserWarning` as expected. This breaks existing code that relies on the warning behavior. #### Steps/...
diff --git a/pydantic/_internal/_fields.py b/pydantic/_internal/_fields.py index 23f964f..93b04dc 100644 --- a/pydantic/_internal/_fields.py +++ b/pydantic/_internal/_fields.py @@ -129,36 +129,9 @@ def collect_model_fields( # noqa: C901 continue for protected_namespace in config_wrapper.protect...
["tests/test_create_model.py::test_create_model_protected_namespace_default", "tests/test_create_model.py::test_create_model_custom_protected_namespace", "tests/test_create_model.py::test_create_model_multiple_protected_namespace", "tests/test_docs.py::test_docstrings_examples[pydantic/config.py:652-671]", "tests/test_...
["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
35
9
1,087
0
0.6
1
0.75
1
0.297833
81.1685
5,541
swe_smith::train::32408
swe_smith
train
32,408
pydantic__pydantic.acb0f10f.combine_module__6cdmwg2i
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# Root validator can be applied to instance methods and update parameter is ignored in _calculate_keys ## Description I found two issues in the pydantic codebase: 1. The `root_validator` decorator in `pydantic/deprecated/class_validators.py` is now allowing instance methods, which it shouldn't. Previously, there was...
diff --git a/pydantic/deprecated/class_validators.py b/pydantic/deprecated/class_validators.py index ad92864..452bd21 100644 --- a/pydantic/deprecated/class_validators.py +++ b/pydantic/deprecated/class_validators.py @@ -246,11 +246,9 @@ def root_validator( wrap = partial(_decorators_v1.make_v1_generic_root_valida...
["tests/test_construction.py::test_copy_update_exclude", "tests/test_validators.py::test_root_validator_self"]
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
2
9
2
1,607
0
0.6
1
0.75
1
0.297833
81.1685
5,542
swe_smith::train::5122
swe_smith
train
5,122
agronholm__exceptiongroup.0b4f4937.func_basic__4rd058i0
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
Context manager catch() fails to handle exceptions properly #### Description The `catch()` context manager is not working correctly when exceptions are raised within the context. Instead of properly handling and catching exceptions, it appears to be treating the traceback object incorrectly, leading to unexpected beh...
diff --git a/src/exceptiongroup/_catch.py b/src/exceptiongroup/_catch.py index 0246568..e393b35 100644 --- a/src/exceptiongroup/_catch.py +++ b/src/exceptiongroup/_catch.py @@ -27,25 +27,23 @@ class _Catcher: exc: BaseException | None, tb: TracebackType | None, ) -> bool: - if exc is not N...
["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_handler_raises", "tests/test_catch.py::test_bare_raise_in...
["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
22
10
1,347
0
0.6
1
0.75
1
0.297833
81.1685
5,543
swe_smith::train::30469
swe_smith
train
30,469
pyca__pyopenssl.04766a49.lm_rewrite__pt6nig53
swesmith/pyca__pyopenssl.04766a49
pyca/pyopenssl
python
null
### Description There seems to be an issue with the handling of exceptions raised by passphrase callbacks in the `OpenSSL` library. Specifically, when a passphrase callback raises an exception, the expected behavior is not consistently observed. ### Steps/Code to Reproduce To reproduce the issue, you can use the follo...
diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index 448a19a..4a5e6a7 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -2273,16 +2273,17 @@ class _PassphraseHelper: "Last argument must be a byte string or a callable." ) - def raise_if_problem(self, excepti...
["tests/test_crypto.py::TestFunction::test_load_privatekey_passphrase_exception", "tests/test_crypto.py::TestFunction::test_load_privatekey_passphrase_wrong_return_type", "tests/test_crypto.py::TestFunction::test_load_privatekey_passphrase_callback_length", "tests/test_crypto.py::TestFunction::test_dump_privatekey_pass...
["tests/test_crypto.py::TestX509Ext::test_str", "tests/test_crypto.py::TestX509Ext::test_type", "tests/test_crypto.py::TestX509Ext::test_construction", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[thisIsMadeUp-False-hi]", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[proxyCertInfo-True-langua...
jyangballin/swesmith.x86_64.pyca_1776_pyopenssl.04766a49
true
null
1
19
7
1,405
0
0.6
1
0.75
1
0.2975
81.1675
5,544
swe_smith::train::17861
swe_smith
train
17,861
pyasn1__pyasn1.0f07d724.func_pm_class_rm_funcs__tannujw8
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
BER decoder fails on indefinite length octet strings #### Description When decoding BER-encoded data with indefinite length octet strings, the decoder raises an AttributeError. This affects various ASN.1 structures that use indefinite length encoding for octet strings. #### Steps/Code to Reproduce ```python from py...
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index 7e69ca1..b2436e3 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -338,43 +338,6 @@ class OctetStringPayloadDecoder(AbstractSimplePayloadDecoder): yield self._createComponent(asn1Spec, tagSet, header, **...
["tests/codec/ber/test_decoder.py::OctetStringDecoderTestCase::testIndefMode", "tests/codec/ber/test_decoder.py::OctetStringDecoderTestCase::testIndefModeChunked", "tests/codec/ber/test_decoder.py::OctetStringDecoderTestCase::testIndefModeChunkedSubst", "tests/codec/ber/test_decoder.py::OctetStringDecoderTestCase::test...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
37
25
1,045
0
0.6
1
0.75
1
0.2975
81.1675
5,545
swe_smith::train::18374
swe_smith
train
18,374
msiemens__tinydb.10644a0e.lm_rewrite__avoumrgh
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
# Query with no path raises RuntimeError instead of ValueError ## Description I found a bug in TinyDB's query system. When creating a query without specifying a path, it raises a `RuntimeError` instead of a `ValueError`. For example, this code: ```python from tinydb import Query # Create a query without a path que...
diff --git a/tinydb/queries.py b/tinydb/queries.py index 0ef6a69..29e4fbd 100644 --- a/tinydb/queries.py +++ b/tinydb/queries.py @@ -204,12 +204,8 @@ class Query(QueryInstance): # ``Query.test`` method return self.__getattr__(item) - def _generate_test( - self, - test: Calla...
["tests/test_queries.py::test_no_path"]
["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
40
1
985
0
0.6
1
0.75
1
0.2975
81.1675
5,546
swe_smith::train::29614
swe_smith
train
29,614
django__channels.a144b4b8.func_pm_class_rm_funcs__nb38izp6
swesmith/django__channels.a144b4b8
django/channels
python
null
# URLRouter initialization broken after recent changes ## Description I'm trying to use the URLRouter class but it seems to be broken after a recent update. When trying to create a URLRouter instance, I get a TypeError. ## Steps to reproduce: ```python from channels.routing import URLRouter from django.urls import ...
diff --git a/channels/routing.py b/channels/routing.py index f48c4d3..3bdbfa3 100644 --- a/channels/routing.py +++ b/channels/routing.py @@ -66,28 +66,6 @@ class URLRouter: #: treated as endpoints (ended with ``$``), but similar to ``include()``. _path_routing = True - def __init__(self, routes): - ...
["tests/test_testing.py::test_websocket_application", "tests/test_routing.py::test_url_router", "tests/test_routing.py::test_url_router_nesting", "tests/test_routing.py::test_url_router_nesting_path", "tests/test_routing.py::test_url_router_path", "tests/test_routing.py::test_path_remaining", "tests/test_routing.py::te...
["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_generic_websocket.py::test_websocket...
jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8
true
null
1
23
7
1,324
0
0.6
1
0.75
1
0.297333
81.167
5,547
swe_smith::train::18090
swe_smith
train
18,090
pndurette__gTTS.dbcda4f3.combine_file__y5mc8b4v
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
gTTSError constructor parameters swapped causing TypeError When creating a gTTS object and calling save(), getting a TypeError about 'fp' not being a file-like object. This seems to be happening because the gTTSError exception constructor has its parameters mixed up. #### Steps/Code to Reproduce ```python from gtts ...
diff --git a/gtts/tts.py b/gtts/tts.py index eae351f..dfb0a79 100644 --- a/gtts/tts.py +++ b/gtts/tts.py @@ -251,8 +251,6 @@ class gTTS: :class:`gTTSError`: When there's an error with the API request. """ - # When disabling ssl verify in requests (for proxies and firewalls), - # ur...
["gtts/tests/test_cli.py::test_lang_nocheck", "gtts/tests/test_cli.py::test_params_set", "gtts/tests/test_cli.py::test_stdin_text", "gtts/tests/test_cli.py::test_stdin_text_unicode", "gtts/tests/test_cli.py::test_stdin_file", "gtts/tests/test_cli.py::test_stdin_file_unicode", "gtts/tests/test_cli.py::test_text", "gtts/...
["gtts/tests/test_cli.py::test_text_no_text_or_file", "gtts/tests/test_cli.py::test_text_text_and_file", "gtts/tests/test_cli.py::test_text_empty", "gtts/tests/test_cli.py::test_file_not_exists", "gtts/tests/test_cli.py::test_all", "gtts/tests/test_cli.py::test_lang_not_valid", "gtts/tests/test_lang.py::test_main_langs...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
true
null
1
43
77
924
0
0.6
1
0.75
1
0.297333
81.167
5,548
swe_smith::train::36471
swe_smith
train
36,471
lincolnloop__python-qrcode.456b01d4.combine_file__h65ul8ra
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
QR code generation fails with TypeError when using image factories #### Description When generating QR codes with various image factories (SVG, styled PIL images, etc.), the code raises `TypeError: 'NoneType' object is not callable` errors. This affects multiple image factory types including SVG images, styled PIL im...
diff --git a/qrcode/image/base.py b/qrcode/image/base.py index 4e8468b..008b079 100644 --- a/qrcode/image/base.py +++ b/qrcode/image/base.py @@ -22,12 +22,12 @@ class BaseImage: needs_drawrect = True def __init__(self, border, width, box_size, *args, **kwargs): - self.border = border - self.wi...
["qrcode/tests/test_qrcode_pil.py::test_render_styled_Image", "qrcode/tests/test_qrcode_pil.py::test_render_styled_with_embeded_image", "qrcode/tests/test_qrcode_pil.py::test_render_styled_with_embeded_image_path", "qrcode/tests/test_qrcode_pil.py::test_render_styled_with_drawer[CircleModuleDrawer]", "qrcode/tests/test...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
18
27
1,424
0
0.6
1
0.75
1
0.297333
81.167
5,549
swe_smith::train::45998
swe_smith
train
45,998
conan-io__conan.86f29e13.pr_12246
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
# Git.included_files() method missing in conan.tools.scm.git ## Description The `included_files()` method has been removed from the `Git` class in `conan/tools/scm/git.py`. This method was responsible for getting the list of files not ignored by `.gitignore` by running the command `git ls-files --full-name --others --...
diff --git a/conan/tools/scm/git.py b/conan/tools/scm/git.py index c7bcb6f..c207a18 100644 --- a/conan/tools/scm/git.py +++ b/conan/tools/scm/git.py @@ -249,17 +249,6 @@ class Git: self._conanfile.output.info("Checkout: {}".format(commit)) self.run('checkout {}'.format(commit)) - def included_fil...
["test/functional/tools/scm/test_git.py::TestGitIncluded::test_git_included", "test/functional/tools/scm/test_git.py::TestGitIncluded::test_git_included_subfolder"]
["test/functional/tools/scm/test_git.py::TestGitBasicCapture::test_capture_commit_local", "test/functional/tools/scm/test_git.py::TestGitBasicCapture::test_capture_remote_url", "test/functional/tools/scm/test_git.py::TestGitBasicCapture::test_capture_remote_pushed_commit", "test/functional/tools/scm/test_git.py::TestGi...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
13
2
1,524
0
0.6
1
0.75
1
0.297333
81.167
5,550
r2e_gym::train::4499
r2e_gym
train
4,499
numpy__0a8786163133c4227bfa7dbc3c9a6800172b65f7
numpy
numpy/numpy
python
0a8786163133c4227bfa7dbc3c9a6800172b65f7
Title: `recfromcsv` Fails to Correctly Set Dtype for Bytes Columns **Description** When using `np.recfromcsv` with converters to process bytes columns, the dtype is incorrectly set, causing mismatches between the expected and actual data types. This issue arises particularly when stripping quotes from byte strings, l...
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -2042,7 +2042,6 @@ strcolidx = [i for (i, v) in enumerate(column_types) if v == np.unicode_] - type_str = np.unicode_ if byte_converters and strcolidx: ...
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -2056,6 +2056,13 @@ assert_(isinstance(test, np.recarray)) assert_equal(test, control) + #gh-10394 + data = TextIO('color\n"red"\n"blue"') + ...
null
null
namanjain12/numpy_final:0a8786163133c4227bfa7dbc3c9a6800172b65f7
true
null
1
41
null
1,676
0
0.75
1
0.6375
1
0.416
81.16675
5,551
swe_smith::train::3366
swe_smith
train
3,366
pygments__pygments.27649ebb.combine_file__db7cy0wg
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
# Incorrect token handling in Lisp lexers ## Bug description I've discovered an issue with the Lisp lexers in Pygments. The lexers are incorrectly handling tokens, particularly in the CommonLispLexer and ShenLexer classes. When trying to highlight Lisp code, the lexer produces incorrect token types for special forms...
diff --git a/pygments/lexers/lisp.py b/pygments/lexers/lisp.py index e6cc587..a4532ff 100644 --- a/pygments/lexers/lisp.py +++ b/pygments/lexers/lisp.py @@ -336,23 +336,23 @@ class CommonLispLexer(RegexLexer): if value in self.builtin_function: yield index, Name.Builtin, value ...
["tests/test_basic_api.py::test_lexer_options[ShenLexer]", "tests/test_basic_api.py::test_random_input[ShenLexer]", "tests/examplefiles/shen/test.shen::", "tests/examplefiles/common-lisp/type.lisp::"]
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
12
4
1,543
0
0.6
1
0.75
1
0.297167
81.1665
5,552
swe_smith::train::38978
swe_smith
train
38,978
pallets__jinja.ada0a9a6.func_basic__clenc07i
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Sort filter with attribute parameter broken for nested attributes #### Description The `sort` filter is not working correctly when using the `attribute` parameter with nested attributes or multiple attributes. It appears to be accessing attributes in the wrong order and not properly handling the base object. #### St...
diff --git a/src/jinja2/filters.py b/src/jinja2/filters.py index 1420877..6721ea6 100644 --- a/src/jinja2/filters.py +++ b/src/jinja2/filters.py @@ -108,12 +108,12 @@ def make_multi_attrgetter( items = [None] * len(parts) for i, attribute_part in enumerate(parts): - item_i = item + ...
["tests/test_filters.py::TestFilter::test_sort1", "tests/test_filters.py::TestFilter::test_sort2", "tests/test_filters.py::TestFilter::test_sort3", "tests/test_filters.py::TestFilter::test_sort4", "tests/test_filters.py::TestFilter::test_sort5", "tests/test_filters.py::TestFilter::test_sort6", "tests/test_filters.py::T...
["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
6
8
1,663
0
0.6
1
0.75
1
0.297167
81.1665
5,553
swe_smith::train::32929
swe_smith
train
32,929
pydantic__pydantic.acb0f10f.pr_6136
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Protected namespace validation raises NameError instead of warning #### Description When defining a model with fields that conflict with protected namespaces, the validation now raises a `NameError` instead of issuing a `UserWarning` as expected. #### Steps/Code to Reproduce ```python from pydantic import BaseModel...
diff --git a/pydantic/_internal/_fields.py b/pydantic/_internal/_fields.py index 23f964f..5f2f3cd 100644 --- a/pydantic/_internal/_fields.py +++ b/pydantic/_internal/_fields.py @@ -122,43 +122,10 @@ def collect_model_fields( # noqa: C901 class_vars: set[str] = set() for ann_name, (ann_type, evaluated) in t...
["tests/test_config.py::test_config_inheritance_with_annotations", "tests/test_config.py::test_empty_config_with_annotations", "tests/test_create_model.py::test_create_model_protected_namespace_default", "tests/test_create_model.py::test_create_model_custom_protected_namespace", "tests/test_create_model.py::test_create...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
41
11
963
0
0.6
1
0.75
1
0.297167
81.1665
5,554
swe_smith::train::34921
swe_smith
train
34,921
pyutils__line_profiler.a646bf0f.combine_module__e2mdnink
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
# [BUG] Import profiling broken in AstProfileTransformer ## Description When trying to use the autoprofile functionality with imports, it fails to properly profile code. The issue appears to be related to the handling of import statements in the AST transformer. ## Steps to reproduce ```python # example.py import n...
diff --git a/line_profiler/autoprofile/ast_profle_transformer.py b/line_profiler/autoprofile/ast_profle_transformer.py index 06772ab..35b7fff 100644 --- a/line_profiler/autoprofile/ast_profle_transformer.py +++ b/line_profiler/autoprofile/ast_profle_transformer.py @@ -118,22 +118,6 @@ class AstProfileTransformer(ast.No...
["tests/test_autoprofile.py::test_autoprofile_module", "tests/test_autoprofile.py::test_autoprofile_module_list", "tests/test_autoprofile.py::test_autoprofile_module_with_prof_imports", "tests/test_autoprofile.py::test_autoprofile_script_with_prof_imports"]
["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_cli.py::test_cli", "tests/test_cli.py::test_versio...
jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f
true
null
2
27
4
1,243
0
0.6
1
0.75
1
0.297167
81.1665
5,555
swe_smith::train::52582
swe_smith
train
52,582
pydicom__pydicom.7d361b3d.func_pm_remove_cond__if3zgo04
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
## compress() function broken after recent changes #### Description The `compress()` function in `pydicom.pixels.utils` is currently broken and raises a `NameError` when called. It appears that some critical code was accidentally removed that handles the encoding logic. #### Steps/Code to Reproduce ```python import...
diff --git a/src/pydicom/pixels/utils.py b/src/pydicom/pixels/utils.py index f9a31a8..c8d76f7 100644 --- a/src/pydicom/pixels/utils.py +++ b/src/pydicom/pixels/utils.py @@ -399,39 +399,6 @@ def compress( if uid == JPEGLSNearLossless and jls_error is not None: kwargs["jls_error"] = jls_error - if uid ...
["tests/pixels/test_encoder_base.py::TestDatasetCompress::test_compress_inplace", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_encapsulate_extended", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_planar_configuration_rle", "tests/pixels/test_encoder_base.py::TestFuture::test_compress", ...
["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
34
7
1,102
0
0.6
1
0.75
1
0.297
81.166
5,556
swe_smith::train::5086
swe_smith
train
5,086
agronholm__exceptiongroup.0b4f4937.combine_module__1ebqjjwn
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
ExceptionGroup.split() returns inverted results #### Description The `split()` method on ExceptionGroup is returning the matching and non-matching groups in the wrong order. When splitting an exception group, the method should return `(matching_group, nonmatching_group)` but it's currently returning `(nonmatching_gro...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..bf114d9 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -212,8 +212,8 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]): ] ): condition...
["tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_no_match", "tests/test_catch.py::test_catch_full_match", "tests/test_catch.py::test_catch_handler_raises", "tests/test_catch.py::test_bare_raise_in_hand...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
2
23
26
1,322
0
0.6
1
0.75
1
0.297
81.166
5,557
swe_smith::train::10927
swe_smith
train
10,927
paramiko__paramiko.23f92003.lm_rewrite__nkti4duq
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Key exchange fails when server and client modes are mixed Description I've discovered an issue with the key exchange process in Paramiko. When a client connects to a server, the key exchange fails if the server and client modes are mixed. Here's a simple reproduction script: ```python import paramiko import socket ...
diff --git a/paramiko/kex_group1.py b/paramiko/kex_group1.py index f074256..4bf1adf 100644 --- a/paramiko/kex_group1.py +++ b/paramiko/kex_group1.py @@ -68,13 +68,21 @@ class KexGroup1: self.transport._expect_packet(_MSG_KEXDH_REPLY) def parse_next(self, ptype, m): - if self.transport.server_mode...
["tests/test_config.py::TestMatchHost::test_requires_an_argument"]
["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
18
1
1,422
0
0.6
1
0.75
1
0.297
81.166
5,558
swe_smith::train::27801
swe_smith
train
27,801
arrow-py__arrow.1d70d009.lm_rewrite__c4vurhst
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
# Arrow object missing 'week' and 'quarter' attributes ## Description I've encountered an issue with the Arrow library where the `week` and `quarter` attributes are no longer accessible on Arrow objects. This is breaking my code that relies on these attributes. Python 3.10; Arrow latest version When trying to acces...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..6fe78d6 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -800,20 +800,10 @@ class Arrow: # attributes and properties def __getattr__(self, name: str) -> Any: - if name == "week": - return self.isocalendar()[1] - - if nam...
["tests/test_arrow.py::TestArrowAttribute::test_getattr_week", "tests/test_arrow.py::TestArrowAttribute::test_getattr_quarter", "tests/test_arrow.py::TestArrowPickling::test_pickle_and_unpickle"]
["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
18
3
1,422
0
0.6
1
0.75
1
0.297
81.166
5,559
swe_smith::train::24515
swe_smith
train
24,515
sunpy__sunpy.f8edfd5c.combine_module__kf9xao7z
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# GOES NetCDF files not loading properly When trying to load GOES NetCDF files, I'm getting errors. The issue seems to be in the GOES XRS TimeSeries class. ## Description I'm trying to load GOES data from NetCDF files, but it's failing with a NameError. The error message indicates that `xrsb_quality` is not defined....
diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py index 08e2a6a..cee3878 100644 --- a/sunpy/timeseries/sources/goes.py +++ b/sunpy/timeseries/sources/goes.py @@ -232,21 +232,17 @@ class XRSTimeSeries(GenericTimeSeries): flux_flag_a = h5nc.variables.get("a_flags") or h5nc.vari...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g15_d20131028_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.p...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/go1520120601.fits.gz-GOES-15]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno_missin...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
33
25
1,121
0
0.6
1
0.75
1
0.296833
81.1655
5,560
swe_smith::train::43845
swe_smith
train
43,845
pydata__patsy.a5d16484.combine_file__z4jp8ixm
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Formula parsing broken with integer literals #### Description When using integer literals in formulas, the parser fails to correctly identify them as numbers, causing various parsing errors throughout the codebase. #### Steps/Code to Reproduce ```python import patsy from patsy import dmatrix # This should work but...
diff --git a/patsy/parse_formula.py b/patsy/parse_formula.py index 1a324f7..e1b3f58 100644 --- a/patsy/parse_formula.py +++ b/patsy/parse_formula.py @@ -27,16 +27,14 @@ _atomic_token_types = ["PYTHON_EXPR", "ZERO", "ONE", "NUMBER"] def _is_a(f, v): try: f(v) - except ValueError: + except TypeError:...
["patsy/desc.py::test_ModelDesc_from_formula", "patsy/desc.py::test_eval_formula", "patsy/desc.py::test_eval_formula_error_reporting", "patsy/desc.py::test_formula_factor_origin", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines...
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
28
29
1,221
0
0.6
1
0.75
1
0.296833
81.1655
5,561
swe_smith::train::8056
swe_smith
train
8,056
cantools__cantools.0c6a7871.func_pm_remove_assign__f0577vtu
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
C source generation fails with NameError: name 'signal_definitions' is not defined #### Description When generating C source code from DBC files, the code generation process crashes with a NameError indicating that 'signal_definitions' is not defined. This affects all C source generation functionality. #### Steps/Co...
diff --git a/src/cantools/database/can/c_source.py b/src/cantools/database/can/c_source.py index cf3c40e..191367e 100644 --- a/src/cantools/database/can/c_source.py +++ b/src/cantools/database/can/c_source.py @@ -1495,12 +1495,10 @@ def _generate_definitions(database_name: str, use_float: boo...
["tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source", "tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_bit_fields", "tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_database_name", "tests/test_command_line.py::CanToolsCommandLineTest::tes...
["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
43
9
921
0
0.6
1
0.75
1
0.296833
81.1655
5,562
swe_smith::train::24347
swe_smith
train
24,347
sunpy__sunpy.f8edfd5c.func_pm_remove_loop__1ukynjyh
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
VSO query response table time columns not parsed correctly #### Description When creating a VSO query response table, time columns ending with 'Time' are no longer being parsed into proper Time objects. The time parsing logic appears to have been removed, causing time values to remain as raw strings instead of being ...
diff --git a/sunpy/net/vso/table_response.py b/sunpy/net/vso/table_response.py index 8a70523..23228b4 100644 --- a/sunpy/net/vso/table_response.py +++ b/sunpy/net/vso/table_response.py @@ -97,33 +97,10 @@ class VSOQueryResponseTable(QueryResponseTable): row[key_template] = subvalue ...
["sunpy/net/vso/tests/test_vso.py::test_QueryResponse_build_table_with_no_start_time", "sunpy/net/vso/tests/test_vso.py::test_QueryResponse_build_table_with_no_end_time"]
["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
23
2
1,320
0
0.6
1
0.75
1
0.296667
81.165
5,563
swe_smith::train::42682
swe_smith
train
42,682
python-jsonschema__jsonschema.93e0caa5.func_pm_ctrl_invert_if__1zkz5a09
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
exclusiveMinimum validation logic inverted in Draft 3/4 #### Description The validation logic for `exclusiveMinimum` in Draft 3 and Draft 4 schemas appears to be inverted. When `exclusiveMinimum` is set to `true`, values equal to the minimum should be invalid, but they're currently being accepted as valid. Conversely...
diff --git a/jsonschema/_legacy_keywords.py b/jsonschema/_legacy_keywords.py index c691589..87ec86b 100644 --- a/jsonschema/_legacy_keywords.py +++ b/jsonschema/_legacy_keywords.py @@ -140,17 +140,16 @@ def minimum_draft3_draft4(validator, minimum, instance, schema): return if schema.get("exclusiveMinim...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft3::test_bignum_float_comparison_with_high_precision_on_negative_numbers_comparison_works_for_very_negative_numbers", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft3::test_minimum_exclusiveMinimum_validation_boundary_point_is_invalid", "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
7
13
1,639
0
0.6
1
0.75
1
0.2965
81.1645
5,564
swe_smith::train::32271
swe_smith
train
32,271
davidhalter__parso.338a5760.func_pm_remove_cond__5bg5hfli
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
DiffParser fails to track indentation state properly after removing error handling logic #### Description The diff parser is not correctly maintaining indentation state when processing Python code with complex indentation patterns. This causes issues when parsing code that contains functions, classes, and other inden...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..5ab5219 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -477,12 +477,7 @@ class DiffParser: while True: typ, string, start_pos, prefix = token = next(tokens) if ...
["test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_parser.py::test_one_statement_func", "test/test_diff_parser.py::test_for_on_one_line", "test/test_diff_parser.py::test_open_parentheses", "test/test_diff_parser.py::test_backslash", "test/test_diff_p...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
16
51
1,459
0
0.6
1
0.75
1
0.2965
81.1645
5,565
swe_smith::train::26569
swe_smith
train
26,569
pylint-dev__astroid.b114f6b5.lm_rewrite__eg8w0dj0
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
# Bug in ImportNode.real_name method ## Description I found a bug in the `real_name` method of the `ImportNode` class. The method is not correctly handling wildcard imports and is returning incorrect names for certain import statements. ## Current behavior When using the `real_name` method on an `ImportNode` with w...
diff --git a/astroid/nodes/_base_nodes.py b/astroid/nodes/_base_nodes.py index 65b703d..30506dc 100644 --- a/astroid/nodes/_base_nodes.py +++ b/astroid/nodes/_base_nodes.py @@ -175,19 +175,9 @@ class ImportNode(FilterStmtsBaseNode, NoChildrenNode, Statement): def real_name(self, asname: str) -> str: """Ge...
["tests/test_nodes.py::ImportNodeTest::test_real_name"]
["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
14
1
1,498
0
0.6
1
0.75
1
0.296333
81.164
5,566
swe_smith::train::50877
swe_smith
train
50,877
python-hyper__h11.bed0dd4a.func_pm_class_rm_funcs__9kzx2763
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
# ChunkedReader class missing __init__ method ## Description I found a bug in the h11 library where the ChunkedReader class is missing its __init__ method. This causes errors when trying to use chunked encoding in HTTP requests or responses. When trying to use chunked transfer encoding, operations fail with an Attri...
diff --git a/h11/_readers.py b/h11/_readers.py index 08a9574..c2a6624 100644 --- a/h11/_readers.py +++ b/h11/_readers.py @@ -146,13 +146,6 @@ chunk_header_re = re.compile(chunk_header.encode("ascii")) class ChunkedReader: - def __init__(self) -> None: - self._bytes_in_chunk = 0 - # After reading a...
["h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_connection.py::test_automatic_transfer_encoding_in_response", "h11/tests/test_connection.py::test_100_continue", "h11/tests/test_connection.py::test_reuse_simple", "h11/tests/test_connection.py::test_pr...
["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
8
9
1,618
0
0.6
1
0.75
1
0.296333
81.164
5,567
swe_smith::train::3428
swe_smith
train
3,428
pygments__pygments.27649ebb.combine_file__lb8l4oah
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Elixir lexer broken after recent changes #### Description The Elixir lexer is throwing `ValueError: uncompilable regex` errors when trying to tokenize Elixir code. This appears to be affecting both the main ElixirLexer and ElixirConsoleLexer classes. #### Steps/Code to Reproduce ```python from pygments.lexers impor...
diff --git a/pygments/lexers/erlang.py b/pygments/lexers/erlang.py index 1190182..73194f2 100644 --- a/pygments/lexers/erlang.py +++ b/pygments/lexers/erlang.py @@ -191,10 +191,10 @@ def gen_elixir_string_rules(name, symbol, token): states = {} states['string_' + name] = [ (rf'[^#{symbol}\\]+', token...
["tests/test_basic_api.py::test_lexer_options[ElixirLexer]", "tests/test_basic_api.py::test_random_input[ElixirLexer]", "tests/test_basic_api.py::test_lexer_classes[ElixirLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_lexer_options[ElixirConsoleLexer]", "tests/test_basic_api.py::tes...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
40
8
978
0
0.6
1
0.75
1
0.296333
81.164
5,568
swe_smith::train::38356
swe_smith
train
38,356
burnash__gspread.a8be3b96.lm_rewrite__a0qbmmfe
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
TypeError when using range and named range methods Description After the recent changes, there seems to be an issue with the `range` and `define_named_range` methods in the worksheet. When attempting to use these methods with row and column indices, a TypeError is raised, indicating that the expected input is not bei...
diff --git a/gspread/utils.py b/gspread/utils.py index 6daac86..c18621e 100644 --- a/gspread/utils.py +++ b/gspread/utils.py @@ -581,35 +581,27 @@ def cast_to_a1_notation(method: Callable[..., T]) -> Callable[..., T]: """Decorator function casts wrapped arguments to A1 notation in range method calls. """...
["tests/cell_test.py::CellTest::test_define_named_range", "tests/cell_test.py::CellTest::test_merge_cells", "tests/worksheet_test.py::WorksheetTest::test_basic_filters", "tests/worksheet_test.py::WorksheetTest::test_range", "tests/worksheet_test.py::WorksheetTest::test_range_unbounded"]
["tests/cell_test.py::CellTest::test_a1_value", "tests/cell_test.py::CellTest::test_delete_named_range", "tests/cell_test.py::CellTest::test_equality", "tests/cell_test.py::CellTest::test_numeric_value", "tests/cell_test.py::CellTest::test_properties", "tests/client_test.py::ClientTest::test_access_non_existing_spreads...
jyangballin/swesmith.x86_64.burnash_1776_gspread.a8be3b96
true
null
1
44
5
897
0
0.6
1
0.75
1
0.296167
81.1635
5,569
swe_smith::train::48224
swe_smith
train
48,224
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__hw7414mu
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Config loading broken due to variable reference before assignment #### Description When loading SQLFluff configuration from ini-style config strings, the code fails with an `UnboundLocalError` because variables are being referenced before they are assigned. #### Steps/Code to Reproduce ```python from sqlfluff.core....
diff --git a/src/sqlfluff/core/config/ini.py b/src/sqlfluff/core/config/ini.py index 4c6290b..b6572ad 100644 --- a/src/sqlfluff/core/config/ini.py +++ b/src/sqlfluff/core/config/ini.py @@ -34,26 +34,12 @@ def coerce_value(val: str) -> ConfigValueType: def load_ini_string(cfg_content: str) -> ConfigMappingType: - ...
["test/core/config/fluffconfig_test.py::test__config__from_strings", "test/core/config/fluffconfig_test.py::test__config__nested_config_tests", "test/core/config/fluffconfig_test.py::test__config__templater_selection[raw-RawTemplater-False]", "test/core/config/fluffconfig_test.py::test__config__templater_selection[jinj...
["test/core/config/loader_test.py::test__config__load_toml", "test/core/config/loader_test.py::test__config__load_user_appdir_config", "test/core/config/validate_test.py::test__validate_configs_direct", "test/core/config/validate_test.py::test__validate_configs_precedence_same_file"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
44
28
897
0
0.6
1
0.75
1
0.296167
81.1635
5,570
swe_smith::train::3519
swe_smith
train
3,519
pygments__pygments.27649ebb.combine_file__u3vz2wp2
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Perl lexer incorrectly identifies non-Perl code as Perl #### Description The Perl lexer's `analyse_text` method is incorrectly identifying various programming languages as Perl code. This causes the lexer guesser to return `PerlLexer` instead of the correct lexer for languages like Brainfuck, Ezhil, CMake, and others...
diff --git a/pygments/lexers/perl.py b/pygments/lexers/perl.py index 3ec1944..31b2716 100644 --- a/pygments/lexers/perl.py +++ b/pygments/lexers/perl.py @@ -208,17 +208,15 @@ class PerlLexer(RegexLexer): def analyse_text(text): if shebang_matches(text, r'perl'): - return True + ret...
["tests/test_cmdline.py::test_C_opt", "tests/test_basic_api.py::test_get_lexers", "tests/examplefiles/perl6/RoleQ.pm6::", "tests/examplefiles/perl6/grammar-test.p6::", "tests/examplefiles/perl6/test.p6::", "tests/test_guess.py::test_guess_lexer_forth", "tests/test_guess.py::test_guess_lexer_gap", "tests/test_guess.py::...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
36
17
1,057
0
0.6
1
0.75
1
0.296167
81.1635
5,571
r2e_gym::train::4755
r2e_gym
train
4,755
numpy__48ee0b25f07bd770c5fe5d328463505f535b4d1d
numpy
numpy/numpy
python
48ee0b25f07bd770c5fe5d328463505f535b4d1d
**Title:** `np.interp` Raises TypeError When Using `period` Parameter for Periodic Coordinates **Description:** When attempting to use the `period` parameter with `np.interp` to handle periodic x-coordinates, a `TypeError` is raised indicating that `period` is an unexpected keyword argument. This prevents proper inter...
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 @@ -1102,7 +1102,7 @@ return a[slice1]-a[slice2] -def interp(x, xp, fp, left=None, right=None): +def interp(x, xp, fp, left=None, right=None, period=None): """ On...
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 @@ -1602,6 +1602,9 @@ def test_exceptions(self): assert_raises(ValueError, interp, 0, [], []) assert_raises(ValueError...
null
null
namanjain12/numpy_final:48ee0b25f07bd770c5fe5d328463505f535b4d1d
true
null
1
65
null
1,189
0
0.75
1
0.6375
1
0.414833
81.16325
5,572
r2e_gym::train::193
r2e_gym
train
193
orange3__588579388e87680b94e1fcf046611ef0b60b62d2
orange3
biolab/orange3
python
588579388e87680b94e1fcf046611ef0b60b62d2
**Analysis:** - **Key Parts:** - **Commit Message:** "Distances: Warn when data has no features." - **Test Results:** Before the commit, `test_no_features` failed with `AttributeError: 'Warning' object has no attribute 'no_features'`. After the commit, the test passes. - **Commit Patch:** Introduces a new warnin...
diff --git a/Orange/widgets/unsupervised/owdistances.py b/Orange/widgets/unsupervised/owdistances.py --- a/Orange/widgets/unsupervised/owdistances.py +++ b/Orange/widgets/unsupervised/owdistances.py @@ -127,6 +127,7 @@ unsupported_sparse = Msg("Some metrics don't support sparse data\n" ...
diff --git a/Orange/widgets/unsupervised/tests/test_owdistances.py b/Orange/widgets/unsupervised/tests/test_owdistances.py --- a/Orange/widgets/unsupervised/tests/test_owdistances.py +++ b/Orange/widgets/unsupervised/tests/test_owdistances.py @@ -265,6 +265,27 @@ out_domain = out.row_items.domain self...
null
null
namanjain12/orange3_final:588579388e87680b94e1fcf046611ef0b60b62d2
true
null
1
7
null
2,349
0
0.75
1
0.6375
1
0.414833
81.16325
5,573
swe_smith::train::6913
swe_smith
train
6,913
cantools__cantools.0c6a7871.combine_file__07mxw5uc
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
CDD file parsing fails with AttributeError when loading diagnostics database #### Description When loading CDD files for diagnostics database, the parser fails with `AttributeError: 'NoneType' object has no attribute 'find'`. This appears to affect both big-endian and little-endian CDD files. #### Steps/Code to Repr...
diff --git a/src/cantools/database/diagnostics/formats/cdd.py b/src/cantools/database/diagnostics/formats/cdd.py index b25f9d5..5053d57 100644 --- a/src/cantools/database/diagnostics/formats/cdd.py +++ b/src/cantools/database/diagnostics/formats/cdd.py @@ -181,7 +181,7 @@ def _load_did_element(did, data_types, did_data...
["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
1
24
8
1,296
0
0.6
1
0.75
1
0.296
81.163
5,574
swe_smith::train::46926
swe_smith
train
46,926
python-trio__trio.cfbbe2c1.func_basic__is468wzx
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SSL handshake fails with "Cannot determine peer" error #### Description SSL connections are failing during handshake with various SSL errors including "Cannot determine peer" and other SSL-related failures. This appears to affect both client and server SSL connections across different TLS versions. #### Steps/Code t...
diff --git a/src/trio/_ssl.py b/src/trio/_ssl.py index 0a0419f..251ee11 100644 --- a/src/trio/_ssl.py +++ b/src/trio/_ssl.py @@ -364,27 +364,22 @@ class SSLStream(Stream, Generic[T_Stream]): ) -> None: self.transport_stream: T_Stream = transport_stream self._state = _State.OK - self._https...
["src/trio/_tests/test_highlevel_ssl_helpers.py::test_open_ssl_over_tcp_stream_and_everything_else[tls13]", "src/trio/_tests/test_highlevel_ssl_helpers.py::test_open_ssl_over_tcp_stream_and_everything_else[tls12]", "src/trio/_tests/test_path.py::test_open_is_async_context_manager", "src/trio/_tests/test_socket.py::test...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
17
64
1,436
0
0.6
1
0.75
1
0.296
81.163
5,575
swe_smith::train::1940
swe_smith
train
1,940
agronholm__typeguard.b6a7e438.lm_rewrite__2ibnkhja
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Self type annotation doesn't work with class objects I found an issue with the `Self` type annotation when used with class objects. The `Self` type should work with both instances and class objects, but it seems to only work with instances. **To Reproduce** Here's a minimal example that demonstrates the issue: ``...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..0bd4901 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -852,25 +852,24 @@ def check_byteslike( raise TypeCheckError("is not bytes-like") -def check_self( - value: Any, - origin_type: Any, ...
["tests/test_typechecked.py::TestSelf::test_self_type_valid", "tests/test_typechecked.py::TestSelf::test_self_type_invalid"]
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
35
2
1,076
0
0.6
1
0.75
1
0.296
81.163
5,576
swe_smith::train::5170
swe_smith
train
5,170
agronholm__exceptiongroup.0b4f4937.func_pm_op_change__i3gfg862
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
# Levenshtein distance calculation broken in _formatting.py ### Describe the bug The Levenshtein distance calculation in `_formatting.py` is broken, which affects the "Did you mean" suggestions for NameError and AttributeError exceptions. The suggestions are not being generated correctly. ### Steps/Code to Reproduce...
diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py index 4c52d77..500eb3e 100644 --- a/src/exceptiongroup/_formatting.py +++ b/src/exceptiongroup/_formatting.py @@ -554,7 +554,7 @@ def _levenshtein_distance(a, b, max_cost): a = a[pre:] b = b[pre:] post = 0 - while a[: p...
["tests/test_formatting.py::test_nameerror_suggestions[patched]", "tests/test_formatting.py::test_nameerror_suggestions[unpatched]", "tests/test_formatting.py::test_nameerror_suggestions_in_group[patched]", "tests/test_formatting.py::test_nameerror_suggestions_in_group[unpatched]"]
["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
8
4
1,616
0
0.6
1
0.75
1
0.296
81.163
5,577
swe_smith::train::19481
swe_smith
train
19,481
seperman__deepdiff.ed252022.lm_rewrite__6o6xruj2
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
# Delta.__rsub__ breaks when bidirectional=False ## Description The `Delta.__rsub__` method doesn't work correctly when a Delta is created with `bidirectional=False`. This causes operations like `t2 - delta` to fail with a ValueError. Here's a simple code snippet that reproduces the issue: ```python from deepdiff i...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..ff5ccc5 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -203,13 +203,26 @@ class Delta: __radd__ = __add__ def __rsub__(self, other): - if self._reversed_diff is None: - self._reversed_diff = self._get_reverse_diff...
["tests/test_delta.py::TestDelta::test_delta_cases[delta_case0]"]
["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
27
1
1,236
0
0.6
1
0.75
1
0.296
81.163
5,578
swe_smith::train::28441
swe_smith
train
28,441
encode__starlette.db5063c2.combine_module__la5594dr
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
ServerErrorMiddleware debug response returns wrong content type and status code #### Description When using ServerErrorMiddleware with debug=True, the response content type and status code are incorrect based on the Accept header. The middleware seems to be returning HTML content when plain text is requested, and ret...
diff --git a/starlette/middleware/errors.py b/starlette/middleware/errors.py index 76ad776..dce79df 100644 --- a/starlette/middleware/errors.py +++ b/starlette/middleware/errors.py @@ -250,11 +250,11 @@ class ServerErrorMiddleware: def debug_response(self, request: Request, exc: Exception) -> Response: ac...
["tests/middleware/test_errors.py::test_debug_text[asyncio]", "tests/middleware/test_errors.py::test_debug_html[asyncio]", "tests/middleware/test_errors.py::test_debug_text[trio]", "tests/middleware/test_errors.py::test_debug_html[trio]", "tests/test_applications.py::test_subdomain_route[asyncio]", "tests/test_applicat...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
2
11
10
1,555
0
0.6
1
0.75
1
0.295833
81.1625
5,579
swe_smith::train::18097
swe_smith
train
18,097
pndurette__gTTS.dbcda4f3.combine_module__bhlgou7b
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
Text preprocessing broken after recent changes #### Description The text preprocessing functionality appears to be completely broken. When trying to use gTTS with any text input, it fails with various errors related to the tokenizer and preprocessing components. #### Steps/Code to Reproduce ```python from gtts impo...
diff --git a/gtts/tokenizer/core.py b/gtts/tokenizer/core.py index d7e0a4e..053e8eb 100644 --- a/gtts/tokenizer/core.py +++ b/gtts/tokenizer/core.py @@ -116,12 +116,12 @@ class PreProcessorRegex: """ def __init__(self, search_args, search_func, repl, flags=0): - self.repl = repl + self.repl = ...
["gtts/tests/test_cli.py::test_lang_nocheck", "gtts/tests/test_cli.py::test_params_set", "gtts/tests/test_cli.py::test_stdin_text", "gtts/tests/test_cli.py::test_stdin_text_unicode", "gtts/tests/test_cli.py::test_stdin_file", "gtts/tests/test_cli.py::test_stdin_file_unicode", "gtts/tests/test_cli.py::test_text", "gtts/...
["gtts/tests/test_cli.py::test_text_no_text_or_file", "gtts/tests/test_cli.py::test_text_text_and_file", "gtts/tests/test_cli.py::test_text_empty", "gtts/tests/test_cli.py::test_file_not_exists", "gtts/tests/test_cli.py::test_all", "gtts/tests/test_cli.py::test_lang_not_valid", "gtts/tests/test_lang.py::test_main_langs...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
true
null
2
24
86
1,295
0
0.6
1
0.75
1
0.295833
81.1625
5,580
swe_smith::train::6579
swe_smith
train
6,579
joke2k__faker.8b401a7d.combine_module__dygzltri
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# Chilean RUT and Finnish SSN generation broken ## Description I've discovered two issues with the SSN provider in Faker: 1. The Chilean RUT check digit calculation is incorrect 2. The Finnish SSN century code calculation is broken ## Steps to Reproduce ### Chilean RUT Issue ```python from faker import Faker fak...
diff --git a/faker/providers/ssn/es_CL/__init__.py b/faker/providers/ssn/es_CL/__init__.py index fcfb772..06cea82 100644 --- a/faker/providers/ssn/es_CL/__init__.py +++ b/faker/providers/ssn/es_CL/__init__.py @@ -19,10 +19,9 @@ def rut_check_digit(number: int) -> str: if mod == 11: return "0" elif mo...
["tests/providers/test_ssn.py::TestEsCL::test_rut", "tests/providers/test_ssn.py::TestFiFI::test_artifical_ssn", "tests/providers/test_ssn.py::TestFiFI::test_century_code", "tests/providers/test_ssn.py::TestFiFI::test_ssn_sanity", "tests/providers/test_ssn.py::TestFiFI::test_ssn_without_age_range", "tests/providers/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
12
6
1,534
0
0.6
1
0.75
1
0.295667
81.162
5,581
swe_smith::train::6950
swe_smith
train
6,950
cantools__cantools.0c6a7871.combine_file__780vdu32
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Signal encoding returns empty dict when unsupported value type encountered #### Description When encoding signals with unsupported value types, the encoding function silently returns an empty dictionary instead of raising an error or handling the unsupported type properly. #### Steps/Code to Reproduce ```python imp...
diff --git a/src/cantools/database/utils.py b/src/cantools/database/utils.py index cd33b81..ec79c78 100644 --- a/src/cantools/database/utils.py +++ b/src/cantools/database/utils.py @@ -76,14 +76,14 @@ def _encode_signal_values(signals: Sequence[Union["Signal", "Data"]], for signal in signals: name = signa...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_log_format", "tests/test_command_line.py::C...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanTools...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
31
124
1,154
0
0.6
1
0.75
1
0.295667
81.162
5,582
swe_smith::train::23983
swe_smith
train
23,983
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__bo0k4lsw
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
GOES XRS FITS file parsing broken due to variable reference errors #### Description When trying to load GOES XRS FITS files, the parser fails with `UnboundLocalError: cannot access local variable 'xrsa' where it is not associated with a value`. This affects the ability to create XRSTimeSeries objects from FITS files....
diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py index 08e2a6a..fa24a50 100644 --- a/sunpy/timeseries/sources/goes.py +++ b/sunpy/timeseries/sources/goes.py @@ -160,6 +160,17 @@ class XRSTimeSeries(GenericTimeSeries): @classmethod def _parse_hdus(cls, hdulist): + heade...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/go1520120601.fits.gz-GOES-15]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno_missin...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g15_d20131028_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.p...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
43
4
913
0
0.6
1
0.75
1
0.2955
81.1615
5,583
swe_smith::train::21516
swe_smith
train
21,516
rubik__radon.54b88e58.lm_rewrite__uaocn61p
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
# Negative complexity values not properly handled in cc_rank function Hi everyone, I discovered a bug in the `cc_rank` function when trying to use it with negative complexity values. The function is supposed to raise a `ValueError` when given negative values, but it's now silently accepting them and producing incorre...
diff --git a/radon/complexity.py b/radon/complexity.py index 8cf3ff1..8a75f1a 100644 --- a/radon/complexity.py +++ b/radon/complexity.py @@ -13,7 +13,7 @@ ALPHA = lambda block: block.name def cc_rank(cc): - r'''Rank the complexity score from A to F, where A stands for the simplest + """Rank the complexity sc...
["radon/tests/test_complexity_utils.py::test_rank[-1-ValueError]"]
["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te...
jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58
true
null
1
25
1
1,273
0
0.6
1
0.75
1
0.2955
81.1615
5,584
swe_smith::train::42862
swe_smith
train
42,862
python-jsonschema__jsonschema.93e0caa5.lm_rewrite__zko20u4x
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
### Issue: ErrorTree Index Handling Regression #### Description After the recent changes, there seems to be an issue with how `ErrorTree` handles indexing. Specifically, accessing certain indices in the `ErrorTree` that previously worked without issues now raises unexpected errors. This behavior is inconsistent with ...
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 3dcd296..ad84aa5 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -340,10 +340,18 @@ class ErrorTree: by ``instance.__getitem__`` will be propagated (usually this is some subclass of `LookupError`. "...
["jsonschema/tests/test_deprecations.py::TestDeprecations::test_ErrorTree_setitem", "jsonschema/tests/test_exceptions.py::TestErrorTree::test_children_have_their_errors_dicts_built", "jsonschema/tests/test_exceptions.py::TestErrorTree::test_if_its_in_the_tree_anyhow_it_does_not_raise_an_error", "jsonschema/tests/test_e...
["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
12
10
1,533
0
0.6
1
0.75
1
0.2955
81.1615
5,585
swe_smith::train::35345
swe_smith
train
35,345
alecthomas__voluptuous.a7a55f83.func_pm_class_rm_funcs__ik5e23q2
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
Union/Switch validator is broken after recent changes **To Reproduce** I'm using the Union validator with a discriminant function to validate different schema alternatives based on a type field: ```python from voluptuous import Schema, Union schema = Schema({ 'implementation': Union( {'type': 'A', 'a-va...
diff --git a/voluptuous/validators.py b/voluptuous/validators.py index 3f026b1..685567f 100644 --- a/voluptuous/validators.py +++ b/voluptuous/validators.py @@ -341,23 +341,6 @@ class Union(_WithSubValidators): Without the discriminant, the exception would be "extra keys not allowed @ data['b_val']" """ - ...
["voluptuous/tests/tests.py::test_any_with_discriminant"]
["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
17
1
1,432
0
0.6
1
0.75
1
0.295333
81.161
5,586
swe_smith::train::50822
swe_smith
train
50,822
python-hyper__h11.bed0dd4a.func_basic__6835jm1v
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
Connection reuse fails after completing HTTP transaction #### Description When attempting to reuse an HTTP connection after completing a request/response cycle, the connection state validation incorrectly rejects valid reuse scenarios. The connection reaches DONE/DONE state properly but then fails when trying to star...
diff --git a/h11/_state.py b/h11/_state.py index 3ad444b..36c7607 100644 --- a/h11/_state.py +++ b/h11/_state.py @@ -354,12 +354,10 @@ class ConnectionState: return def start_next_cycle(self) -> None: - if self.states != {CLIENT: DONE, SERVER: DONE}: + if self.states != {CLIENT: ID...
["h11/tests/test_connection.py::test_max_incomplete_event_size_countermeasure", "h11/tests/test_connection.py::test_reuse_simple", "h11/tests/test_connection.py::test_pipelining", "h11/tests/test_connection.py::test_protocol_switch", "h11/tests/test_connection.py::test_pipelined_close", "h11/tests/test_state.py::test_C...
["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
10
6
1,572
0
0.6
1
0.75
1
0.295333
81.161
5,587
swe_smith::train::10040
swe_smith
train
10,040
paramiko__paramiko.23f92003.combine_file__1eqp9nm1
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
# DSS key functionality broken in multiple ways I've discovered several issues with the DSS key implementation that break key functionality: 1. The `can_sign()` method is returning the opposite of what it should - it's returning `True` when `self.x is None` instead of when `self.x is not None`. This means private key...
diff --git a/paramiko/dsskey.py b/paramiko/dsskey.py index 5215d28..a1c23a0 100644 --- a/paramiko/dsskey.py +++ b/paramiko/dsskey.py @@ -106,7 +106,7 @@ class DSSKey(PKey): return self.size def can_sign(self): - return self.x is not None + return self.x is None def sign_ssh_data(sel...
["tests/test_pkey.py::KeyTest::test_compare_dss", "tests/test_pkey.py::KeyTest::test_load_dss"]
["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
12
2
1,532
0
0.6
1
0.75
1
0.295333
81.161
5,588
swe_smith::train::17246
swe_smith
train
17,246
aio-libs__async-timeout.d0baa9f1.combine_file__bwy4m1w4
swesmith/aio-libs__async-timeout.d0baa9f1
aio-libs/async-timeout
python
null
# Timeout functionality in async_timeout is broken ## Bug description There are multiple issues with the timeout functionality in the latest version: 1. `timeout_at` function creates a new event loop instead of using the running loop 2. `timeout_at` subtracts 5 seconds from the deadline 3. `shift` method subtracts t...
diff --git a/async_timeout/__init__.py b/async_timeout/__init__.py index fe4aa58..3aad715 100644 --- a/async_timeout/__init__.py +++ b/async_timeout/__init__.py @@ -47,8 +47,8 @@ def timeout_at(deadline: Optional[float]) -> "Timeout": """ - loop = asyncio.get_running_loop() - return Timeout(deadline, loo...
["tests/test_timeout.py::test_timeout_at", "tests/test_timeout.py::test_shift", "tests/test_timeout.py::test_shift_nonscheduled", "tests/test_timeout.py::test_shift_to_expired"]
["tests/test_timeout.py::test_timeout", "tests/test_timeout.py::test_timeout_finish_in_time", "tests/test_timeout.py::test_timeout_disable", "tests/test_timeout.py::test_timeout_is_none_no_schedule", "tests/test_timeout.py::test_timeout_no_loop", "tests/test_timeout.py::test_timeout_zero", "tests/test_timeout.py::test_...
jyangballin/swesmith.x86_64.aio-libs_1776_async-timeout.d0baa9f1
true
null
1
8
4
1,612
0
0.6
1
0.75
1
0.295333
81.161
5,589
swe_smith::train::46223
swe_smith
train
46,223
conan-io__conan.86f29e13.pr_14576
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
# Missing support for 'patch_user' in apply_conandata_patches ## Description I found a bug in Conan's patch handling functionality. When using the `apply_conandata_patches` function with a `patch_user` entry in the `conandata.yml` file, the function fails with an exception. Given the following `conandata.yml` file: ...
diff --git a/conan/tools/files/patches.py b/conan/tools/files/patches.py index 834a61b..7bf121b 100644 --- a/conan/tools/files/patches.py +++ b/conan/tools/files/patches.py @@ -30,17 +30,16 @@ def patch(conanfile, base_path=None, patch_file=None, patch_string=None, strip=0 directory. The folder containing the sour...
["test/unittests/tools/files/test_patches.py::test_patch_user"]
["test/unittests/tools/files/test_patches.py::test_single_patch_file", "test/unittests/tools/files/test_patches.py::test_single_patch_file_from_forced_build", "test/unittests/tools/files/test_patches.py::test_base_path", "test/unittests/tools/files/test_patches.py::test_apply_in_build_from_patch_in_source", "test/unitt...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
9
1
1,592
0
0.6
1
0.75
1
0.295333
81.161
5,590
swe_smith::train::48276
swe_smith
train
48,276
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__y5o116u3
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Parser returns None instead of parsed tree when validation fails #### Description When parsing SQL with the `parse_string` method, the parser returns `None` instead of the expected parsed tree object when the basic validation check fails. This breaks existing functionality that expects a parsed result even when there...
diff --git a/src/sqlfluff/core/parser/parser.py b/src/sqlfluff/core/parser/parser.py index 5defafc..3ac46b2 100644 --- a/src/sqlfluff/core/parser/parser.py +++ b/src/sqlfluff/core/parser/parser.py @@ -32,26 +32,28 @@ class Parser: fname: Optional[str] = None, parse_statistics: bool = False, ) -> ...
["test/core/parser/parse_test.py::test__parser__parse_error", "test/core/parser/parse_test.py::test_parse_jinja_macro_exclude"]
["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar__oneof__copy", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[True]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[False]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser_...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
14
2
1,492
0
0.6
1
0.75
1
0.295333
81.161
5,591
swe_smith::train::24433
swe_smith
train
24,433
sunpy__sunpy.f8edfd5c.lm_rewrite__oxqa9oik
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Bounding Box Calculation Fails with Specific Edge Values Description When using the `sub_boundingbox` method in the `Chaincode` class, there seems to be an issue with calculating the bounding box when specific edge values are provided. The method does not return the expected results and instead raises a `ValueError`....
diff --git a/sunpy/net/helio/chaincode.py b/sunpy/net/helio/chaincode.py index e4757ef..97f2a64 100644 --- a/sunpy/net/helio/chaincode.py +++ b/sunpy/net/helio/chaincode.py @@ -97,16 +97,30 @@ class Chaincode(np.ndarray): yedge : list, optional A list of two values to check. """ + ...
["sunpy/net/helio/tests/test_chaincode.py::test_subboundingboxx", "sunpy/net/helio/tests/test_chaincode.py::test_subboundingboxy"]
["sunpy/net/helio/tests/test_chaincode.py::test_ends", "sunpy/net/helio/tests/test_chaincode.py::test_endsfalse", "sunpy/net/helio/tests/test_chaincode.py::test_secondcoordinate", "sunpy/net/helio/tests/test_chaincode.py::test_secondcoordinatefails", "sunpy/net/helio/tests/test_chaincode.py::test_scalesecond", "sunpy/n...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
38
2
1,011
0
0.6
1
0.75
1
0.295167
81.1605
5,592
swe_smith::train::30522
swe_smith
train
30,522
gweis__isodate.17cb25eb.combine_module__arykhiz0
swesmith/gweis__isodate.17cb25eb
gweis/isodate
python
null
Incorrect string representation and formatting of Duration objects in isodate ### Description There are issues with the string representation and formatting of Duration objects in the isodate library. The problems appear to be in the `__str__` method of the Duration class and in the `_strfduration` function. When wo...
diff --git a/src/isodate/duration.py b/src/isodate/duration.py index 85241e4..93ac1a9 100644 --- a/src/isodate/duration.py +++ b/src/isodate/duration.py @@ -92,13 +92,13 @@ class Duration: """Return a string representation of this duration similar to timedelta.""" params: list[str] = [] if se...
["tests/test_duration.py::test_format_parse[P18Y9M4DT11H9M8S-expectation0-P%P-None]", "tests/test_duration.py::test_format_parse[P3Y6M4DT12H30M5S-expectation2-P%P-None]", "tests/test_duration.py::test_format_parse[P23DT23H-expectation3-P%P-None]", "tests/test_duration.py::test_format_parse[P4Y-expectation4-P%P-None]", ...
["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
2
12
24
1,531
0
0.6
1
0.75
1
0.295167
81.1605
5,593
swe_smith::train::28276
swe_smith
train
28,276
Mimino666__langdetect.a1598f1a.lm_rewrite__t6793atf
swesmith/Mimino666__langdetect.a1598f1a
mimino666/langdetect
python
null
# JSON string profiles no longer work in load_json_profile method ## Description The `load_json_profile` method in `DetectorFactory` no longer accepts JSON strings as input. It now expects pre-parsed JSON objects (dictionaries or lists of dictionaries) instead of JSON strings. ## How to reproduce: Set up a simple s...
diff --git a/langdetect/detector_factory.py b/langdetect/detector_factory.py index e026161..3ea433d 100644 --- a/langdetect/detector_factory.py +++ b/langdetect/detector_factory.py @@ -64,19 +64,29 @@ class DetectorFactory(object): f.close() def load_json_profile(self, json_profiles): - ...
["langdetect/tests/test_detector.py::DetectorTest::test_factory_from_json_string"]
["langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_detector4", "langdetect/tests/test_detector.py::DetectorTest::t...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
true
null
1
28
1
1,211
0
0.6
1
0.75
1
0.295167
81.1605
5,594
swe_smith::train::18160
swe_smith
train
18,160
pndurette__gTTS.dbcda4f3.func_pm_remove_assign__ivq04qm9
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
# Error in gTTSError message formatting when handling API responses ### Describe the bug When using gTTS and encountering certain API errors, the error message formatting is broken. The error message is supposed to include information about the status code and reason, but instead it fails with a NameError because som...
diff --git a/gtts/tts.py b/gtts/tts.py index eae351f..42cd389 100644 --- a/gtts/tts.py +++ b/gtts/tts.py @@ -362,21 +362,15 @@ class gTTSError(Exception): premise = "Failed to connect" if tts.tld != "com": - host = _translate_url(tld=tts.tld) cause = "Host '{}...
["gtts/tests/test_cli.py::test_lang_nocheck", "gtts/tests/test_tts.py::test_infer_msg", "gtts/tests/test_tts.py::test_WebRequest"]
["gtts/tests/test_cli.py::test_text_no_text_or_file", "gtts/tests/test_cli.py::test_text_text_and_file", "gtts/tests/test_cli.py::test_text_empty", "gtts/tests/test_cli.py::test_file_not_exists", "gtts/tests/test_cli.py::test_all", "gtts/tests/test_cli.py::test_lang_not_valid", "gtts/tests/test_cli.py::test_params_set"...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
true
null
1
10
3
1,571
0
0.6
1
0.75
1
0.295167
81.1605
5,595
swe_smith::train::41976
swe_smith
train
41,976
scanny__python-pptx.278b47b1.func_pm_class_rm_funcs__9s74lw8m
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
GraphicFrame missing chart and has_table properties after refactoring #### Description The `GraphicFrame` class is missing the `chart` and `has_table` properties, causing AttributeError when trying to access charts or check for table content in graphic frames. #### Steps/Code to Reproduce ```python from pptx.shapes...
diff --git a/src/pptx/shapes/graphfrm.py b/src/pptx/shapes/graphfrm.py index c0ed2bb..2761b99 100644 --- a/src/pptx/shapes/graphfrm.py +++ b/src/pptx/shapes/graphfrm.py @@ -38,16 +38,6 @@ class GraphicFrame(BaseShape): super().__init__(graphicFrame, parent) self._graphicFrame = graphicFrame - @pr...
["tests/shapes/test_graphfrm.py::DescribeGraphicFrame::it_provides_access_to_the_chart_it_contains", "tests/shapes/test_graphfrm.py::DescribeGraphicFrame::but_it_raises_on_chart_if_there_isnt_one", "tests/shapes/test_graphfrm.py::DescribeGraphicFrame::it_knows_whether_it_contains_a_table[http://schemas.openxmlformats.o...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
19
3
1,391
0
0.6
1
0.75
1
0.295167
81.1605
5,596
swe_smith::train::3017
swe_smith
train
3,017
Suor__funcy.207a7810.combine_file__zlm1m4pi
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
[Bug]: autocurry function fails with keyword arguments and built-in functions ### Bug summary The `autocurry` function is not working correctly with keyword arguments, keyword-only arguments, and built-in functions. ### Code for reproduction ```python from funcy import autocurry # Example 1: Named arguments def te...
diff --git a/funcy/_inspect.py b/funcy/_inspect.py index cc2eae5..8b35de1 100644 --- a/funcy/_inspect.py +++ b/funcy/_inspect.py @@ -128,22 +128,11 @@ def get_spec(func, _cache={}): elif not IS_PYPY and hasattr(func, '__code__'): return _code_to_spec(func) else: - # We use signature last to be...
["tests/test_funcs.py::test_autocurry_named", "tests/test_funcs.py::test_autocurry_kwargs", "tests/test_funcs.py::test_autocurry_kwonly", "tests/test_funcs.py::test_autocurry_posonly", "tests/test_funcs.py::test_autocurry_builtin"]
["tests/test_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
23
5
1,311
0
0.6
1
0.75
1
0.295167
81.1605
5,597
swe_smith::train::52716
swe_smith
train
52,716
pydicom__pydicom.7d361b3d.lm_rewrite__pc4jrm62
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
RLE Header Parsing Issue with Invalid Length and Segment Count ### Describe the bug We've encountered a problem with the RLE header parsing functionality. The function `_rle_parse_header` is not handling certain edge cases correctly, leading to unexpected behavior when the header length is not exactly 64 bytes or whe...
diff --git a/src/pydicom/pixels/decoders/rle.py b/src/pydicom/pixels/decoders/rle.py index 750fa02..bc357ab 100644 --- a/src/pydicom/pixels/decoders/rle.py +++ b/src/pydicom/pixels/decoders/rle.py @@ -213,7 +213,7 @@ def _rle_decode_segment(src: bytes) -> bytearray: return result -def _rle_parse_header(header:...
["tests/pixels/test_decoder_rle.py::TestParseHeader::test_invalid_header_length", "tests/pixels/test_decoder_rle.py::TestParseHeader::test_invalid_nr_segments_raises"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
24
2
1,289
0
0.6
1
0.75
1
0.294833
81.1595
5,598
swe_smith::train::6906
swe_smith
train
6,906
joke2k__faker.8b401a7d.lm_rewrite__y7ndnmr8
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
### Unexpected Behavior in RandomColor with Invalid Hue #### Description The `RandomColor` class does not raise a `ValueError` when an invalid hue is provided, specifically when the hue falls outside the defined range for a color in the colormap. #### Steps/Code to Reproduce ```python from faker.providers.color.color...
diff --git a/faker/providers/color/color.py b/faker/providers/color/color.py index 756942b..70ab9d5 100644 --- a/faker/providers/color/color.py +++ b/faker/providers/color/color.py @@ -331,17 +331,28 @@ class RandomColor: def get_color_info(self, hue: int) -> Dict[str, Sequence[Tuple[int, int]]]: """Ret...
["tests/providers/test_color.py::TestRandomColor::test_bad_color_map"]
["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
33
1
1,109
0
0.6
1
0.75
1
0.294833
81.1595
5,599
swe_smith::train::47127
swe_smith
train
47,127
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__eh1nep0y
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
RunVar.reset() method broken due to incorrect validation order #### Description The `RunVar.reset()` method has validation checks in the wrong order, causing it to fail when trying to reset tokens. The method sets `token.redeemed = True` before validating the token, which breaks subsequent validation checks. #### St...
diff --git a/src/trio/_core/_local.py b/src/trio/_core/_local.py index fff1234..6a0a66e 100644 --- a/src/trio/_core/_local.py +++ b/src/trio/_core/_local.py @@ -76,20 +76,8 @@ class RunVar(Generic[T]): return token def reset(self, token: RunVarToken[T]) -> None: - """Resets the value of this :cla...
["src/trio/_core/_tests/test_local.py::test_runvar_resetting", "src/trio/_core/_tests/test_local.py::test_runvar_sync", "src/trio/_core/_tests/test_local.py::test_accessing_runvar_outside_run_call_fails"]
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
27
3
1,229
0
0.6
1
0.75
1
0.294833
81.1595