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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,600 | swe_smith::train::51522 | swe_smith | train | 51,522 | pydicom__pydicom.7d361b3d.combine_file__l0fwpmw3 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | Overlay data handler returns None instead of raising ImportError when numpy unavailable
#### Description
When numpy is not available, the overlay data handler should raise an ImportError but instead returns None. This breaks expected error handling behavior for missing dependencies.
#### Steps/Code to Reproduce
```... | diff --git a/src/pydicom/overlays/numpy_handler.py b/src/pydicom/overlays/numpy_handler.py
index 058a886..dc3b441 100644
--- a/src/pydicom/overlays/numpy_handler.py
+++ b/src/pydicom/overlays/numpy_handler.py
@@ -51,7 +51,7 @@ DEPENDENCIES = {"numpy": ("https://numpy.org/", "NumPy")}
def is_available() -> bool:
... | ["tests/test_overlay_np.py::TestNoNumpy_NumpyHandler::test_get_overlay_array_raises"] | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 28 | 1 | 941 | 0 | 0.6 | 1 | 0.75 | 1 | 0.250167 | 81.0255 | |||
6,601 | swe_smith::train::7582 | swe_smith | train | 7,582 | cantools__cantools.0c6a7871.func_basic__irhudi2x | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | KCD multiplex signal loading broken with argument order error
#### Description
When loading KCD files with multiplex signals, the parser fails with `'list' object has no attribute 'attrib'` error. This appears to be related to incorrect argument ordering in the `_load_signal_element` function calls within the multipl... | diff --git a/src/cantools/database/can/formats/kcd.py b/src/cantools/database/can/formats/kcd.py
index a54c86c..d969d1b 100644
--- a/src/cantools/database/can/formats/kcd.py
+++ b/src/cantools/database/can/formats/kcd.py
@@ -151,18 +151,18 @@ def _load_multiplex_element(mux, nodes):
"""
- mux_signal = _load... | ["tests/test_database.py::CanToolsDatabaseTest::test_as_kcd_string", "tests/test_database.py::CanToolsDatabaseTest::test_get_bus_by_name", "tests/test_database.py::CanToolsDatabaseTest::test_get_node_by_name", "tests/test_database.py::CanToolsDatabaseTest::test_load_file_with_database_format", "tests/test_database.py::... | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 16 | 13 | 1,181 | 0 | 0.6 | 1 | 0.75 | 1 | 0.250167 | 81.0255 | |||
6,602 | swe_bench::test::1828 | swe_bench | test | 1,828 | sphinx-doc__sphinx-8506 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | e4bd3bd3ddd42c6642ff779a4f7381f219655c2c | Sphinx 3.2 complains about option:: syntax that earlier versions accepted
Sphinx 3.2 complains about use of the option:: directive that earlier versions accepted without complaint.
The QEMU documentation includes this:
```
.. option:: [enable=]PATTERN
Immediately enable events matching *PATTERN*
```
as part of th... | I disagree with
> Sphinx ideally shouldn't change in ways that break the building of documentation that worked in older versions, because this makes it unworkably difficult to have documentation that builds with whatever the Linux distro's sphinx-build is.
The idea that things shouldn't change to avoid breaking ... | diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py
--- a/sphinx/domains/std.py
+++ b/sphinx/domains/std.py
@@ -43,7 +43,7 @@
# RE for option descriptions
-option_desc_re = re.compile(r'((?:/|--|-|\+)?[^\s=[]+)(=?\s*.*)')
+option_desc_re = re.compile(r'((?:/|--|-|\+)?[^\s=]+)(=?\s*.*)')
# RE for grammar to... | diff --git a/tests/test_domain_std.py b/tests/test_domain_std.py
--- a/tests/test_domain_std.py
+++ b/tests/test_domain_std.py
@@ -91,6 +91,28 @@ def test_get_full_qualified_name():
assert domain.get_full_qualified_name(node) == 'ls.-l'
+def test_cmd_option_with_optional_value(app):
+ text = ".. option:: -j... | ["tests/test_domain_std.py::test_cmd_option_starting_with_bracket"] | ["tests/test_domain_std.py::test_process_doc_handle_figure_caption", "tests/test_domain_std.py::test_process_doc_handle_table_title", "tests/test_domain_std.py::test_get_full_qualified_name", "tests/test_domain_std.py::test_cmd_option_with_optional_value", "tests/test_domain_std.py::test_glossary", "tests/test_domain_s... | null | true | 2020-11-28T17:28:05Z | 1 | 7 | 1 | 1,160 | 0 | 0.8 | 1 | 0.55 | 1 | 0.216667 | 81.025 | |
6,603 | swe_smith::train::26484 | swe_smith | train | 26,484 | pylint-dev__astroid.b114f6b5.func_pm_remove_loop__mso7pyrb | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | ClassDef.slots() returns None instead of empty list for classes with __slots__
#### Description
When a class has `__slots__` defined but the slots inference fails or returns empty values, the `slots()` method incorrectly returns `None` instead of an empty list. This breaks code that expects to iterate over slots or c... | diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py
index 99ed796..9ec6380 100644
--- a/astroid/nodes/scoped_nodes/scoped_nodes.py
+++ b/astroid/nodes/scoped_nodes/scoped_nodes.py
@@ -2729,21 +2729,7 @@ class ClassDef(
# has an empty list of slots.
... | ["tests/brain/test_brain.py::TypingBrain::test_collections_generic_alias_slots", "tests/brain/test_brain.py::TypingBrain::test_typing_generic_slots", "tests/test_builder.py::BuilderTest::test_infer_can_assign_has_slots", "tests/test_inference.py::InferenceTest::test_delayed_attributes_without_slots", "tests/test_scoped... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 14 | 8 | 1,220 | 0 | 0.6 | 1 | 0.75 | 1 | 0.25 | 81.025 | |||
6,604 | swe_smith::train::47358 | swe_smith | train | 47,358 | sqlfluff__sqlfluff.50a1c4b6.combine_file__7sfgvbzi | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | ParseContext initialization fails with AttributeError when accessing dialect_string
#### Description
When initializing ParseContext from configuration, the code attempts to access `dialect_string` from the config object but this attribute doesn't exist, causing an AttributeError.
#### Steps/Code to Reproduce
```pyt... | diff --git a/src/sqlfluff/core/parser/context.py b/src/sqlfluff/core/parser/context.py
index 7edf331..4c54186 100644
--- a/src/sqlfluff/core/parser/context.py
+++ b/src/sqlfluff/core/parser/context.py
@@ -127,14 +127,13 @@ class ParseContext:
"""
indentation_config = config.get_section("indentation") ... | ["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 | 28 | 2 | 940 | 0 | 0.6 | 1 | 0.75 | 1 | 0.25 | 81.025 | |||
6,605 | swe_smith::train::31369 | swe_smith | train | 31,369 | benoitc__gunicorn.bacbf8aa.combine_file__ada1agzn | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | StatsD logger broken after recent changes
#### Description
The StatsD logger is completely broken and throwing TypeErrors when trying to send metrics. All StatsD functionality appears to be non-functional.
#### Steps/Code to Reproduce
```python
from gunicorn.config import Config
from gunicorn.instrument.statsd impo... | diff --git a/gunicorn/instrument/statsd.py b/gunicorn/instrument/statsd.py
index 7bc4e6f..bfb9c1c 100644
--- a/gunicorn/instrument/statsd.py
+++ b/gunicorn/instrument/statsd.py
@@ -27,9 +27,9 @@ class Statsd(Logger):
self.prefix = sub(r"^(.+[^.]+)\.*$", "\\g<1>.", cfg.statsd_prefix)
if isinstance(cf... | ["tests/test_statsd.py::test_statsd_fail", "tests/test_statsd.py::test_statsd_host_initialization", "tests/test_statsd.py::test_dogstatsd_tags", "tests/test_statsd.py::test_instrument", "tests/test_statsd.py::test_prefix", "tests/test_statsd.py::test_prefix_no_dot", "tests/test_statsd.py::test_prefix_multiple_dots", "t... | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 1 | 23 | 8 | 1,040 | 0 | 0.6 | 1 | 0.75 | 1 | 0.25 | 81.025 | |||
6,606 | swe_smith::train::166 | swe_smith | train | 166 | oauthlib__oauthlib.1fd52536.combine_file__xhkdzydz | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | check_access_token method has incorrect variable order causing NameError
#### Description
The `check_access_token` method in `RequestValidator` has a bug where variables are used before they are defined, causing a `NameError` when the method is called.
#### Steps/Code to Reproduce
```python
from oauthlib.oauth1.rfc... | diff --git a/oauthlib/oauth1/rfc5849/request_validator.py b/oauthlib/oauth1/rfc5849/request_validator.py
index e937aab..068177b 100644
--- a/oauthlib/oauth1/rfc5849/request_validator.py
+++ b/oauthlib/oauth1/rfc5849/request_validator.py
@@ -167,13 +167,12 @@ class RequestValidator:
lower <= len(request... | ["tests/oauth1/rfc5849/test_request_validator.py::RequestValidatorTests::test_check_length", "tests/oauth1/rfc5849/test_request_validator.py::RequestValidatorTests::test_not_implemented"] | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 31 | 2 | 880 | 0 | 0.6 | 1 | 0.75 | 1 | 0.25 | 81.025 | |||
6,607 | swe_smith::train::1775 | swe_smith | train | 1,775 | agronholm__typeguard.b6a7e438.func_basic__fya8dpi5 | swesmith/agronholm__typeguard.b6a7e438 | agronholm/typeguard | python | null | Type checking instrumentation not working for regular functions
#### Description
When using typeguard's instrumentation, type checking is not being applied to regular functions. The instrumentation appears to be inverted - it's only working for async functions when it should work for both regular and async functions.... | diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py
index 25696a5..c06aee0 100644
--- a/src/typeguard/_transformer.py
+++ b/src/typeguard/_transformer.py
@@ -519,17 +519,14 @@ class TypeguardTransformer(NodeTransformer):
if isinstance(node, (FunctionDef, AsyncFunctionDef)):
... | ["tests/test_instrumentation.py::test_generator_bad_yield_type[typechecked]", "tests/test_instrumentation.py::test_generator_bad_return_type[typechecked]", "tests/test_instrumentation.py::test_asyncgen_bad_yield_type[typechecked]", "tests/test_instrumentation.py::test_missing_return[typechecked]", "tests/test_instrumen... | ["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 | 17 | 46 | 1,159 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249833 | 81.0245 | |||
6,608 | swe_smith::train::4810 | swe_smith | train | 4,810 | bottlepy__bottle.a8dfef30.func_basic__ki8w0os1 | swesmith/bottlepy__bottle.a8dfef30 | bottlepy/bottle | python | null | Router fails to match routes after recent changes
#### Description
Routes are not being matched properly, causing 404 errors for valid paths. This appears to affect both basic routing and error handling.
#### Steps/Code to Reproduce
```python
import bottle
app = bottle.Bottle()
@app.route('/hello')
def hello():
... | diff --git a/bottle.py b/bottle.py
index 286b5bc..ea71d8a 100755
--- a/bottle.py
+++ b/bottle.py
@@ -436,12 +436,12 @@ class Router(object):
all_rules = self.dyna_routes[method]
comborules = self.dyna_regexes[method] = []
maxgroups = self._MAX_GROUPS_PER_PATTERN
- for x in range(0, len... | ["test/test_mount.py::TestAppMounting::test_mount", "test/test_mount.py::TestAppMounting::test_mount_unicode_path_bug602", "test/test_mount.py::TestAppMounting::test_mount_wsgi", "test/test_mount.py::TestAppMounting::test_mount_wsgi_ctype_bug", "test/test_mount.py::TestAppMounting::test_no_slash_prefix", "test/test_mou... | ["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"... | jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30 | true | null | 1 | 8 | 38 | 1,339 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249833 | 81.0245 | |||
6,609 | swe_smith::train::43993 | swe_smith | train | 43,993 | pydata__patsy.a5d16484.func_basic__df4k9nzd | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | Interaction operator produces incorrect results with factor subtraction
#### Description
When using the interaction operator `:` in formulas, the operation is producing incorrect results. The interaction terms are being computed using subtraction instead of addition for combining factors, and the order of operands is... | diff --git a/patsy/desc.py b/patsy/desc.py
index 210350d..180a11e 100644
--- a/patsy/desc.py
+++ b/patsy/desc.py
@@ -304,13 +304,13 @@ def _check_interactable(expr):
def _interaction(left_expr, right_expr):
- for expr in (left_expr, right_expr):
+ for expr in (right_expr, left_expr):
_check_interact... | ["patsy/desc.py::test_eval_formula", "patsy/test_highlevel.py::test_term_info", "patsy/test_highlevel.py::test_categorical", "patsy/test_highlevel.py::test_term_order", "patsy/test_highlevel.py::test_multicolumn"] | ["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 | 10 | 5 | 1,299 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249833 | 81.0245 | |||
6,610 | swe_smith::train::20868 | swe_smith | train | 20,868 | tobymao__sqlglot.036601ba.func_pm_remove_assign__a37oavkh | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | Column qualification fails with AttributeError when accessing unambiguous columns
#### Description
When qualifying columns in SQL queries, the optimizer crashes with an `AttributeError: 'NoneType' object has no attribute 'get'` error. This appears to happen when the column resolver tries to access `_unambiguous_colum... | diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py
index 3ab987d..a11a3d1 100644
--- a/sqlglot/optimizer/qualify_columns.py
+++ b/sqlglot/optimizer/qualify_columns.py
@@ -854,26 +854,17 @@ class Resolver:
The table name if it can be found/inferred.
"""
... | ["tests/test_optimizer.py::TestOptimizer::test_canonicalize", "tests/test_optimizer.py::TestOptimizer::test_expand_alias_refs", "tests/test_optimizer.py::TestOptimizer::test_lateral_annotation", "tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", "tests/test_optimizer.py::TestOptimizer::test_optimize", "te... | ["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 12 | 14 | 1,259 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249833 | 81.0245 | |||
6,611 | swe_smith::train::18028 | swe_smith | train | 18,028 | pyasn1__pyasn1.0f07d724.lm_rewrite__744k77qm | swesmith/pyasn1__pyasn1.0f07d724 | pyasn1/pyasn1 | python | null | ### Issue: Unicode String Handling in StreamingDecoder
It seems there's an issue with how `StreamingDecoder` handles certain unicode strings. When attempting to decode a specific byte sequence, the decoder does not raise the expected error, which might lead to unexpected behavior.
Here's a snippet to reproduce the is... | diff --git a/pyasn1/codec/streaming.py b/pyasn1/codec/streaming.py
index c35f248..7441683 100644
--- a/pyasn1/codec/streaming.py
+++ b/pyasn1/codec/streaming.py
@@ -94,26 +94,21 @@ def asSeekableStream(substrate):
: :py:class:`~pyasn1.error.PyAsn1Error`
If the supplied substrate cannot be converted to a s... | ["tests/codec/ber/test_decoder.py::UnicodeTestCase::testFail"] | ["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 | 23 | 1 | 1,038 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249667 | 81.024 | |||
6,612 | swe_smith::train::49154 | swe_smith | train | 49,154 | mozilla__bleach.73871d76.combine_file__uv1irt43 | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | HTML parsing breaks with IndexError when processing certain elements
#### Description
When processing HTML content with bleach, certain combinations of elements cause an IndexError to be raised. This appears to happen during the HTML tree building process when the parser tries to access elements from an empty list.
... | diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py
index 2869da0..b731613 100644
--- a/bleach/_vendor/html5lib/treebuilders/base.py
+++ b/bleach/_vendor/html5lib/treebuilders/base.py
@@ -295,8 +295,8 @@ class TreeBuilder(object):
def insertComment(self, token... | ["tests/test_clean.py::test_comments[<!--comment-->text-True-text]", "tests/test_clean.py::test_comments[<!--comment-->text-False-<!--comment-->text]", "tests/test_clean.py::test_comments[text<!--comment-->-True-text]", "tests/test_clean.py::test_comments[text<!--comment-->-False-text<!--comment-->]", "tests/test_clean... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 18 | 10 | 1,138 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249667 | 81.024 | |||
6,613 | swe_smith::train::23495 | swe_smith | train | 23,495 | pyparsing__pyparsing.533adf47.func_basic__9lzpu8s7 | swesmith/pyparsing__pyparsing.533adf47 | pyparsing/pyparsing | python | null | indentedBlock helper function breaks with IndexError when parsing indented text
#### Description
The `indentedBlock` helper function is throwing an `IndexError: pop from empty list` when trying to parse indented text blocks. This appears to happen when the function tries to manage the indentation stack during parsing... | diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py
index 399b70c..cb3a6f7 100644
--- a/pyparsing/helpers.py
+++ b/pyparsing/helpers.py
@@ -969,10 +969,10 @@ def indentedBlock(blockStatementExpr, indentStack, indent=True, backup_stacks=[]
def checkSubIndent(s, l, t):
curCol = col(l, s)
- if ... | ["tests/test_unit.py::Test02_WithoutPackrat::testIndentedBlock", "tests/test_unit.py::Test02_WithoutPackrat::testIndentedBlockExample", "tests/test_unit.py::Test02_WithoutPackrat::testIndentedBlockScan", "tests/test_unit.py::Test02_WithoutPackrat::testIndentedBlockTest2", "tests/test_unit.py::Test04_WithPackrat::testIn... | ["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse... | jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47 | true | null | 1 | 6 | 24 | 1,378 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249667 | 81.024 | |||
6,614 | r2e_gym::train::6188 | r2e_gym | train | 6,188 | pillow__944a470a798e394471be5aab3acd6b5d26ef3d4a | pillow | python-pillow/pillow | python | 944a470a798e394471be5aab3acd6b5d26ef3d4a | **Title:** Saving Animated GIFs with Multiple Durations Raises TypeError
**Description:**
When attempting to save an animated GIF by providing a list or tuple of durations for individual frames, a `TypeError` is raised. This prevents the GIF from being saved correctly with varying frame durations.
**Example Code:**
`... | diff --git a/PIL/GifImagePlugin.py b/PIL/GifImagePlugin.py
--- a/PIL/GifImagePlugin.py
+++ b/PIL/GifImagePlugin.py
@@ -352,10 +352,18 @@
first_frame = None
append_images = im.encoderinfo.get("append_images", [])
+ if "duration" in im.encoderinfo:
+ duration = im.encoderinfo["durati... | diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py
--- a/Tests/test_file_gif.py
+++ b/Tests/test_file_gif.py
@@ -281,6 +281,50 @@
self.assertEqual(reread.info['duration'], duration)
+ def test_multiple_duration(self):
+ duration_list = [1000, 2000, 3000]
+
+ out = self.tempfile('... | null | null | namanjain12/pillow_final:944a470a798e394471be5aab3acd6b5d26ef3d4a | true | null | 2 | 56 | null | 1,090 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.368333 | 81.02375 | ||
6,615 | r2e_gym::train::5944 | r2e_gym | train | 5,944 | tornado__da552790c3f65a8b62f05be9a008ae44950790c6 | tornado | tornadoweb/tornado | python | da552790c3f65a8b62f05be9a008ae44950790c6 | **Title:** `tornado.gen` Module Missing `multi_future` Attribute Causes AttributeError
**Description:**
When attempting to execute multiple asynchronous operations in parallel using `gen.multi_future`, an `AttributeError` is raised because the `multi_future` attribute does not exist in the `tornado.gen` module.
**Ex... | diff --git a/tornado/gen.py b/tornado/gen.py
--- a/tornado/gen.py
+++ b/tornado/gen.py
@@ -406,10 +406,14 @@
class Multi(YieldPoint):
"""Runs multiple asynchronous operations in parallel.
- Takes a list of ``Tasks`` or other ``YieldPoints`` and returns a list of
+ Takes a list of ``YieldPoints`` or ``Futu... | diff --git a/tornado/test/gen_test.py b/tornado/test/gen_test.py
--- a/tornado/test/gen_test.py
+++ b/tornado/test/gen_test.py
@@ -296,26 +296,53 @@
self.stop()
self.run_gen(f)
- def test_multi_delayed(self):
+ # The following tests explicitly run with both gen.Multi
+ # and gen.multi_f... | null | null | namanjain12/tornado_final:da552790c3f65a8b62f05be9a008ae44950790c6 | true | null | 1 | 69 | null | 830 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.368333 | 81.02375 | ||
6,616 | swe_smith::train::2945 | swe_smith | train | 2,945 | madzak__python-json-logger.5f85723f.func_pm_ctrl_invert_if__j9bgt9gi | swesmith/madzak__python-json-logger.5f85723f | madzak/python-json-logger | python | null | JsonFormatter raises ValueError for PercentStyle formats
#### Description
When using JsonFormatter with percentage-style format strings (e.g., `%(levelname)s %(message)s`), a ValueError is raised with the message "Invalid format: [format string]". This affects basic logging functionality when trying to use standard P... | diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py
index 519a64d..155c874 100644
--- a/src/pythonjsonlogger/jsonlogger.py
+++ b/src/pythonjsonlogger/jsonlogger.py
@@ -191,15 +191,14 @@ class JsonFormatter(logging.Formatter):
# PercentStyle is parent class of StringTemplateStyl... | ["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg... | ["tests/test_jsonlogger.py::TestJsonLogger::test_merge_record_extra"] | jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f | true | null | 1 | 9 | 19 | 1,317 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2495 | 81.0235 | |||
6,617 | swe_smith::train::30519 | swe_smith | train | 30,519 | gweis__isodate.17cb25eb.combine_module__8dnzpn4l | swesmith/gweis__isodate.17cb25eb | gweis/isodate | python | null | Duration subtraction returns incorrect results
#### Description
When subtracting Duration objects, the operation produces incorrect results. Instead of subtracting the years and months components, they are being added together.
#### Steps/Code to Reproduce
```python
from isodate import parse_duration
# Test basic ... | diff --git a/src/isodate/duration.py b/src/isodate/duration.py
index 85241e4..43daafe 100644
--- a/src/isodate/duration.py
+++ b/src/isodate/duration.py
@@ -187,19 +187,19 @@ class Duration:
"""
if isinstance(other, Duration):
newduration = Duration(
- years=self.years - ot... | ["tests/test_datetime.py::test_parse[19850412T1015-expected0-%Y%m%dT%H%M-19850412T1015]", "tests/test_datetime.py::test_parse[1985-04-12T10:15-expected1-%Y-%m-%dT%H:%M-1985-04-12T10:15]", "tests/test_datetime.py::test_parse[1985102T1015Z-expected2-%Y%jT%H%M%z-1985102T1015Z]", "tests/test_datetime.py::test_parse[1985-10... | ["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::tes... | jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb | true | null | 2 | 15 | 20 | 1,197 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2495 | 81.0235 | |||
6,618 | swe_smith::train::23425 | swe_smith | train | 23,425 | pyparsing__pyparsing.533adf47.func_basic__0irbhf7s | swesmith/pyparsing__pyparsing.533adf47 | pyparsing/pyparsing | python | null | match_previous_expr not working correctly with token matching
#### Description
The `match_previous_expr` function appears to have issues with token matching logic. When trying to match previously parsed expressions, it's not behaving as expected.
#### Steps/Code to Reproduce
```python
import pyparsing as pp
# Simp... | diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py
index 399b70c..8de7dd9 100644
--- a/pyparsing/helpers.py
+++ b/pyparsing/helpers.py
@@ -130,7 +130,7 @@ def match_previous_expr(expr: ParserElement) -> ParserElement:
with packrat parsing enabled.
"""
rep = Forward()
- e2 = expr.copy()
+ e2 =... | ["tests/test_unit.py::Test02_WithoutPackrat::testRepeater", "tests/test_unit.py::Test02_WithoutPackrat::testRepeater4", "tests/test_unit.py::Test02_WithoutPackrat::testRepeater5"] | ["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse... | jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47 | true | null | 1 | 8 | 3 | 1,337 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2495 | 81.0235 | |||
6,619 | swe_smith::train::31595 | swe_smith | train | 31,595 | benoitc__gunicorn.bacbf8aa.func_pm_class_rm_funcs__won6d4n7 | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | ChunkedReader missing read method causes AttributeError
When processing chunked HTTP requests, the ChunkedReader class is missing its read method, causing an AttributeError when trying to read from chunked request bodies.
#### Steps/Code to Reproduce
```python
from gunicorn.http.body import ChunkedReader
from gunico... | diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py
index d7ee29e..b220c64 100644
--- a/gunicorn/http/body.py
+++ b/gunicorn/http/body.py
@@ -15,28 +15,6 @@ class ChunkedReader:
self.parser = self.parse_chunked(unreader)
self.buf = io.BytesIO()
- def read(self, size):
- if not isins... | ["tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_10.http]", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_09.http]", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_12.http]", "tests/test_inva... | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 1 | 23 | 16 | 1,036 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249333 | 81.023 | |||
6,620 | swe_smith::train::47004 | swe_smith | train | 47,004 | python-trio__trio.cfbbe2c1.func_basic__uusjv3dd | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | Semaphore constructor swaps initial_value and max_value parameters
#### Description
When creating a bounded Semaphore with both `initial_value` and `max_value` parameters, the constructor appears to swap these values internally, causing unexpected behavior.
#### Steps/Code to Reproduce
```python
import trio
# This... | diff --git a/src/trio/_sync.py b/src/trio/_sync.py
index ca37392..8c60252 100644
--- a/src/trio/_sync.py
+++ b/src/trio/_sync.py
@@ -436,20 +436,17 @@ class Semaphore(AsyncContextManagerMixin):
def __init__(self, initial_value: int, *, max_value: int | None = None) -> None:
if not isinstance(initial_value... | ["src/trio/_tests/test_sync.py::test_Semaphore", "src/trio/_tests/test_sync.py::test_Semaphore_bounded"] | ["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 | 13 | 2 | 1,236 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249333 | 81.023 | |||
6,621 | swe_smith::train::51796 | swe_smith | train | 51,796 | pydicom__pydicom.7d361b3d.func_basic__6xqdvhcl | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | Dataset.walk() callback parameter order changed unexpectedly
#### Description
The `Dataset.walk()` method is passing parameters to the callback function in the wrong order. The callback now receives `(data_element, dataset)` instead of the expected `(dataset, data_element)`.
#### Steps/Code to Reproduce
```python
i... | diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py
index e7abffd..7a51782 100644
--- a/src/pydicom/dataset.py
+++ b/src/pydicom/dataset.py
@@ -3072,14 +3072,12 @@ class Dataset:
Flag to indicate whether to recurse into sequences (default
``True``).
"""
- taglist = sor... | ["tests/test_charset.py::TestCharset::test_nested_character_sets", "tests/test_charset.py::TestCharset::test_inherited_character_set_in_sequence", "tests/test_charset.py::TestCharset::test_standard_file", "tests/test_charset.py::TestCharset::test_invalid_character_set", "tests/test_charset.py::TestCharset::test_decodin... | ["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 | 8 | 33 | 1,336 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249333 | 81.023 | |||
6,622 | swe_smith::train::31762 | swe_smith | train | 31,762 | davidhalter__parso.338a5760.combine_file__5862c62m | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | Parser raises NotImplementedError instead of ParserSyntaxError for invalid syntax
#### Description
When parsing invalid Python syntax with error recovery disabled, the parser is raising `NotImplementedError: Error Recovery is not implemented` instead of the expected `ParserSyntaxError`.
#### Steps/Code to Reproduce
... | diff --git a/parso/parser.py b/parso/parser.py
index 3746643..91fcd1e 100644
--- a/parso/parser.py
+++ b/parso/parser.py
@@ -88,14 +88,14 @@ class StackNode:
def _token_to_transition(grammar, type_, value):
# Map from token to label
- if type_.value.contains_syntax:
+ if not type_.value.contains_syntax:
... | ["test/test_file_python_errors.py::test_on_itself[3.6]", "test/test_file_python_errors.py::test_on_itself[3.7]", "test/test_file_python_errors.py::test_on_itself[3.8]", "test/test_file_python_errors.py::test_on_itself[3.9]", "test/test_file_python_errors.py::test_on_itself[3.10]", "test/test_fstring.py::test_valid[f\"\... | ["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 | 12 | 123 | 1,256 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249333 | 81.023 | |||
6,623 | swe_smith::train::19013 | swe_smith | train | 19,013 | seperman__deepdiff.ed252022.func_pm_ctrl_invert_if__b7p39v9j | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | Delta constructor logic inverted for bidirectional and flat_rows_list parameters
#### Description
When creating a Delta object, the logic for handling `bidirectional` and `flat_rows_list` parameters appears to be inverted, causing unexpected behavior when working with bidirectional deltas and flat row lists.
#### St... | diff --git a/deepdiff/delta.py b/deepdiff/delta.py
index 8bafc9a..a494f22 100644
--- a/deepdiff/delta.py
+++ b/deepdiff/delta.py
@@ -117,9 +117,9 @@ class Delta:
self.bidirectional = bidirectional
if bidirectional:
- self.always_include_values = True # We need to include the values in bi... | ["tests/test_delta.py::TestBasicsOfDelta::test_delta_when_no_arg_passed", "tests/test_delta.py::TestBasicsOfDelta::test_delta_dict_items_added_retain_order", "tests/test_delta.py::TestBasicsOfDelta::test_delta_constr_flat_dict_list_param_preserve", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case3]", "tests... | ["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 | 9 | 26 | 1,316 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249333 | 81.023 | |||
6,624 | swe_smith::train::44463 | swe_smith | train | 44,463 | pydata__patsy.a5d16484.func_pm_remove_cond__x0rsfcys | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | BS spline validation removed causing UnboundLocalError
When using the BS spline function with certain parameters, I'm getting an `UnboundLocalError: local variable 'inner_knots' referenced before assignment`. This seems to happen when the function tries to access the `inner_knots` variable but it hasn't been properly ... | diff --git a/patsy/splines.py b/patsy/splines.py
index a6735e5..9d57e83 100644
--- a/patsy/splines.py
+++ b/patsy/splines.py
@@ -181,17 +181,8 @@ class BS(object):
args = tmp["args"]
del self._tmp
- if args["degree"] < 0:
- raise ValueError(
- "degree must be greater... | ["patsy/splines.py::test_bs_compat", "patsy/splines.py::test_bs_0degree", "patsy/splines.py::test_bs_errors"] | ["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 | 19 | 3 | 1,114 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249 | 81.022 | |||
6,625 | swe_smith::train::26946 | swe_smith | train | 26,946 | tkrajina__gpxpy.09fc46b3.func_basic__h6ddbhnz | swesmith/tkrajina__gpxpy.09fc46b3 | tkrajina/gpxpy | python | null | GPX extension parsing returns empty string instead of proper tag names
#### Description
When parsing GPX files with extensions, the `_clark_to_prefix` method in `GPXExtensionsField` is returning an empty string instead of properly converting Clark notation tags to prefixed tags. This breaks extension parsing and caus... | diff --git a/gpxpy/gpxfield.py b/gpxpy/gpxfield.py
index e253df3..294c861 100644
--- a/gpxpy/gpxfield.py
+++ b/gpxpy/gpxfield.py
@@ -352,7 +352,7 @@ class GPXExtensionsField(AbstractGPXField):
Convert a tag from Clark notation using the nsmap into a
prefixed tag. If the tag isn't in Clark notation, re... | ["test.py::GPXTests::test_garmin_extension", "test.py::GPXTests::test_gpx_11_fields", "test.py::GPXTests::test_no_track", "test.py::GPXTests::test_with_ns_namespace", "test.py::GPXTests::test_write_read_extensions", "test.py::GPXTests::test_xml_chars_encode_decode_extensions"] | ["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a... | jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3 | true | null | 1 | 13 | 6 | 1,234 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249 | 81.022 | |||
6,626 | swe_smith::train::746 | swe_smith | train | 746 | oauthlib__oauthlib.1fd52536.func_pm_ctrl_shuffle__6u465ug7 | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | HybridGrant nonce validation not working properly
#### Description
When using OpenID Connect Hybrid flow with response types `code id_token` or `code id_token token`, the nonce parameter validation is not functioning correctly. The validation should raise an `InvalidRequestError` when the nonce parameter is missing, ... | diff --git a/oauthlib/openid/connect/core/grant_types/hybrid.py b/oauthlib/openid/connect/core/grant_types/hybrid.py
index 9c1fc70..20dc1ce 100644
--- a/oauthlib/openid/connect/core/grant_types/hybrid.py
+++ b/oauthlib/openid/connect/core/grant_types/hybrid.py
@@ -39,11 +39,10 @@ class HybridGrant(GrantTypeBase):
... | ["tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridCodeIdTokenTest::test_required_nonce", "tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridCodeIdTokenTokenTest::test_required_nonce"] | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 8 | 2 | 1,334 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249 | 81.022 | |||
6,627 | swe_smith::train::44880 | swe_smith | train | 44,880 | mahmoud__glom.fb3c4e76.func_pm_class_rm_funcs__bacfqld8 | swesmith/mahmoud__glom.fb3c4e76 | mahmoud/glom | python | null | Fold class missing glomit method breaks reduction operations
#### Description
The `Fold` class and its subclasses (`Sum`, `Flatten`, `Merge`) are no longer working after a recent change. When trying to use any of these reduction operations, they fail with a `TypeError` indicating that the object is not callable.
###... | diff --git a/glom/reduction.py b/glom/reduction.py
index b400ce0..819f8ad 100644
--- a/glom/reduction.py
+++ b/glom/reduction.py
@@ -65,23 +65,6 @@ class Fold:
raise TypeError('expected callable for %s init param, not: %r' %
(self.__class__.__name__, init))
- def glomit(se... | ["glom/test/test_error.py::test_all_public_errors", "glom/test/test_grouping.py::test_agg", "glom/test/test_grouping.py::test_reduce", "glom/test/test_reduction.py::test_sum_integers", "glom/test/test_reduction.py::test_sum_seqs", "glom/test/test_reduction.py::test_fold", "glom/test/test_reduction.py::test_flatten", "g... | ["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "... | jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76 | true | null | 1 | 18 | 11 | 1,134 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249 | 81.022 | |||
6,628 | swe_smith::train::26939 | swe_smith | train | 26,939 | tkrajina__gpxpy.09fc46b3.func_basic__g89clbq1 | swesmith/tkrajina__gpxpy.09fc46b3 | tkrajina/gpxpy | python | null | GPXField initialization corrupts field configuration
#### Description
When creating GPXField instances, the field configuration gets corrupted due to incorrect parameter assignments in the constructor. This affects XML parsing and serialization of GPX data.
#### Steps/Code to Reproduce
```python
import gpxpy
from g... | diff --git a/gpxpy/gpxfield.py b/gpxpy/gpxfield.py
index e253df3..debad99 100644
--- a/gpxpy/gpxfield.py
+++ b/gpxpy/gpxfield.py
@@ -167,16 +167,16 @@ class GPXField(AbstractGPXField):
self.tag: Optional[str] = None
if attribute:
self.tag = None
- self.attribute = attribute
+ ... | ["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_missing_elevations_without_ele", "test.py::GPXTests::test_add_missing_times_2", "test.py::GPXTests::test_bounds_xml", "test.py::GPXTests::test_clone_and_smooth", "test.py::GPXTests::test_course_between", "test.py::GPXTests::test_creator_field"... | ["test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_add_missing_elevations", "test.py::GPXTests::tes... | jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3 | true | null | 1 | 16 | 87 | 1,174 | 0 | 0.6 | 1 | 0.75 | 1 | 0.249 | 81.022 | |||
6,629 | swe_smith::train::18889 | swe_smith | train | 18,889 | seperman__deepdiff.ed252022.func_basic__pld6tvds | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | TypeError when using ignore_type_in_groups parameter
#### Description
When using the `ignore_type_in_groups` parameter in DeepDiff or DeepHash, a TypeError is raised with the message "'NoneType' object is not iterable". This appears to affect various operations that rely on type grouping functionality.
#### Steps/Co... | diff --git a/deepdiff/base.py b/deepdiff/base.py
index d16bad5..d728ac2 100644
--- a/deepdiff/base.py
+++ b/deepdiff/base.py
@@ -22,8 +22,8 @@ class Base:
ignore_string_type_changes,
ignore_numeric_type_changes,
... | ["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_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[delta_ignore_order_case... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_do_not_overlap", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_overlap", "tests/test_cache.py::TestCache::test... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 14 | 140 | 1,213 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248833 | 81.0215 | |||
6,630 | swe_smith::train::19035 | swe_smith | train | 19,035 | seperman__deepdiff.ed252022.func_pm_ctrl_invert_if__pn5r3ylg | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | DeepDiff fails when comparing ordered iterables with basic hashable values
#### Description
When comparing ordered iterables that contain all basic hashable values, DeepDiff raises a TypeError instead of properly computing the differences. This affects lists, tuples, and other ordered sequences when they contain simp... | diff --git a/deepdiff/diff.py b/deepdiff/diff.py
index 76f186b..e136cc7 100755
--- a/deepdiff/diff.py
+++ b/deepdiff/diff.py
@@ -831,6 +831,14 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base):
and self._all_values_basic_hashable(level.t2)
and self.iterable_compare_func is... | ["tests/test_command.py::TestCommands::test_diff_command[t1.toml-t2.toml-10.0.0.2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-args2-0]", "tests/test_command.py::TestCommands::test_deeppatch_... | ["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 | 17 | 55 | 1,153 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248833 | 81.0215 | |||
6,631 | swe_smith::train::38111 | swe_smith | train | 38,111 | weaveworks__grafanalib.5c3b17ed.func_pm_class_rm_funcs__ak40fpqa | swesmith/weaveworks__grafanalib.5c3b17ed | weaveworks/grafanalib | python | null | Template current value not set after removing __attrs_post_init__
#### Description
After recent changes, Template objects no longer have their `current` value properly initialized. When creating templates with default values, the `to_json_data()` method fails because the `_current` attribute is not being set.
#### S... | diff --git a/grafanalib/core.py b/grafanalib/core.py
index 79849fe..8dbc74a 100644
--- a/grafanalib/core.py
+++ b/grafanalib/core.py
@@ -1058,32 +1058,6 @@ class Template(object):
)
autoMin = attr.ib(default=DEFAULT_MIN_AUTO_INTERVAL)
- def __attrs_post_init__(self):
- if self.type == 'custom':
- ... | ["grafanalib/tests/test_core.py::test_template_defaults", "grafanalib/tests/test_core.py::test_custom_template_ok", "grafanalib/tests/test_core.py::test_custom_template_dont_override_options"] | ["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_logs_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_... | jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed | true | null | 1 | 27 | 3 | 953 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248833 | 81.0215 | |||
6,632 | swe_smith::train::21942 | swe_smith | train | 21,942 | life4__textdistance.c3aca916.func_basic__vhs8g7tn | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | Counter handling broken when mixing Counter and non-Counter sequences
#### Description
When using text distance algorithms with a mix of Counter objects and regular sequences (strings, lists), the algorithm produces incorrect results. The issue occurs when some sequences are already Counter objects while others are n... | diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py
index 5ce8cc7..87e6fcd 100644
--- a/textdistance/algorithms/base.py
+++ b/textdistance/algorithms/base.py
@@ -134,9 +134,9 @@ class Base:
"""Prepare sequences and convert it to Counters.
"""
# already Counters
- ... | ["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg10]", "tests/test_common.py::test_normalization_range[alg11]", "tests/test_common.py::test_normalization_range[alg12]", "tests/test_common.py::test_normalization_range[alg13]", "tests/test_common.py::test_normali... | ["tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalization_range[alg5]", "tests/test_common.py::test_normalizati... | jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916 | true | null | 1 | 6 | 52 | 1,373 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248833 | 81.0215 | |||
6,633 | swe_smith::train::10060 | swe_smith | train | 10,060 | paramiko__paramiko.23f92003.combine_file__4sf0yxum | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | PartialAuthentication exception loses allowed_types information
#### Description
When creating a `PartialAuthentication` exception, the `allowed_types` attribute is not properly set, causing the exception to lose information about which authentication types are allowed.
#### Steps/Code to Reproduce
```python
from p... | diff --git a/paramiko/ssh_exception.py b/paramiko/ssh_exception.py
index 2b68ebe..54d0466 100644
--- a/paramiko/ssh_exception.py
+++ b/paramiko/ssh_exception.py
@@ -80,8 +80,8 @@ class PartialAuthentication(AuthenticationException):
allowed_types = []
def __init__(self, types):
- AuthenticationExcept... | ["tests/auth.py::AuthHandler_::multipart_auth", "tests/test_ssh_exception.py::NoValidConnectionsErrorTest::test_error_message_for_multiple_hosts", "tests/test_ssh_exception.py::NoValidConnectionsErrorTest::test_error_message_for_single_host", "tests/test_ssh_exception.py::NoValidConnectionsErrorTest::test_error_message... | ["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 | 14 | 6 | 1,213 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248833 | 81.0215 | |||
6,634 | swe_smith::train::7650 | swe_smith | train | 7,650 | cantools__cantools.0c6a7871.func_basic__m46iv43t | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | Relative time parsing broken for floating point values and day patterns
#### Description
The relative time parser in the plot subcommand is not working correctly for floating point values and day-based time patterns. When trying to parse relative times like `42.42` or `2 days`, the parser fails with errors.
#### Ste... | diff --git a/src/cantools/subparsers/plot.py b/src/cantools/subparsers/plot.py
index c3d5890..868ef19 100644
--- a/src/cantools/subparsers/plot.py
+++ b/src/cantools/subparsers/plot.py
@@ -152,20 +152,20 @@ class TimestampParser:
def parse_user_input_relative_time(self, user_input, first_timestamp):
try... | ["tests/test_plot.py::CanToolsPlotTest::test_start_stop_relative", "tests/test_plot_unittests.py::CanToolsPlotUnittests::test_parse_user_input_relative_time"] | ["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 | 8 | 2 | 1,333 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248833 | 81.0215 | |||
6,635 | swe_smith::train::27794 | swe_smith | train | 27,794 | arrow-py__arrow.1d70d009.lm_rewrite__47m8sbrj | swesmith/arrow-py__arrow.1d70d009 | arrow-py/arrow | python | null | **Locale Registration Bug**
**Describe the bug**
It seems that the recent changes to the locale registration process have introduced an issue where month names and abbreviations are not being correctly recognized. This is causing parsing errors when attempting to match date strings with month names or abbreviations.
... | diff --git a/arrow/locales.py b/arrow/locales.py
index 63b2d48..b4c59f7 100644
--- a/arrow/locales.py
+++ b/arrow/locales.py
@@ -117,12 +117,10 @@ class Locale:
_month_name_to_ordinal: Optional[Dict[str, int]]
def __init_subclass__(cls, **kwargs: Any) -> None:
- for locale_name in cls.names:
- ... | ["tests/test_locales.py::TestLocaleValidation::test_duplicated_locale_name", "tests/test_locales.py::TestCustomLocale::test_custom_locale_subclass", "tests/test_parser.py::TestDateTimeParser::test_timestamp_format_list", "tests/test_parser.py::TestDateTimeParserParse::test_parse_names", "tests/test_parser.py::TestDateT... | ["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 | 10 | 24 | 1,292 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248667 | 81.021 | |||
6,636 | swe_smith::train::31459 | swe_smith | train | 31,459 | benoitc__gunicorn.bacbf8aa.func_basic__01cfz6ly | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | Configuration loading fails silently when exceptions occur
#### Description
When initializing a Gunicorn application, configuration loading exceptions are being silently ignored instead of being properly handled. This causes the application to continue with incomplete or default configuration, leading to unexpected b... | diff --git a/gunicorn/app/base.py b/gunicorn/app/base.py
index 9bf7a4f..8c7d5df 100644
--- a/gunicorn/app/base.py
+++ b/gunicorn/app/base.py
@@ -31,12 +31,10 @@ class BaseApplication:
Loads the configuration
"""
try:
- self.load_default_config()
self.load_config()
- ... | ["tests/test_arbiter.py::test_env_vars_available_during_preload", "tests/test_config.py::test_cmd_line", "tests/test_config.py::test_cmd_line_invalid_setting", "tests/test_config.py::test_app_config", "tests/test_config.py::test_load_config", "tests/test_config.py::test_load_config_explicit_file", "tests/test_config.py... | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 1 | 8 | 30 | 1,332 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248667 | 81.021 | |||
6,637 | swe_smith::train::22521 | swe_smith | train | 22,521 | tweepy__tweepy.91a41c6e.func_pm_remove_wrapper__na4yap1n | swesmith/tweepy__tweepy.91a41c6e | tweepy/tweepy | python | null | ### NameError in API Methods
Hello,
I've encountered an issue with the Tweepy API after a recent change. It seems that several API methods are now throwing a `NameError`, specifically related to the `resp` variable. This is affecting a wide range of functionalities, including but not limited to:
- Direct message typ... | diff --git a/tweepy/api.py b/tweepy/api.py
index 37caf07..2346ea6 100644
--- a/tweepy/api.py
+++ b/tweepy/api.py
@@ -223,16 +223,6 @@ class API:
if self.auth:
auth = self.auth.apply_auth()
- # Execute request
- try:
- resp = self.s... | ["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre... | ["tests/test_api.py::TweepyAPITests::testparserargumenthastobeaparserinstance", "tests/test_api.py::TweepyCacheTests::testfilecache", "tests/test_api.py::TweepyCacheTests::testmemorycache", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_bookmarks", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_crea... | jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e | true | null | 1 | 11 | 62 | 1,272 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248667 | 81.021 | |||
6,638 | swe_smith::train::21493 | swe_smith | train | 21,493 | rubik__radon.54b88e58.func_pm_op_swap__sbd33ss8 | swesmith/rubik__radon.54b88e58 | rubik/radon | python | null | [BUG] Division by zero error in RawHarvester when calculating comment stats
#### Description
When using the `raw` command to analyze code with zero comments, the tool crashes with a division by zero error.
```python
from radon.cli.harvest import RawHarvester
from radon.cli import Config
# Create a basic configurati... | diff --git a/radon/cli/harvest.py b/radon/cli/harvest.py
index ac14fe5..1ff150a 100644
--- a/radon/cli/harvest.py
+++ b/radon/cli/harvest.py
@@ -290,7 +290,7 @@ class RawHarvester(Harvester):
yield '- Comment Stats', (), {'indent': 1}
yield (
'(C % L): {0:.0%}',
- ... | ["radon/tests/test_cli.py::test_encoding", "radon/tests/test_cli_harvest.py::test_raw_to_terminal"] | ["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 | 7 | 2 | 1,352 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248667 | 81.021 | |||
6,639 | swe_smith::train::43587 | swe_smith | train | 43,587 | cloudpipe__cloudpickle.6220b0ce.func_basic__imrrcwu5 | swesmith/cloudpipe__cloudpickle.6220b0ce | cloudpipe/cloudpickle | python | null | register_pickle_by_value raises ValueError for already imported modules
#### Description
When trying to register a module for pickling by value using `register_pickle_by_value()`, the function incorrectly raises a ValueError if the module is already imported in `sys.modules`, claiming the module "is already imported,... | diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py
index 8c50ba1..b7e4af0 100644
--- a/cloudpickle/cloudpickle.py
+++ b/cloudpickle/cloudpickle.py
@@ -146,22 +146,11 @@ def register_pickle_by_value(module):
"""
if not isinstance(module, types.ModuleType):
raise ValueError(f"Input sh... | ["tests/cloudpickle_test.py::CloudPickleTest::test_pickle_constructs_from_module_registered_for_pickling_by_value", "tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_pickle_constructs_from_module_registered_for_pickling_by_value"] | ["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/c... | jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce | true | null | 1 | 17 | 2 | 1,152 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248667 | 81.021 | |||
6,640 | swe_smith::train::52671 | swe_smith | train | 52,671 | pydicom__pydicom.7d361b3d.lm_rewrite__asv2iri6 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | # RecordNode._file_id property raises AttributeError when ReferencedFileID is missing
## Description
It seems that the `_file_id` property in the `RecordNode` class is not handling the case correctly when the "ReferencedFileID" attribute is missing from the record.
When trying to access the `_file_id` property on a ... | diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py
index 75976eb..a22be41 100644
--- a/src/pydicom/fileset.py
+++ b/src/pydicom/fileset.py
@@ -347,7 +347,7 @@ class RecordNode(Iterable["RecordNode"]):
return len(fp.getvalue())
@property
- def _file_id(self) -> Path | None:
+ def _file_id... | ["tests/test_fileset.py::TestRecordNode::test_file_id_missing"] | ["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 | 25 | 1 | 992 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248667 | 81.021 | |||
6,641 | swe_smith::train::49230 | swe_smith | train | 49,230 | mozilla__bleach.73871d76.func_basic__17kcd9qh | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | Module factory cache returns wrong object type
#### Description
When using the module factory with caching, the cached modules are returning dictionary objects instead of ModuleType instances on subsequent calls.
#### Steps/Code to Reproduce
```python
import bleach
from bleach._vendor.html5lib._utils import moduleF... | diff --git a/bleach/_vendor/html5lib/_utils.py b/bleach/_vendor/html5lib/_utils.py
index 635bb02..15bc3fa 100644
--- a/bleach/_vendor/html5lib/_utils.py
+++ b/bleach/_vendor/html5lib/_utils.py
@@ -135,13 +135,13 @@ def moduleFactoryFactory(factory):
mod = ModuleType(name)
objs = factory(baseMo... | ["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 8 | 185 | 1,332 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248667 | 81.021 | |||
6,642 | swe_smith::train::1736 | swe_smith | train | 1,736 | agronholm__typeguard.b6a7e438.func_basic__03o4fz9t | swesmith/agronholm__typeguard.b6a7e438 | agronholm/typeguard | python | null | # Import hook in TypeguardFinder is not working correctly
## Bug report
**Bug summary**
The import hook in TypeguardFinder is not working correctly. When trying to import modules that should be instrumented by typeguard, the import fails with a TypeError. This affects all functionality that relies on the import hook ... | diff --git a/src/typeguard/_importhook.py b/src/typeguard/_importhook.py
index 0d1c627..368f1df 100644
--- a/src/typeguard/_importhook.py
+++ b/src/typeguard/_importhook.py
@@ -119,13 +119,13 @@ class TypeguardFinder(MetaPathFinder):
path: Sequence[str] | None,
target: types.ModuleType | None = None,
... | ["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_pytest_plugin.py::test_config_options", "tests/test_pytest_plugin.py::test_commandline_options"] | ["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 | 10 | 4 | 1,292 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248667 | 81.021 | |||
6,643 | swe_smith::train::46613 | swe_smith | train | 46,613 | python-trio__trio.cfbbe2c1.combine_file__eyb7bfo1 | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | SocketStream constructor incorrectly rejects SOCK_RAW sockets
#### Description
SocketStream now incorrectly rejects SOCK_RAW sockets due to a logic error in the socket type validation. The constructor should only reject SOCK_DGRAM sockets but currently rejects anything that isn't SOCK_DGRAM.
#### Steps/Code to Repro... | diff --git a/src/trio/_highlevel_socket.py b/src/trio/_highlevel_socket.py
index c04e66e..af04cf8 100644
--- a/src/trio/_highlevel_socket.py
+++ b/src/trio/_highlevel_socket.py
@@ -71,7 +71,7 @@ class SocketStream(HalfCloseableStream):
def __init__(self, socket: SocketType) -> None:
if not isinstance(sock... | ["src/trio/_tests/test_highlevel_socket.py::test_SocketStream_basics"] | ["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 | 25 | 1 | 991 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2485 | 81.0205 | |||
6,644 | swe_smith::train::48307 | swe_smith | train | 48,307 | sqlfluff__sqlfluff.50a1c4b6.func_pm_op_change__tmbnbxj4 | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | BaseSegment stringify method crashes with TypeError
#### Description
The `stringify` method in `BaseSegment` is throwing a `TypeError` when trying to perform string operations. This affects debugging and string representation functionality.
#### Steps/Code to Reproduce
```python
from sqlfluff.core.parser.segments.b... | diff --git a/src/sqlfluff/core/parser/segments/base.py b/src/sqlfluff/core/parser/segments/base.py
index 533fca3..6277e70 100644
--- a/src/sqlfluff/core/parser/segments/base.py
+++ b/src/sqlfluff/core/parser/segments/base.py
@@ -790,10 +790,10 @@ class BaseSegment(metaclass=SegmentMetaclass):
"""Use indentatio... | ["test/core/parser/segments/segments_base_test.py::test__parser__base_segments_base", "test/core/rules/functional/segments_test.py::test_segments_recursive_crawl"] | ["test/core/parser/segments/segments_base_test.py::test__parser__base_segments_type", "test/core/parser/segments/segments_base_test.py::test__parser__base_segments_class_types", "test/core/parser/segments/segments_base_test.py::test__parser__base_segments_descendant_type_set", "test/core/parser/segments/segments_base_t... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 7 | 2 | 1,351 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2485 | 81.0205 | |||
6,645 | swe_smith::train::13216 | swe_smith | train | 13,216 | python-openxml__python-docx.0cf6d71f.func_basic__4qgzn3yn | swesmith/python-openxml__python-docx.0cf6d71f | python-openxml/python-docx | python | null | Style validation logic inverted in _get_style_id_from_style method
#### Description
The style type validation in the `_get_style_id_from_style` method appears to be working backwards. When assigning a style that matches the expected type, it raises a ValueError saying the style type is wrong. When the style type actu... | diff --git a/src/docx/styles/styles.py b/src/docx/styles/styles.py
index 98a56e5..0c88ab0 100644
--- a/src/docx/styles/styles.py
+++ b/src/docx/styles/styles.py
@@ -136,10 +136,10 @@ class Styles(ElementProxy):
Raises |ValueError| if style is not of `style_type`.
"""
- if style.type != style_... | ["tests/styles/test_styles.py::DescribeStyles::it_gets_a_style_id_from_a_style_to_help[True]", "tests/styles/test_styles.py::DescribeStyles::it_gets_a_style_id_from_a_style_to_help[False]", "tests/styles/test_styles.py::DescribeStyles::it_raises_on_style_type_mismatch"] | ["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows... | jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f | true | null | 1 | 8 | 3 | 1,331 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2485 | 81.0205 | |||
6,646 | swe_smith::train::7088 | swe_smith | train | 7,088 | cantools__cantools.0c6a7871.combine_file__w3hpw5iv | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | Message formatting broken after recent changes
#### Description
The message formatting in the decode and monitor commands is producing incorrect output. Messages are being formatted with their ID instead of name, and the formatting structure appears corrupted.
#### Steps/Code to Reproduce
```bash
# Using the decode... | diff --git a/src/cantools/subparsers/__utils__.py b/src/cantools/subparsers/__utils__.py
index 63faa8a..f14abd0 100644
--- a/src/cantools/subparsers/__utils__.py
+++ b/src/cantools/subparsers/__utils__.py
@@ -49,15 +49,15 @@ def _format_message_single_line(message : Message,
', '.join(forma... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_log_format", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_muxed_data", "tests/test_comman... | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 30 | 15 | 891 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2485 | 81.0205 | |||
6,647 | swe_smith::train::33163 | swe_smith | train | 33,163 | django-money__django-money.835c1ab8.func_basic__45ecxbbn | swesmith/django-money__django-money.835c1ab8 | django-money/django-money | python | null | Manager methods returning None instead of model instance
#### Description
When using custom managers or proxy models with django-money, operations that should return model instances are returning `None` instead. This affects various ORM operations including filtering, updates, and object creation.
#### Steps/Code to... | diff --git a/djmoney/models/managers.py b/djmoney/models/managers.py
index d76f0c5..410ba9d 100644
--- a/djmoney/models/managers.py
+++ b/djmoney/models/managers.py
@@ -179,11 +179,11 @@ def _get_model(args, func):
model = func.__self__.model
elif hasattr(func, "__wrapped__"):
# Proxy model
- ... | ["tests/test_form.py::test_save", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs0-expected0]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs1-expected1]", "tests/test_models.py::TestVanillaMoneyField::test_creat... | ["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/... | jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8 | true | null | 1 | 6 | 141 | 1,370 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248333 | 81.02 | |||
6,648 | swe_smith::train::1908 | swe_smith | train | 1,908 | agronholm__typeguard.b6a7e438.func_pm_remove_cond__ehyhh6nv | swesmith/agronholm__typeguard.b6a7e438 | agronholm/typeguard | python | null | # BinaryIO type checking is broken
## Description
It looks like the type checking for binary I/O objects is broken. When passing a `StringIO` object to a function that expects a `BinaryIO` or `IO[bytes]`, no type error is raised when it should be.
## Steps to reproduce
Here's a minimal example that demonstrates the... | diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py
index 5e34036..6f0f68b 100644
--- a/src/typeguard/_checkers.py
+++ b/src/typeguard/_checkers.py
@@ -640,12 +640,6 @@ def check_io(
if origin_type is TextIO or (origin_type is IO and args == (str,)):
if not isinstance(value, TextIOBase):
... | ["tests/test_checkers.py::TestIO::test_binary_fail[direct]", "tests/test_checkers.py::TestIO::test_binary_fail[parametrized]"] | ["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 | 6 | 2 | 1,370 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248333 | 81.02 | |||
6,649 | swe_smith::train::31221 | swe_smith | train | 31,221 | scrapy__scrapy.35212ec5.func_pm_class_rm_funcs__9sggl157 | swesmith/scrapy__scrapy.35212ec5 | scrapy/scrapy | python | null | ReturnsContract missing __init__ method causes AttributeError
When using the `@returns` contract decorator, spiders fail with AttributeError because the ReturnsContract class is missing required attributes that should be initialized in the `__init__` method.
#### Steps/Code to Reproduce
```python
from scrapy.spiders... | diff --git a/scrapy/contracts/default.py b/scrapy/contracts/default.py
index 6f357ba..53bdea4 100644
--- a/scrapy/contracts/default.py
+++ b/scrapy/contracts/default.py
@@ -72,26 +72,6 @@ class ReturnsContract(Contract):
"items": is_item,
}
- def __init__(self, *args: Any, **kwargs: Any):
- su... | ["tests/test_contracts.py::ContractsManagerTest::test_cb_kwargs", "tests/test_contracts.py::ContractsManagerTest::test_meta", "tests/test_contracts.py::ContractsManagerTest::test_returns", "tests/test_contracts.py::ContractsManagerTest::test_scrapes", "tests/test_contracts.py::CustomContractPrePostProcess::test_post_ho... | ["tests/test_contracts.py::ContractsManagerTest::test_contracts", "tests/test_contracts.py::ContractsManagerTest::test_custom_contracts", "tests/test_contracts.py::ContractsManagerTest::test_errback", "tests/test_contracts.py::ContractsManagerTest::test_form_contract", "tests/test_contracts.py::ContractsManagerTest::te... | jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5 | true | null | 1 | 21 | 5 | 1,070 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248333 | 81.02 | |||
6,650 | swe_smith::train::19496 | swe_smith | train | 19,496 | seperman__deepdiff.ed252022.lm_rewrite__a3z3grtj | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | # Pickle loading fails with string content
I've discovered an issue with the `pickle_load` function when passing a string as content. The function fails to properly handle string content, causing unpickling errors.
I expected to be able to pass a string to `pickle_load` and have it properly handle the conversion to b... | diff --git a/deepdiff/serialization.py b/deepdiff/serialization.py
index aa56399..0230a3f 100644
--- a/deepdiff/serialization.py
+++ b/deepdiff/serialization.py
@@ -399,14 +399,14 @@ def pickle_load(content=None, file_obj=None, safe_to_import=None):
"""
- if not content and not file_obj:
- raise Valu... | ["tests/test_serialization.py::TestPickling::test_pickle_that_is_string"] | ["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 | 14 | 1 | 1,210 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248333 | 81.02 | |||
6,651 | swe_smith::train::46619 | swe_smith | train | 46,619 | python-trio__trio.cfbbe2c1.combine_file__h4zcm8p6 | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | Channel close() method doesn't properly close channels
#### Description
When calling `close()` on memory channels, the channels don't get properly closed and continue to behave as if they're still open. This affects both send and receive channels.
#### Steps/Code to Reproduce
```python
import trio
async def main()... | diff --git a/src/trio/_channel.py b/src/trio/_channel.py
index 6410d91..b5ad13b 100644
--- a/src/trio/_channel.py
+++ b/src/trio/_channel.py
@@ -267,18 +267,20 @@ class MemorySendChannel(SendChannel[SendType], metaclass=NoPublicConstructor):
"""
if self._closed:
return
- self._clos... | ["src/trio/_tests/test_channel.py::test_channel", "src/trio/_tests/test_channel.py::test_close_basics", "src/trio/_tests/test_channel.py::test_close_sync", "src/trio/_tests/test_channel.py::test_receive_channel_clone_and_close", "src/trio/_tests/test_channel.py::test_close_multiple_receive_handles", "src/trio/_tests/te... | ["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co... | jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1 | true | null | 1 | 15 | 7 | 1,190 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248333 | 81.02 | |||
6,652 | swe_smith::train::4282 | swe_smith | train | 4,282 | pygments__pygments.27649ebb.func_pm_class_rm_funcs__v7o9eab1 | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | CommonLispLexer missing builtin attributes after initialization
#### Description
The CommonLispLexer fails to initialize properly and throws AttributeError when trying to access builtin function/keyword attributes that should be available after instantiation.
#### Steps/Code to Reproduce
```python
from pygments.lex... | diff --git a/pygments/lexers/lisp.py b/pygments/lexers/lisp.py
index e6cc587..4764fdb 100644
--- a/pygments/lexers/lisp.py
+++ b/pygments/lexers/lisp.py
@@ -316,19 +316,6 @@ class CommonLispLexer(RegexLexer):
# Take a deep breath...
symbol = rf'(\|[^|]+\||(?:{nonmacro})(?:{constituent})*)'
- def __init__... | ["tests/test_basic_api.py::test_random_input[CommonLispLexer]", "tests/test_basic_api.py::test_lexer_options[CommonLispLexer]", "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 | 24 | 3 | 1,010 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248333 | 81.02 | |||
6,653 | swe_smith::train::12978 | swe_smith | train | 12,978 | python-openxml__python-docx.0cf6d71f.combine_file__zrhaslff | swesmith/python-openxml__python-docx.0cf6d71f | python-openxml/python-docx | python | null | TabStops indexing and length calculation broken
#### Description
The TabStops class has issues with indexing and length calculation. When trying to access tab stops by index or get the length of a TabStops object, unexpected behavior occurs.
#### Steps/Code to Reproduce
```python
from docx import Document
from docx... | diff --git a/src/docx/text/tabstops.py b/src/docx/text/tabstops.py
index 824085d..ac31135 100644
--- a/src/docx/text/tabstops.py
+++ b/src/docx/text/tabstops.py
@@ -32,8 +32,8 @@ class TabStops(ElementProxy):
"""Enables list-style access by index."""
tabs = self._pPr.tabs
if tabs is None:
- ... | ["tests/text/test_tabstops.py::DescribeTabStops::it_knows_its_length[len_fixture1]", "tests/text/test_tabstops.py::DescribeTabStops::it_can_get_a_tab_stop_by_index[index_fixture1]", "tests/text/test_tabstops.py::DescribeTabStops::it_can_get_a_tab_stop_by_index[index_fixture2]", "tests/text/test_tabstops.py::DescribeTab... | ["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows... | jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f | true | null | 1 | 10 | 5 | 1,290 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248333 | 81.02 | |||
6,654 | swe_smith::train::50896 | swe_smith | train | 50,896 | python-hyper__h11.bed0dd4a.func_pm_ctrl_shuffle__mrobfe85 | swesmith/python-hyper__h11.bed0dd4a | python-hyper/h11 | python | null | get_comma_header function returns UnboundLocalError when called
#### Description
The `get_comma_header` function in `h11/_headers.py` is raising an `UnboundLocalError` when trying to access the `out` variable. This appears to be affecting multiple parts of the HTTP parsing functionality.
#### Steps/Code to Reproduce... | diff --git a/h11/_headers.py b/h11/_headers.py
index b97d020..b7205f2 100644
--- a/h11/_headers.py
+++ b/h11/_headers.py
@@ -203,6 +203,14 @@ def normalize_and_validate(
def get_comma_header(headers: Headers, name: bytes) -> List[bytes]:
+ for _, found_name, found_raw_value in headers._full_items:
+ if f... | ["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... | ["h11/tests/test_connection.py::test_close_simple", "h11/tests/test_connection.py::test_idle_receive_nothing", "h11/tests/test_connection.py::test_connection_drop", "h11/tests/test_connection.py::test_empty_request", "h11/tests/test_connection.py::test_early_detection_of_invalid_request[\\x00]", "h11/tests/test_connect... | jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a | true | null | 1 | 17 | 26 | 1,150 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248333 | 81.02 | |||
6,655 | swe_smith::train::19088 | swe_smith | train | 19,088 | seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__d0lp5jwr | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | Delta operations fail with UnboundLocalError on tuple modifications
#### Description
When applying delta operations that involve modifying tuples, an `UnboundLocalError` is raised for the variable `obj_is_new`. This affects various delta operations including list differences, multiple deltas, and bidirectional delta ... | diff --git a/deepdiff/delta.py b/deepdiff/delta.py
index 8bafc9a..12b7f02 100644
--- a/deepdiff/delta.py
+++ b/deepdiff/delta.py
@@ -350,22 +350,21 @@ class Delta:
def _del_elem(self, parent, parent_to_obj_elem, parent_to_obj_action,
obj, elements, path, elem, action):
- """
- De... | ["tests/test_delta.py::TestBasicsOfDelta::test_list_difference_add_delta", "tests/test_delta.py::TestBasicsOfDelta::test_multiple_delta", "tests/test_delta.py::TestBasicsOfDelta::test_list_difference3_delta", "tests/test_delta.py::TestBasicsOfDelta::test_list_difference_delta1", "tests/test_delta.py::TestBasicsOfDelta:... | ["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 | 11 | 27 | 1,269 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248167 | 81.0195 | |||
6,656 | swe_smith::train::23833 | swe_smith | train | 23,833 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__87b3vrob | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | TimeSeries plotting fails with single column data
#### Description
When plotting a TimeSeries with a single column, the plotting functionality raises an AttributeError because it tries to call `.plot()` on a numpy array instead of a matplotlib axes object.
#### Steps/Code to Reproduce
```python
import sunpy.timeser... | diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py
index 80e5d20..7cd0659 100644
--- a/sunpy/timeseries/timeseriesbase.py
+++ b/sunpy/timeseries/timeseriesbase.py
@@ -297,27 +297,27 @@ class GenericTimeSeries:
# label is set. Otherwise, each subplot has its own yaxis label.
... | ["sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html", "sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html_", "sunpy/timeseries/tests/test_timeseriesbase.py::test_quicklook"] | ["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 17 | 3 | 1,149 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248167 | 81.0195 | |||
6,657 | swe_smith::train::32089 | swe_smith | train | 32,089 | davidhalter__parso.338a5760.func_basic__ymmlofrp | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | get_leaf_for_position causes infinite recursion with certain position values
#### Description
When calling `get_leaf_for_position` on certain nodes with specific position values, the method enters an infinite recursion loop and eventually raises a `RecursionError: maximum recursion depth exceeded`.
#### Steps/Code t... | diff --git a/parso/tree.py b/parso/tree.py
index e529871..a9ac017 100644
--- a/parso/tree.py
+++ b/parso/tree.py
@@ -417,21 +417,19 @@ class BaseNode(NodeOrLeaf):
def binary_search(lower, upper):
if lower == upper:
element = self.children[lower]
- if not include_pre... | ["test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_parser.py::test_one_statement_func", "test/test_diff_parser.py::test_for_on_one_line", "test/test_diff_pa... | ["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 | 12 | 77 | 1,249 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248167 | 81.0195 | |||
6,658 | swe_smith::train::52430 | swe_smith | train | 52,430 | pydicom__pydicom.7d361b3d.func_pm_ctrl_shuffle__rwgtfkvc | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | _BufferedItem initialization fails due to undefined variable access
#### Description
When creating a `_BufferedItem` instance, the initialization fails with an `AttributeError` because the code tries to access `self._blen` before it's defined.
#### Steps/Code to Reproduce
```python
from io import BytesIO
from pydic... | diff --git a/src/pydicom/encaps.py b/src/pydicom/encaps.py
index 3493808..66a5dc1 100644
--- a/src/pydicom/encaps.py
+++ b/src/pydicom/encaps.py
@@ -653,26 +653,18 @@ class _BufferedItem:
"""
def __init__(self, buffer: BufferedIOBase) -> None:
- """Create a new ``_BufferedItem`` instance.
- ... | ["tests/test_encaps.py::TestBufferedFrame::test_init", "tests/test_encaps.py::TestBufferedFrame::test_read_even", "tests/test_encaps.py::TestBufferedFrame::test_read_odd", "tests/test_encaps.py::TestBufferedFrame::test_read_partial_even", "tests/test_encaps.py::TestBufferedFrame::test_read_partial_odd", "tests/test_enc... | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 27 | 26 | 949 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248167 | 81.0195 | |||
6,659 | swe_smith::train::2999 | swe_smith | train | 2,999 | Suor__funcy.207a7810.combine_file__m9nft7o1 | swesmith/Suor__funcy.207a7810 | suor/funcy | python | null | # LazyObject and cached_readonly broken in recent changes
I've discovered two issues with the recent changes to the `objects.py` file:
## Issue 1: cached_readonly no longer prevents property rewrites
The `cached_readonly` property decorator is supposed to prevent properties from being overwritten, but it's now silen... | diff --git a/funcy/objects.py b/funcy/objects.py
index 6054f7b..788a9bb 100644
--- a/funcy/objects.py
+++ b/funcy/objects.py
@@ -29,7 +29,7 @@ class cached_property(object):
class cached_readonly(cached_property):
"""Same as @cached_property, but protected against rewrites."""
def __set__(self, instance, val... | ["tests/test_objects.py::test_cached_readonly", "tests/test_objects.py::test_lazy_object"] | ["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_cal... | jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810 | true | null | 1 | 6 | 2 | 1,369 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248167 | 81.0195 | |||
6,660 | swe_smith::train::43588 | swe_smith | train | 43,588 | cloudpipe__cloudpickle.6220b0ce.func_basic__iyffdu7t | swesmith/cloudpipe__cloudpickle.6220b0ce | cloudpipe/cloudpickle | python | null | TypeVar pickling broken - parameters swapped and return value corrupted
When pickling TypeVars with cloudpickle, the parameters get mixed up and the function returns None instead of the actual TypeVar object.
#### Steps/Code to Reproduce
```python
import typing
import cloudpickle
# Create a TypeVar with specific pa... | diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py
index 8c50ba1..e65f376 100644
--- a/cloudpickle/cloudpickle.py
+++ b/cloudpickle/cloudpickle.py
@@ -584,11 +584,11 @@ def _make_typevar(name, bound, constraints, covariant, contravariant, class_trac
tv = typing.TypeVar(
name,
*c... | ["tests/cloudpickle_test.py::CloudPickleTest::test_locally_defined_class_with_type_hints", "tests/cloudpickle_test.py::CloudPickleTest::test_pickle_constructs_from_module_registered_for_pickling_by_value", "tests/cloudpickle_test.py::CloudPickleTest::test_pickle_dynamic_typevar_tracking", "tests/cloudpickle_test.py::Pr... | ["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/c... | jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce | true | null | 1 | 8 | 8 | 1,328 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248 | 81.019 | |||
6,661 | swe_smith::train::25686 | swe_smith | train | 25,686 | pylint-dev__astroid.b114f6b5.func_basic__hona9kpm | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | AttributeInferenceError raised when attributes should be found in class hierarchy
#### Description
When looking up dunder methods in class hierarchies, astroid incorrectly raises `AttributeInferenceError` even when the attribute exists in ancestor classes. This affects inference of binary operations, unary operations... | diff --git a/astroid/interpreter/dunder_lookup.py b/astroid/interpreter/dunder_lookup.py
index 727c1ad..4b78c46 100644
--- a/astroid/interpreter/dunder_lookup.py
+++ b/astroid/interpreter/dunder_lookup.py
@@ -29,10 +29,10 @@ def _lookup_in_mro(node, name) -> list:
attrs = node.locals.get(name, [])
nodes = i... | ["tests/brain/test_brain.py::CollectionsBrain::test_collections_object_not_subscriptable", "tests/brain/test_brain.py::CollectionsBrain::test_collections_object_subscriptable", "tests/brain/test_brain.py::CollectionsBrain::test_collections_object_subscriptable_2", "tests/brain/test_brain.py::CollectionsBrain::test_coll... | ["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 | 6 | 62 | 1,368 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248 | 81.019 | |||
6,662 | swe_smith::train::21810 | swe_smith | train | 21,810 | life4__textdistance.c3aca916.combine_file__s5ap259k | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | NeedlemanWunsch and MLIPNS classes missing required methods after initialization changes
#### Description
After recent changes, the `NeedlemanWunsch` and `MLIPNS` classes are throwing `AttributeError` when trying to access basic methods. The classes seem to be missing their initialization or inheritance setup.
#### ... | diff --git a/textdistance/algorithms/edit_based.py b/textdistance/algorithms/edit_based.py
index 0a6e02f..676c54e 100644
--- a/textdistance/algorithms/edit_based.py
+++ b/textdistance/algorithms/edit_based.py
@@ -431,21 +431,6 @@ class NeedlemanWunsch(_BaseSimilarity):
https://en.wikipedia.org/wiki/Needleman%E2%80... | ["tests/test_common.py::test_normalization_range[alg6]", "tests/test_common.py::test_normalization_range[alg21]", "tests/test_common.py::test_normalization_by_one[alg6]", "tests/test_common.py::test_normalization_by_one[alg21]", "tests/test_common.py::test_normalization_same[alg6]", "tests/test_common.py::test_normaliz... | ["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati... | jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916 | true | null | 1 | 29 | 30 | 908 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248 | 81.019 | |||
6,663 | swe_smith::train::7078 | swe_smith | train | 7,078 | cantools__cantools.0c6a7871.combine_file__tbvfthh5 | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | DBC attribute definition parsing broken for INT/FLOAT types
#### Description
When loading DBC files with attribute definitions that have INT or FLOAT types, the parser incorrectly swaps the conversion functions and attribute parameters, causing AttributeError when trying to access minimum/maximum values.
#### Steps/... | diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py
index a5b6092..06e93c9 100644
--- a/src/cantools/database/can/formats/dbc.py
+++ b/src/cantools/database/can/formats/dbc.py
@@ -653,7 +653,7 @@ def _dump_attribute_definitions(database: InternalDatabase) -> list[str]:
... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals2", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_sort_sig... | ["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 | 22 | 39 | 1,048 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248 | 81.019 | |||
6,664 | swe_smith::train::21755 | swe_smith | train | 21,755 | pexpect__ptyprocess.1067dbda.func_basic__sasu02vi | swesmith/pexpect__ptyprocess.1067dbda | pexpect/ptyprocess | python | null | # read_nonblocking returns reversed data and doesn't set flag_eof correctly
## Issue
The `read_nonblocking` method in `PtyProcess` is returning reversed data and not properly setting the EOF flag.
## Code
```python
from ptyprocess import PtyProcess
import os
p = PtyProcess.spawn(['echo', 'hello world'])
output = p.r... | diff --git a/ptyprocess/ptyprocess.py b/ptyprocess/ptyprocess.py
index 0f05803..6d5e263 100644
--- a/ptyprocess/ptyprocess.py
+++ b/ptyprocess/ptyprocess.py
@@ -515,7 +515,7 @@ class PtyProcess(object):
Can block if there is nothing to read. Raises :exc:`EOFError` if the
terminal was closed.
- ... | ["tests/test_spawn.py::PtyTestCase::test_spawn_sh", "tests/test_spawn.py::PtyTestCase::test_spawn_sh_unicode"] | ["tests/test_echo.py::PtyEchoTestCase::test_waitnoecho_forever", "tests/test_echo.py::PtyEchoTestCase::test_waitnoecho_timeout", "tests/test_invalid_binary.py::InvalidBinaryChars::test_invalid_binary", "tests/test_preexec_fn.py::PreexecFns::test_preexec", "tests/test_preexec_fn.py::PreexecFns::test_preexec_error", "tes... | jyangballin/swesmith.x86_64.pexpect_1776_ptyprocess.1067dbda | true | null | 1 | 10 | 2 | 1,288 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248 | 81.019 | |||
6,665 | swe_smith::train::7008 | swe_smith | train | 7,008 | cantools__cantools.0c6a7871.combine_file__h5p7hsu6 | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | Message.update() raises TypeError when updating signals
#### Description
When trying to update signals on a Message object, a TypeError is raised due to incorrect set operations in the validation logic.
#### Steps/Code to Reproduce
```python
import cantools
# Load a DBC file and create a tester
db = cantools.datab... | diff --git a/src/cantools/tester.py b/src/cantools/tester.py
index c2ad9f2..db418c7 100644
--- a/src/cantools/tester.py
+++ b/src/cantools/tester.py
@@ -139,7 +139,7 @@ class Message(UserDict):
@property
def periodic(self):
- return self.database.cycle_time is not None
+ return self.database.c... | ["tests/test_tester.py::CanToolsTesterTest::test_bad_message_name", "tests/test_tester.py::CanToolsTesterTest::test_enable_disable", "tests/test_tester.py::CanToolsTesterTest::test_expect", "tests/test_tester.py::CanToolsTesterTest::test_flush_input", "tests/test_tester.py::CanToolsTesterTest::test_on_message", "tests/... | ["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 | 27 | 9 | 948 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248 | 81.019 | |||
6,666 | swe_smith::train::12243 | swe_smith | train | 12,243 | lepture__mistune.bf54ef67.combine_module__osubrue4 | swesmith/lepture__mistune.bf54ef67 | lepture/mistune | python | null | List rendering broken for both ordered and unordered lists
#### Description
List rendering is completely broken in mistune. Both ordered and unordered lists are being rendered incorrectly, with ordered lists showing up as unordered and vice versa. Additionally, the RST renderer is throwing TypeErrors when trying to r... | diff --git a/src/mistune/renderers/_list.py b/src/mistune/renderers/_list.py
index a9f0313..cb70732 100644
--- a/src/mistune/renderers/_list.py
+++ b/src/mistune/renderers/_list.py
@@ -10,18 +10,20 @@ def render_list(
renderer: "BaseRenderer", token: Dict[str, Any], state: "BlockState"
) -> str:
attrs = toke... | ["tests/test_renderers.py::TestRendererRst::test_list_001", "tests/test_renderers.py::TestRendererRst::test_list_002", "tests/test_renderers.py::TestRendererRst::test_list_003", "tests/test_renderers.py::TestRendererRst::test_list_004", "tests/test_renderers.py::TestRendererRst::test_list_005", "tests/test_renderers.py... | ["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx... | jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67 | true | null | 2 | 13 | 11 | 1,228 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248 | 81.019 | |||
6,667 | swe_smith::train::2506 | swe_smith | train | 2,506 | pdfminer__pdfminer.six.1a8bd2f7.func_pm_remove_assign__gqytrcfc | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | PNG predictor filter decoding broken after recent changes
#### Description
The PNG predictor filter decoding in `apply_png_predictor` function is producing incorrect results. When processing PDF files with PNG-encoded image data, the function fails to properly decode the filtered image data, resulting in corrupted or... | diff --git a/pdfminer/utils.py b/pdfminer/utils.py
index a5b5385..c10b31d 100644
--- a/pdfminer/utils.py
+++ b/pdfminer/utils.py
@@ -144,12 +144,9 @@ def apply_png_predictor(
nbytes = colors * columns * bitspercomponent // 8
bpp = colors * bitspercomponent // 8 # number of bytes per complete pixel
- buf... | ["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cid_range", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cmap_bytes", "tests/test_highlevel_extracttext.py::TestExtractText::test_simple5_with_file", "tests/test_highlevel_extracttext.py::TestExtractText::test_simple5_with_s... | ["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p... | jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7 | true | null | 1 | 6 | 5 | 1,368 | 0 | 0.6 | 1 | 0.75 | 1 | 0.248 | 81.019 | |||
6,668 | swe_smith::train::29061 | swe_smith | train | 29,061 | tox-dev__pipdeptree.c31b6418.combine_module__j2zf5uqr | swesmith/tox-dev__pipdeptree.c31b6418 | tox-dev/pipdeptree | python | null | ReqPackage constructor arguments swapped causing AttributeError
#### Description
When creating a `ReqPackage` instance, the constructor arguments appear to be swapped internally, causing `AttributeError` when trying to access properties of the requirement object.
#### Steps/Code to Reproduce
```python
from unittest... | diff --git a/src/pipdeptree/_models/package.py b/src/pipdeptree/_models/package.py
index 7e49250..9b26cf3 100644
--- a/src/pipdeptree/_models/package.py
+++ b/src/pipdeptree/_models/package.py
@@ -176,8 +176,8 @@ class ReqPackage(Package):
def __init__(self, obj: Requirement, dist: DistPackage | None = None) -> ... | ["tests/_models/test_package.py::test_guess_version_setuptools", "tests/_models/test_package.py::test_dist_package_render_as_branch", "tests/_models/test_package.py::test_req_package_render_as_branch", "tests/_models/test_package.py::test_req_package_as_dict", "tests/_models/test_package.py::test_req_package_as_dict_wi... | ["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack... | jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418 | true | null | 2 | 8 | 38 | 1,327 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247833 | 81.0185 | |||
6,669 | swe_smith::train::10339 | swe_smith | train | 10,339 | paramiko__paramiko.23f92003.func_basic__6dd9emny | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | SFTP file operations fail with "Expected different handle" error
#### Description
When trying to open files via SFTP, all file operations are failing with an `SFTPError: Expected different handle` error. This affects basic file operations like reading, writing, and creating files.
#### Steps/Code to Reproduce
```py... | diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py
index 066cd83..2e8098c 100644
--- a/paramiko/sftp_client.py
+++ b/paramiko/sftp_client.py
@@ -358,20 +358,18 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
filename = self._adjust_cwd(filename)
self._log(DEBUG, "open({!r}, {!r})".fo... | ["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_append", "tests/test_sftp.py::TestSFTP::test_rename", "tests/test_sftp.py::TestSFTP::testa_posix_rename", "tests/test... | ["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag... | jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003 | true | null | 1 | 16 | 40 | 1,167 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247833 | 81.0185 | |||
6,670 | swe_smith::train::27632 | swe_smith | train | 27,632 | arrow-py__arrow.1d70d009.func_basic__ulpdfead | swesmith/arrow-py__arrow.1d70d009 | arrow-py/arrow | python | null | Arrow._get_datetime returns wrong type for timestamps and doesn't raise ValueError for invalid input
#### Description
The `Arrow._get_datetime` method is not working correctly when handling timestamps and invalid input. When passed a timestamp, it returns a `date` object instead of a `datetime` object, and when passe... | diff --git a/arrow/arrow.py b/arrow/arrow.py
index 9d1f5e3..c612910 100644
--- a/arrow/arrow.py
+++ b/arrow/arrow.py
@@ -1806,15 +1806,15 @@ class Arrow:
cls, expr: Union["Arrow", dt_datetime, int, float, str]
) -> dt_datetime:
"""Get datetime object from a specified expression."""
- if is... | ["tests/test_arrow.py::TestArrowUtil::test_get_datetime"] | ["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 | 12 | 1 | 1,247 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247833 | 81.0185 | |||
6,671 | swe_smith::train::38403 | swe_smith | train | 38,403 | dbader__schedule.82a43db1.func_basic__hyutnpcs | swesmith/dbader__schedule.82a43db1 | dbader/schedule | python | null | # Monday scheduling in weekly jobs is broken
## Description
When using the `.monday()` method to schedule a weekly job, it incorrectly sets the start day to "sunday" instead of "monday". Additionally, it returns `weeks + 1` instead of just `weeks`.
## Expected behavior
When calling `.monday()` on a weekly job, it s... | diff --git a/schedule/__init__.py b/schedule/__init__.py
index 8e12eeb..3aa9b3c 100644
--- a/schedule/__init__.py
+++ b/schedule/__init__.py
@@ -379,14 +379,14 @@ class Job:
@property
def monday(self):
- if self.interval != 1:
+ if self.interval < 1:
raise IntervalError(
... | ["test_schedule.py::SchedulerTests::test_at_time", "test_schedule.py::SchedulerTests::test_next_run_time", "test_schedule.py::SchedulerTests::test_time_units", "test_schedule.py::SchedulerTests::test_tz_daily_utc"] | ["test_schedule.py::SchedulerTests::test_align_utc_offset_after_fold_fixate", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_change", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold", "test_schedule.py::SchedulerT... | jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1 | true | null | 1 | 6 | 4 | 1,367 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247833 | 81.0185 | |||
6,672 | swe_smith::train::24640 | swe_smith | train | 24,640 | marshmallow-code__marshmallow.9716fc62.func_basic__4qgvbvlq | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | Tuple field binding broken after schema initialization
#### Description
When using Tuple fields with nested schemas, the field binding process fails with an AttributeError. The tuple fields are not properly bound to their parent schema, causing issues when accessing nested field properties.
#### Steps/Code to Reprod... | diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py
index e83ba19..cd11fc8 100644
--- a/src/marshmallow/fields.py
+++ b/src/marshmallow/fields.py
@@ -846,11 +846,11 @@ class Tuple(Field):
super()._bind_to_schema(field_name, schema)
new_tuple_fields = []
for field in self.tuple_... | ["tests/test_fields.py::TestParentAndName::test_unbound_field_root_returns_none", "tests/test_fields.py::TestTupleNested::test_tuple_nested_only_exclude_dump_only_load_only_propagated_to_nested[dump_only]", "tests/test_fields.py::TestTupleNested::test_tuple_nested_only_exclude_dump_only_load_only_propagated_to_nested[l... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 6 | 4 | 1,366 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247667 | 81.018 | |||
6,673 | swe_smith::train::17155 | swe_smith | train | 17,155 | prettytable__prettytable.ca90b055.func_pm_ctrl_invert_if__utwa8v9f | swesmith/prettytable__prettytable.ca90b055 | prettytable/prettytable | python | null | # Adding a column to an empty table raises ValueError incorrectly
## Description
When trying to add a column to an empty table (with no rows), PrettyTable incorrectly raises a ValueError. This happens because the condition for validating column length is inverted.
Here's a simple reproduction:
```python
from pretty... | diff --git a/src/prettytable/prettytable.py b/src/prettytable/prettytable.py
index 818a520..87db417 100644
--- a/src/prettytable/prettytable.py
+++ b/src/prettytable/prettytable.py
@@ -1624,6 +1624,12 @@ class PrettyTable:
"m" for middle and "b" for bottom"""
if len(self._rows) in (0, len(column... | ["tests/test_prettytable.py::TestDeleteColumn::test_delete_column", "tests/test_prettytable.py::TestDeleteColumn::test_delete_illegal_column_raises_error"] | ["tests/test_colortable.py::TestColorTable::test_themeless", "tests/test_colortable.py::TestColorTable::test_theme_setter", "tests/test_colortable.py::TestFormatCode::test_basic", "tests/test_colortable.py::TestFormatCode::test_prefix", "tests/test_colortable.py::TestFormatCode::test_escapes", "tests/test_colortable.py... | jyangballin/swesmith.x86_64.prettytable_1776_prettytable.ca90b055 | true | null | 1 | 13 | 2 | 1,226 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247667 | 81.018 | |||
6,674 | swe_smith::train::21844 | swe_smith | train | 21,844 | life4__textdistance.c3aca916.combine_module__szyblp5n | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | normalized_distance returns incorrect values and causes ZeroDivisionError
#### Description
The `normalized_distance` method is returning incorrect values and causing `ZeroDivisionError` exceptions in many cases. When comparing identical strings, it should return 0 but instead throws division by zero errors or returns... | diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py
index 5ce8cc7..d2b490c 100644
--- a/textdistance/algorithms/base.py
+++ b/textdistance/algorithms/base.py
@@ -45,9 +45,9 @@ class Base:
"""Get distance from 0 to 1
"""
maximum = self.maximum(*sequences)
- if... | ["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati... | ["tests/test_common.py::test_normalization_range[alg21]", "tests/test_common.py::test_normalization_by_one[alg21]", "tests/test_common.py::test_normalization_same[alg21]", "tests/test_common.py::test_normalization_monotonic[alg21]", "tests/test_common.py::test_no_common_chars[alg0]", "tests/test_common.py::test_no_comm... | jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916 | true | null | 2 | 21 | 120 | 1,066 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247667 | 81.018 | |||
6,675 | swe_smith::train::32164 | swe_smith | train | 32,164 | davidhalter__parso.338a5760.func_pm_ctrl_invert_if__nwwaytoz | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | Tree dump method raises TypeError for BaseNode instances
#### Description
The `dump()` method on parse tree nodes is raising a `TypeError` when encountering `BaseNode` instances during tree traversal. This breaks the ability to serialize and recreate parse trees.
#### Steps/Code to Reproduce
```python
from parso im... | diff --git a/parso/tree.py b/parso/tree.py
index e529871..04e6985 100644
--- a/parso/tree.py
+++ b/parso/tree.py
@@ -259,7 +259,13 @@ class NodeOrLeaf:
if node.prefix:
result += f', prefix={node.prefix!r}'
result += ')'
- elif isinstance(node, BaseNode):... | ["parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_dump_tree.py::test_eval_dump_recovers_parent"] | ["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "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_used_update[False-False]", "test/test_cache.p... | jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760 | true | null | 1 | 19 | 2 | 1,106 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247667 | 81.018 | |||
6,676 | swe_smith::train::31413 | swe_smith | train | 31,413 | benoitc__gunicorn.bacbf8aa.combine_module__3rgh4xbx | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | Gunicorn application initialization fails with AttributeError
#### Description
When creating a Gunicorn application instance, the initialization process fails with an `AttributeError: 'NoneType' object has no attribute 'settings'` error. This appears to be related to the configuration loading order during application... | diff --git a/gunicorn/app/base.py b/gunicorn/app/base.py
index 9bf7a4f..37efd62 100644
--- a/gunicorn/app/base.py
+++ b/gunicorn/app/base.py
@@ -31,16 +31,14 @@ class BaseApplication:
Loads the configuration
"""
try:
- self.load_default_config()
self.load_config()
- ... | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | ["tests/test_config.py::test_worker_class", "tests/test_config.py::test_defaults", "tests/test_config.py::test_property_access", "tests/test_config.py::test_bool_validation", "tests/test_config.py::test_pos_int_validation", "tests/test_config.py::test_str_validation", "tests/test_config.py::test_str_to_addr_list_valida... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 2 | 22 | 43 | 1,045 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2475 | 81.0175 | |||
6,677 | swe_smith::train::10615 | swe_smith | train | 10,615 | paramiko__paramiko.23f92003.func_basic__u417mg83 | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | SSH connection failures after key exchange implementation changes
#### Description
SSH connections are failing during the key exchange process. When attempting to establish SSH connections, the handshake fails with EOFError or connection termination issues.
#### Steps/Code to Reproduce
```python
import paramiko
# ... | diff --git a/paramiko/kex_curve25519.py b/paramiko/kex_curve25519.py
index 20c23e4..495bc98 100644
--- a/paramiko/kex_curve25519.py
+++ b/paramiko/kex_curve25519.py
@@ -70,33 +70,31 @@ class KexCurve25519:
peer_key_bytes = m.get_string()
peer_key = X25519PublicKey.from_public_bytes(peer_key_bytes)
... | ["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 | 16 | 121 | 1,165 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2475 | 81.0175 | |||
6,678 | swe_smith::train::47515 | swe_smith | train | 47,515 | sqlfluff__sqlfluff.50a1c4b6.combine_file__snuztacp | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | RawTemplater process method returns reversed string and wrong parameters
#### Description
The RawTemplater.process method is returning a reversed string instead of the original input string, and also returning an error list when it should return an empty list for successful processing.
#### Steps/Code to Reproduce
... | diff --git a/src/sqlfluff/core/templaters/base.py b/src/sqlfluff/core/templaters/base.py
index fd043b6..e382e4f 100644
--- a/src/sqlfluff/core/templaters/base.py
+++ b/src/sqlfluff/core/templaters/base.py
@@ -57,22 +57,22 @@ def large_file_check(func: Callable[..., T]) -> Callable[..., T]:
formatter: Optional[... | ["test/core/templaters/base_test.py::test__templater_raw", "test/core/templaters/base_test.py::test__templated_file_get_line_pos_of_char_pos[tf_kwargs0-0-1-1]", "test/core/templaters/base_test.py::test__templated_file_get_line_pos_of_char_pos[tf_kwargs1-20-3-1]", "test/core/templaters/base_test.py::test__templated_file... | ["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 28 | 4 | 924 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247333 | 81.017 | |||
6,679 | swe_smith::train::6907 | swe_smith | train | 6,907 | joke2k__faker.8b401a7d.lm_rewrite__yznt63as | swesmith/joke2k__faker.8b401a7d | joke2k/faker | python | null | ### Issue: Inconsistent Error Message for `pybool` Method
#### Description
The `pybool` method in the `Provider` class is not providing a consistent error message when an invalid `truth_probability` is passed. The error message format has changed, which might lead to confusion for users relying on specific error mess... | diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index 28b4356..69e068b 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -91,7 +91,7 @@ class Provider(BaseProvider):
else:
raise ValueError(f"Object type `{object_type}` ... | ["tests/providers/test_python.py::TestPython::test_pybool_truth_probability_less_than_zero", "tests/providers/test_python.py::TestPython::test_pybool_truth_probability_more_than_hundred"] | ["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 | 11 | 2 | 1,264 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247333 | 81.017 | |||
6,680 | swe_smith::train::36575 | swe_smith | train | 36,575 | lincolnloop__python-qrcode.456b01d4.func_basic__3btp4gyo | swesmith/lincolnloop__python-qrcode.456b01d4 | lincolnloop/python-qrcode | python | null | # SVG Path Image in QRCode library not working correctly
## Description
There appears to be an issue with the SVG path generation in the `SvgPathImage` class. When trying to generate a QR code using the SVG path image factory, the code fails with a TypeError.
## Steps to reproduce
Here's a simple script that reprod... | diff --git a/qrcode/image/svg.py b/qrcode/image/svg.py
index 4ad371b..a8dacbf 100644
--- a/qrcode/image/svg.py
+++ b/qrcode/image/svg.py
@@ -147,16 +147,14 @@ class SvgPathImage(SvgImage):
return super()._svg(viewBox=viewBox, **kwargs)
def process(self):
- # Store the path just in case someone wa... | ["qrcode/tests/test_qrcode_svg.py::test_render_svg_path", "qrcode/tests/test_qrcode_svg.py::test_svg_circle_drawer"] | ["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 | 8 | 2 | 1,324 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247333 | 81.017 | |||
6,681 | swe_smith::train::51700 | swe_smith | train | 51,700 | pydicom__pydicom.7d361b3d.func_basic__1qh3300u | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | DecodeRunner.pixel_dtype raises wrong exception type when NumPy unavailable
#### Description
When NumPy is not available, `DecodeRunner.pixel_dtype` raises `RuntimeError` instead of the expected `ImportError`.
#### Steps/Code to Reproduce
```python
from pydicom.pixels.decoders.base import DecodeRunner
from pydicom.... | diff --git a/src/pydicom/pixels/decoders/base.py b/src/pydicom/pixels/decoders/base.py
index 268f0d4..df77198 100644
--- a/src/pydicom/pixels/decoders/base.py
+++ b/src/pydicom/pixels/decoders/base.py
@@ -469,40 +469,32 @@ class DecodeRunner(RunnerBase):
pixel data.
"""
if not HAVE_NP:
- ... | ["tests/pixels/test_decoder_base.py::TestDecodeRunner::test_pixel_dtype_no_numpy_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 | 28 | 1 | 924 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247333 | 81.017 | |||
6,682 | swe_smith::train::24608 | swe_smith | train | 24,608 | marshmallow-code__marshmallow.9716fc62.combine_module__u1f3hzvd | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | post_dump decorator arguments swapped causing TypeError
#### Description
The `post_dump` decorator has its arguments swapped internally, causing `TypeError` when using `pass_many` and `pass_original` parameters. Methods decorated with `@post_dump(pass_many=True, pass_original=True)` receive incorrect argument mapping... | diff --git a/src/marshmallow/decorators.py b/src/marshmallow/decorators.py
index 965edb6..3f441a2 100644
--- a/src/marshmallow/decorators.py
+++ b/src/marshmallow/decorators.py
@@ -159,7 +159,7 @@ def post_dump(
.. versionchanged:: 3.0.0
``many`` is always passed as a keyword arguments to the decorated me... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::TestPassOriginal::test_pass_original_single", "tests/test_decorators.py::test_decorator_post_dump_with_nested_original_and_pass_many[data0-expected_data0-expected_origin... | ["tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorated_processor_returning_none[raise]", "tests/test_decorators.py::TestPassOriginal::test_pass_original_many", "tests/test_deco... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 2 | 6 | 6 | 1,364 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247333 | 81.017 | |||
6,683 | swe_smith::train::6543 | swe_smith | train | 6,543 | mahmoud__boltons.3bfcfdd0.lm_rewrite__w75dujbu | swesmith/mahmoud__boltons.3bfcfdd0 | mahmoud/boltons | python | null | URL percent-encoding breaks when query parameters contain equals sign
Description
I'm getting an error when trying to use URLs with equals signs in query parameter values. The error is: `KeyError: '='`
When I try to parse a URL like `http://localhost/?=x=x=x` or `http://localhost/?foo=x=x=x&bar=y`, the code fails to... | diff --git a/boltons/urlutils.py b/boltons/urlutils.py
index 45d3e73..eede26e 100644
--- a/boltons/urlutils.py
+++ b/boltons/urlutils.py
@@ -210,18 +210,25 @@ def find_all_links(text, with_text=False, default_scheme='https', schemes=()):
def _make_quote_map(safe_chars):
+ """Create a mapping table for URL perce... | ["tests/test_urlutils.py::test_parse_equals_in_qp_value"] | ["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac... | jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0 | true | null | 1 | 21 | 1 | 1,064 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247333 | 81.017 | |||
6,684 | r2e_gym::train::6151 | r2e_gym | train | 6,151 | pillow__8b2d70d17a4791d68df6c10d8337d769290c6528 | pillow | python-pillow/pillow | python | 8b2d70d17a4791d68df6c10d8337d769290c6528 | **Analysis:**
- **Key Parts:**
- **Commit Message:** "Corrected BMP palette size when saving."
- **Test Results:** The `test_small_palette` was failing with `ValueError: buffer is not large enough` in the old commit and passes in the new commit.
- **Main Problem:** Saving a BMP image in "P" mode with a small pale... | diff --git a/src/PIL/BmpImagePlugin.py b/src/PIL/BmpImagePlugin.py
--- a/src/PIL/BmpImagePlugin.py
+++ b/src/PIL/BmpImagePlugin.py
@@ -375,6 +375,16 @@
header = 40 # or 64 for OS/2 version 2
image = stride * im.size[1]
+ if im.mode == "1":
+ palette = b"".join(o8(i) * 4 for i in (0, 255))
+ el... | diff --git a/Tests/test_file_bmp.py b/Tests/test_file_bmp.py
--- a/Tests/test_file_bmp.py
+++ b/Tests/test_file_bmp.py
@@ -49,6 +49,18 @@
assert im.mode == reloaded.mode
assert im.size == reloaded.size
assert reloaded.format == "BMP"
+
+
+def test_small_palette(tmp_path):
+ im = Image.new(... | null | null | namanjain12/pillow_final:8b2d70d17a4791d68df6c10d8337d769290c6528 | true | null | 1 | 20 | null | 1,796 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.366 | 81.01675 | ||
6,685 | swe_smith::train::32174 | swe_smith | train | 32,174 | davidhalter__parso.338a5760.func_pm_ctrl_invert_if__x350ioht | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | Position calculation broken for nodes with newlines in content
#### Description
When parsing code with newlines, the position calculation logic is inverted, causing incorrect start positions to be calculated for nodes. This affects the diff parser's ability to correctly track node positions.
#### Steps/Code to Repro... | diff --git a/parso/python/diff.py b/parso/python/diff.py
index ba999fa..dd03f07 100644
--- a/parso/python/diff.py
+++ b/parso/python/diff.py
@@ -91,25 +91,25 @@ def _assert_valid_graph(node):
# Calculate the content between two start positions.
previous_leaf = _get_previous_leaf_if_indentation(node.ge... | ["test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_parser.py::test_one_statement_func", "test/test_diff_parser.py::test_for_on_one_line", "test/test_diff_pa... | ["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 | 15 | 80 | 1,183 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247167 | 81.0165 | |||
6,686 | swe_smith::train::31953 | swe_smith | train | 31,953 | davidhalter__parso.338a5760.func_basic__fib4anem | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | Diff parser crashes with IndexError when processing indented code blocks
#### Description
The diff parser is throwing `IndexError: list index out of range` when processing various Python code structures with indentation changes. This appears to be happening in the `_update_insertion_node` method when working with the... | diff --git a/parso/python/diff.py b/parso/python/diff.py
index ba999fa..4b2a085 100644
--- a/parso/python/diff.py
+++ b/parso/python/diff.py
@@ -603,10 +603,10 @@ class _NodesTree:
return self._working_stack[-1].get_last_line(self.prefix)
def _update_insertion_node(self, indentation):
- for node ... | ["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p... | ["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_... | jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760 | true | null | 1 | 6 | 80 | 1,363 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247167 | 81.0165 | |||
6,687 | swe_smith::train::3861 | swe_smith | train | 3,861 | pygments__pygments.27649ebb.func_basic__cmo8h33f | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | YAML lexer produces incorrect token positions for block scalars
#### Description
The YAML lexer is generating incorrect token positions when parsing block scalar indicators, causing a ValueError during tokenization.
#### Steps/Code to Reproduce
```python
from pygments import highlight
from pygments.lexers import Ya... | diff --git a/pygments/lexers/data.py b/pygments/lexers/data.py
index 8f384bc..5c67404 100644
--- a/pygments/lexers/data.py
+++ b/pygments/lexers/data.py
@@ -102,16 +102,14 @@ class YamlLexer(ExtendedRegexLexer):
def callback(lexer, match, context):
text = match.group()
context.block_s... | ["tests/examplefiles/yaml/example.yaml::"] | ["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 | 16 | 1 | 1,163 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247167 | 81.0165 | |||
6,688 | swe_smith::train::851 | swe_smith | train | 851 | oauthlib__oauthlib.1fd52536.lm_rewrite__367hem7k | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | # NameError in prepare_token_request method
I'm trying to use the OAuth2 client to prepare a token request, but I'm getting a NameError. It seems like the `prepare_token_request` method is trying to call a function that doesn't exist.
## Steps to reproduce
Here's a simple example that reproduces the issue:
```pytho... | diff --git a/oauthlib/oauth2/rfc6749/clients/base.py b/oauthlib/oauth2/rfc6749/clients/base.py
index a8de78b..0decaa6 100644
--- a/oauthlib/oauth2/rfc6749/clients/base.py
+++ b/oauthlib/oauth2/rfc6749/clients/base.py
@@ -257,7 +257,7 @@ class Client:
return auth_url, FORM_ENC_HEADERS, ''
def prepare_tok... | ["tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_prepare_token_request"] | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 15 | 1 | 1,183 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247167 | 81.0165 | |||
6,689 | swe_bench::test::1075 | swe_bench | test | 1,075 | matplotlib__matplotlib-25404 | matplotlib/matplotlib | matplotlib/matplotlib | python | b51a227058e16cdbc56890f49e3a0888ea02b9d2 | [Bug]: AttributeError: 'LassoSelector' object has no attribute '_props'
### Summary
I used the LassoSelector object to select the single point in the scatterplot. But when I try to update the line color of LassoSelector with the set_props function, I get an error like this **AttributeError: 'LassoSelector' object has ... | The properties for `LassoSelector` is applied to the line stored as `self._selection_artist`. As such `self._props` is not defined in the constructor.
I *think* the correct solution is to redefine `set_props` for `LassoSelector` (and in that method set the props of the line), but there may be someone knowing better.... | diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py
--- a/lib/matplotlib/widgets.py
+++ b/lib/matplotlib/widgets.py
@@ -2457,15 +2457,16 @@ def artists(self):
def set_props(self, **props):
"""
- Set the properties of the selector artist. See the `props` argument
- in the sel... | diff --git a/lib/matplotlib/tests/test_widgets.py b/lib/matplotlib/tests/test_widgets.py
--- a/lib/matplotlib/tests/test_widgets.py
+++ b/lib/matplotlib/tests/test_widgets.py
@@ -987,6 +987,19 @@ def test_lasso_selector(ax, kwargs):
onselect.assert_called_once_with([(100, 100), (125, 125), (150, 150)])
+def te... | ["lib/matplotlib/tests/test_widgets.py::test_lasso_selector_set_props"] | ["lib/matplotlib/tests/test_widgets.py::test_save_blitted_widget_as_pdf", "lib/matplotlib/tests/test_widgets.py::test_rectangle_selector[kwargs0]", "lib/matplotlib/tests/test_widgets.py::test_rectangle_selector[kwargs1]", "lib/matplotlib/tests/test_widgets.py::test_rectangle_selector[kwargs2]", "lib/matplotlib/tests/te... | null | true | 2023-03-07T09:33:22Z | 1 | 36 | 1 | 563 | 0 | 0.8 | 1 | 0.55 | 1 | 0.213833 | 81.0165 | |
6,690 | r2e_gym::train::5624 | r2e_gym | train | 5,624 | scrapy__4d1c5c3d32591c37e37f879f0e77e50db7124603 | scrapy | scrapy/scrapy | python | 4d1c5c3d32591c37e37f879f0e77e50db7124603 | **Title:** RedirectMiddleware Raises TypeError When 'Location' Header Is Bytes
**Description:**
When the `RedirectMiddleware` processes a response with a `Location` header encoded in `latin1`, it raises a `TypeError`. This occurs because the middleware attempts to join the base URL (a string) with the `Location` heade... | diff --git a/scrapy/downloadermiddlewares/redirect.py b/scrapy/downloadermiddlewares/redirect.py
--- a/scrapy/downloadermiddlewares/redirect.py
+++ b/scrapy/downloadermiddlewares/redirect.py
@@ -3,6 +3,7 @@
from scrapy.http import HtmlResponse
from scrapy.utils.response import get_meta_refresh
+from scrapy.utils.py... | diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt
--- a/tests/py3-ignores.txt
+++ b/tests/py3-ignores.txt
@@ -10,7 +10,6 @@
tests/test_downloadermiddleware_httpcompression.py
tests/test_downloadermiddleware_httpproxy.py
tests/test_downloadermiddleware.py
-tests/test_downloadermiddleware_redirect.py
tests/t... | null | null | namanjain12/scrapy_final:4d1c5c3d32591c37e37f879f0e77e50db7124603 | true | null | 1 | 31 | null | 1,575 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.365833 | 81.01625 | ||
6,691 | swe_smith::train::48102 | swe_smith | train | 48,102 | sqlfluff__sqlfluff.50a1c4b6.func_pm_class_rm_funcs__8eu0fnd5 | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | Parser cache methods missing causing AttributeError during parsing
#### Description
After recent changes, the parser is failing with AttributeError when trying to access cache-related methods that appear to have been removed. The parser context is missing critical methods needed for caching functionality.
#### Steps... | diff --git a/src/sqlfluff/core/parser/context.py b/src/sqlfluff/core/parser/context.py
index 7edf331..77c6b5f 100644
--- a/src/sqlfluff/core/parser/context.py
+++ b/src/sqlfluff/core/parser/context.py
@@ -287,35 +287,12 @@ class ParseContext:
finally:
self._tqdm.close()
- def update_progress(... | ["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__grammar_oneof_templated", "test/core/parser/grammar/grammar_anyof_test.py::test__pars... | ["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar__oneof__copy", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_anyof_modes[ParseMode.STRICT-options1-terminators1-input_slice1-kwargs1-output_tuple1]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_an... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 25 | 55 | 982 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247 | 81.016 | |||
6,692 | swe_smith::train::22478 | swe_smith | train | 22,478 | tweepy__tweepy.91a41c6e.func_pm_ctrl_shuffle__dgqv6az9 | swesmith/tweepy__tweepy.91a41c6e | tweepy/tweepy | python | null | ### Bug: UnboundLocalError in `chunked_upload_init` with MP4 media upload
#### Description
When attempting to upload an MP4 file using the `media_upload` method, an `UnboundLocalError` is raised. This error occurs when the `chunked_upload_init` function is called with an MP4 file, causing the upload process to fail.
... | diff --git a/tweepy/api.py b/tweepy/api.py
index 37caf07..269caf2 100644
--- a/tweepy/api.py
+++ b/tweepy/api.py
@@ -3685,6 +3685,8 @@ class API:
def chunked_upload_init(self, total_bytes, media_type, *,
media_category=None, additional_owners=None,
**kwargs... | ["tests/test_api.py::TweepyAPITests::testmediauploadmp4"] | ["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre... | jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e | true | null | 1 | 21 | 1 | 1,062 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247 | 81.016 | |||
6,693 | swe_smith::train::1928 | swe_smith | train | 1,928 | agronholm__typeguard.b6a7e438.func_pm_remove_loop__lbygnzt2 | swesmith/agronholm__typeguard.b6a7e438 | agronholm/typeguard | python | null | Type checking instrumentation not working after recent changes
#### Description
Functions decorated with `@typechecked` are no longer being instrumented with type checking code. The decorator appears to be ignored and no type checking is performed at runtime.
#### Steps/Code to Reproduce
```python
from typeguard im... | diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py
index 25696a5..5603f1b 100644
--- a/src/typeguard/_transformer.py
+++ b/src/typeguard/_transformer.py
@@ -678,20 +678,6 @@ class TypeguardTransformer(NodeTransformer):
else:
first_lineno = node.lineno
- ... | ["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 | 20 | 61 | 1,082 | 0 | 0.6 | 1 | 0.75 | 1 | 0.247 | 81.016 | |||
6,694 | swe_smith::train::4949 | swe_smith | train | 4,949 | bottlepy__bottle.a8dfef30.func_pm_ctrl_shuffle__iqb4i7fd | swesmith/bottlepy__bottle.a8dfef30 | bottlepy/bottle | python | null | @view decorator broken - UnboundLocalError on result variable
#### Description
The `@view` decorator is throwing an `UnboundLocalError` when trying to access the `result` variable. This affects all template rendering functionality when using the view decorator.
#### Steps/Code to Reproduce
```python
import bottle
... | diff --git a/bottle.py b/bottle.py
index 286b5bc..7962b39 100755
--- a/bottle.py
+++ b/bottle.py
@@ -4490,33 +4490,32 @@ jinja2_template = functools.partial(template, template_adapter=Jinja2Template)
def view(tpl_name, **defaults):
- """ Decorator: renders a template for a handler.
- The handler can cont... | ["test/test_jinja2.py::TestJinja2Template::test_view_decorator", "test/test_stpl.py::TestSimpleTemplate::test_view_decorator", "test/test_stpl.py::TestSimpleTemplate::test_view_decorator_issue_407", "test/test_wsgi.py::TestRouteDecorator::test_template", "test/test_wsgi.py::TestRouteDecorator::test_template_opts", "tes... | ["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"... | jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30 | true | null | 1 | 21 | 7 | 1,060 | 0 | 0.6 | 1 | 0.75 | 1 | 0.246667 | 81.015 | |||
6,695 | swe_smith::train::34069 | swe_smith | train | 34,069 | allegro__bigcache.5aa251c4.lm_rewrite__rd3pctkf | swesmith/allegro__bigcache.5aa251c4 | allegro/bigcache | go | null | BytesQueue push method causes slice bounds out of range panic
When pushing data to BytesQueue, the method can cause a panic with "slice bounds out of range" error. This appears to happen during concurrent operations or when the queue is in certain states.
#### Steps to Reproduce
The issue can be reproduced by runnin... | diff --git a/queue/bytes_queue.go b/queue/bytes_queue.go
index c4fe2c0..b250d28 100644
--- a/queue/bytes_queue.go
+++ b/queue/bytes_queue.go
@@ -140,19 +140,16 @@ func (q *BytesQueue) allocateAdditionalMemory(minimum int) {
}
func (q *BytesQueue) push(data []byte, len int) {
- headerEntrySize := binary.PutUvarint(q... | ["TestParallelSetAndIteration", "TestPopWholeQueue", "TestAllocateAdditionalSpaceForValueBiggerThanQueue", "TestResetFullQueue", "TestPushEntryAfterAllocateAdditionMemory"] | ["TestOnRemoveFilterExpired", "TestClosing", "TestCache_SetWithoutCleanWindow", "TestCache_RepeatedSetWithBiggerEntry", "TestRemoveNonExpiredData", "TestEncodeDecode", "TestAllocateBiggerBuffer", "TestFnvHashSum64", "TestEntriesIteratorParallelAdd", "TestOnRemoveWithReasonCallback", "TestOnRemoveGetEntryStats", "TestNi... | jyangballin/swesmith.x86_64.allegro_1776_bigcache.5aa251c4 | true | null | 1 | 15 | 5 | 1,180 | 0 | 0.6 | 1 | 0.75 | 1 | 0.246667 | 81.015 | |||
6,696 | swe_smith::train::51475 | swe_smith | train | 51,475 | pydicom__pydicom.7d361b3d.combine_file__90uej0eq | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | Data download functionality broken after recent changes
#### Description
The data download and caching system appears to be completely broken. When trying to access any DICOM test files, the system fails to properly create directories and validate file integrity.
#### Steps/Code to Reproduce
```python
import pydico... | diff --git a/src/pydicom/data/download.py b/src/pydicom/data/download.py
index 30d6c84..b3286d8 100644
--- a/src/pydicom/data/download.py
+++ b/src/pydicom/data/download.py
@@ -75,14 +75,14 @@ def get_config_dir() -> pathlib.Path:
The config directory will be named ``.pydicom`` and will be created in the
loca... | ["tests/pixels/test_common.py::TestRunnerBase::test_set_options_ds", "tests/pixels/test_decoder_base.py::TestDecoder::test_buffer", "tests/pixels/test_encoder_pydicom.py::TestEncodeSegment::test_cycle", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jls_ilv0", "tests/pixels/test_utils.py::TestGetJpgParameters:... | ["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 | 19 | 60 | 1,100 | 0 | 0.6 | 1 | 0.75 | 1 | 0.246667 | 81.015 | |||
6,697 | swe_smith::train::26436 | swe_smith | train | 26,436 | pylint-dev__astroid.b114f6b5.func_pm_remove_cond__mgdoaog8 | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | # AstroidManager.ast_from_module_name doesn't check for None modname
## Description
I found a bug in the `AstroidManager.ast_from_module_name` method. It seems that the check for `None` modname has been removed, which causes unexpected behavior.
## How to reproduce
Create a simple script that tries to use the Astro... | diff --git a/astroid/manager.py b/astroid/manager.py
index 8742058..b85cab0 100644
--- a/astroid/manager.py
+++ b/astroid/manager.py
@@ -210,8 +210,6 @@ class AstroidManager:
use_cache: bool = True,
) -> nodes.Module:
"""Given a module name, return the astroid object."""
- if modname is No... | ["tests/test_manager.py::AstroidManagerTest::test_raises_exception_for_empty_modname"] | ["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 | 11 | 1 | 1,260 | 0 | 0.6 | 1 | 0.75 | 1 | 0.246667 | 81.015 | |||
6,698 | swe_smith::train::51461 | swe_smith | train | 51,461 | pydicom__pydicom.7d361b3d.combine_file__3eax3nxg | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | CLI show command broken after recent changes
#### Description
The `pydicom show` command is completely broken and throws a TypeError when trying to use it. The command fails with `'NoneType' object is not callable` error.
#### Steps/Code to Reproduce
```bash
pydicom show some_dicom_file.dcm
```
Or with any options... | diff --git a/src/pydicom/cli/show.py b/src/pydicom/cli/show.py
index 7ed71b3..37a04c3 100644
--- a/src/pydicom/cli/show.py
+++ b/src/pydicom/cli/show.py
@@ -16,40 +16,39 @@ def add_subparser(subparsers: argparse._SubParsersAction) -> None:
subparser.add_argument(
"-x",
"--exclude-private",
- ... | ["tests/test_cli.py::TestCLIcall::test_show_command", "tests/test_cli.py::TestCLIcall::test_show_options"] | ["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 | 33 | 2 | 820 | 0 | 0.6 | 1 | 0.75 | 1 | 0.246667 | 81.015 | |||
6,699 | swe_smith::train::8859 | swe_smith | train | 8,859 | pyupio__safety.7654596b.func_pm_ctrl_shuffle__vczh9e5v | swesmith/pyupio__safety.7654596b | pyupio/safety | python | null | License command fails with NameError when using --file option
#### Description
The `safety license` command crashes with a `NameError` when using the `--file` option to scan a requirements file.
#### Steps/Code to Reproduce
```python
# Create a simple requirements file
echo "django==3.0" > requirements.txt
# Run s... | diff --git a/safety/cli.py b/safety/cli.py
index 36099f3..42baf50 100644
--- a/safety/cli.py
+++ b/safety/cli.py
@@ -480,15 +480,18 @@ def clean_license_command(f):
@click.pass_context
@clean_license_command
def license(ctx, db, output, cache, files):
- """
- Find the open source licenses used by your Python d... | ["tests/test_cli.py::TestSafetyCLI::test_license_with_file"] | ["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t... | jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b | true | null | 1 | 31 | 1 | 859 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2465 | 81.0145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.