instance_id
stringlengths
35
71
patch
stringlengths
300
17k
FAIL_TO_PASS
listlengths
1
5.06k
PASS_TO_PASS
listlengths
0
17.8k
image_name
stringlengths
51
70
repo
stringlengths
28
47
problem_statement
stringlengths
702
1.85k
paramiko__paramiko.23f92003.func_basic__8snnsxzv
diff --git a/paramiko/pipe.py b/paramiko/pipe.py index 65944fa..087ee02 100644 --- a/paramiko/pipe.py +++ b/paramiko/pipe.py @@ -41,9 +41,9 @@ def make_pipe(): class PosixPipe: def __init__(self): self._rfd, self._wfd = os.pipe() - self._set = False - self._forever = False - self._cl...
[ "tests/test_buffered_pipe.py::BufferedPipeTest::test_or_pipe", "tests/test_transport.py::TransportTest::test_select", "tests/test_transport.py::TransportTest::test_select_after_close", "tests/test_transport.py::TransportTest::test_stderr_select", "tests/test_transport.py::ServiceRequestingTransportTest::tes...
[ "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...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
swesmith/paramiko__paramiko.23f92003
PosixPipe initialization broken - pipe operations fail immediately #### Description The PosixPipe class is initializing its internal state flags incorrectly, causing pipe operations to fail immediately after creation. When creating a new pipe, the `_set`, `_forever`, and `_closed` flags are being set to `True` instea...
pdfminer__pdfminer.six.1a8bd2f7.func_basic__nr23x620
diff --git a/pdfminer/arcfour.py b/pdfminer/arcfour.py index cc78e36..22f183c 100644 --- a/pdfminer/arcfour.py +++ b/pdfminer/arcfour.py @@ -24,10 +24,10 @@ class Arcfour: s = self.s r = b"" for c in iter(data): - i = (i + 1) % 256 - j = (j + s[i]) % 256 + i =...
[ "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_625_identity_cmap", "tests/test_pdfdocument.py::TestPdfDocument::test_encrypted_no_id", "tests/test_pdfminer_crypto.py::TestArcfour::test", "tests/test_tools_dumppdf.py::TestDumpPDF::test...
[ "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::TestPaintP...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
swesmith/pdfminer__pdfminer.six.1a8bd2f7
Arcfour encryption produces incorrect output #### Description The Arcfour cipher implementation is producing incorrect encrypted/decrypted output. When testing with known test vectors, the results don't match expected values. #### Steps/Code to Reproduce ```python from pdfminer.arcfour import Arcfour # Test with k...
marshmallow-code__marshmallow.9716fc62.func_pm_ctrl_invert_if__g3c3btlp
diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py index e21768e..6a5bd21 100644 --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -1205,18 +1205,17 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta): if many and not pass_many: if pass_original: - ...
[ "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::te...
[ "tests/test_decorators.py::TestValidatesDecorator::test_validates", "tests/test_decorators.py::TestValidatesDecorator::test_validates_with_attribute", "tests/test_decorators.py::TestValidatesDecorator::test_validates_decorator", "tests/test_decorators.py::TestValidatesDecorator::test_field_not_present", "te...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
swesmith/marshmallow-code__marshmallow.9716fc62
Schema processors with `pass_original=True` and `many=True` receive incorrect arguments #### Description When using schema processors (like `@post_load`) with both `pass_original=True` and `many=True`, the processor methods are being called with incorrect argument patterns. This causes `TypeError` exceptions about mi...
jawah__charset_normalizer.1fdd6463.func_basic__t7ubds8b
diff --git a/charset_normalizer/models.py b/charset_normalizer/models.py index 09492a9..809a001 100644 --- a/charset_normalizer/models.py +++ b/charset_normalizer/models.py @@ -203,7 +203,7 @@ class CharsetMatch: encoding. This list does include the encoding available in property 'encoding'. ...
[ "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xfe\\xff-utf_16]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\x841\\x953-gb18030]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xff\\xfe\\x00\\x00-utf_32]", "tests/test_base_detection.py::test_content_with...
[ "tests/test_base_detection.py::test_empty", "tests/test_base_detection.py::test_bool_matches", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xef\\xbb\\xbf-utf_8]", "tests/test_base_detection.py::test_content_with_bom_or_sig[\\xef\\xbb\\xbf\\xe6\\x88\\x91\\xe6\\xb2\\xa1\\xe6\\x9c\\x89\\xe5\\x...
jyangballin/swesmith.x86_64.jawah_1776_charset_normalizer.1fdd6463
swesmith/jawah__charset_normalizer.1fdd6463
CharsetMatch.encoding_aliases property excludes main encoding #### Description The `encoding_aliases` property on `CharsetMatch` objects is not including the main encoding from the `encoding` property in its returned list. This breaks compatibility with code that expects all possible encodings to be listed in the ali...
tobymao__sqlglot.036601ba.combine_module__ewa121a6
diff --git a/sqlglot/executor/context.py b/sqlglot/executor/context.py index a411c18..a3071f8 100644 --- a/sqlglot/executor/context.py +++ b/sqlglot/executor/context.py @@ -59,12 +59,10 @@ class Context: return self.table.columns def __iter__(self): - self.env["scope"] = self.row_readers - ...
[ "tests/test_executor.py::TestExecutor::test_correlated_count", "tests/test_executor.py::TestExecutor::test_execute_callable", "tests/test_executor.py::TestExecutor::test_execute_subqueries", "tests/test_executor.py::TestExecutor::test_execute_tables", "tests/test_executor.py::TestExecutor::test_execute_tpcd...
[ "tests/test_executor.py::TestExecutor::test_agg_order", "tests/test_executor.py::TestExecutor::test_aggregate_without_group_by", "tests/test_executor.py::TestExecutor::test_case_sensitivity", "tests/test_executor.py::TestExecutor::test_execute_catalog_db_table", "tests/test_executor.py::TestExecutor::test_n...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
swesmith/tobymao__sqlglot.036601ba
Context iterator returns wrong tuple format #### Description The Context `__iter__` method is returning `(row_readers, range_readers)` instead of the expected `(reader, context)` format, causing SQL execution to fail. #### Steps/Code to Reproduce ```python from sqlglot import execute # Simple query that should wor...
python-openxml__python-docx.0cf6d71f.func_basic__8rybi7tp
diff --git a/src/docx/styles/style.py b/src/docx/styles/style.py index aa175ea..e1e5999 100644 --- a/src/docx/styles/style.py +++ b/src/docx/styles/style.py @@ -89,9 +89,9 @@ class BaseStyle(ElementProxy): def name(self): """The UI name of this style.""" name = self._element.name_val - if ...
[ "tests/styles/test_style.py::DescribeBaseStyle::it_knows_its_name[name_get_fixture0]", "tests/styles/test_style.py::DescribeBaseStyle::it_knows_its_name[name_get_fixture1]" ]
[ "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:...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
swesmith/python-openxml__python-docx.0cf6d71f
Style name property returns incorrect value for empty string names #### Description When a style has an empty string name, the `name` property incorrectly returns `None` instead of handling the empty string case properly. #### Steps/Code to Reproduce ```python from docx import Document from docx.styles.style import...
marshmallow-code__webargs.dbde72fe.lm_rewrite__3wxzav1f
diff --git a/src/webargs/testing.py b/src/webargs/testing.py index 0d7bf0f..f112c83 100644 --- a/src/webargs/testing.py +++ b/src/webargs/testing.py @@ -178,13 +178,12 @@ class CommonTestCase: assert res.json == {"value": 42} def test_use_args_with_validation(self, testapp): - result = testapp.po...
[ "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_use_args_with_validation", "tests/test_bottleparser.py::TestBottleParser::test_use_args_with_validation", "tests/test_falconparser.py::TestFalconParser::test_use_args_with_validation", "tests/test_flaskparser.py::TestFlaskParser::test_use_args_with_validat...
[ "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpp...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
swesmith/marshmallow-code__webargs.dbde72fe
### [bug] Validation Error Handling in `use_args` Decorator #### Description It seems there's an issue with the `use_args` decorator when handling validation errors. The expected behavior is to return a 422 status code when validation fails, but it appears that the current implementation is not consistently doing so....
sqlfluff__sqlfluff.50a1c4b6.combine_module__m0019a9z
diff --git a/src/sqlfluff/utils/reflow/config.py b/src/sqlfluff/utils/reflow/config.py index 71a31c7..42dbfd6 100644 --- a/src/sqlfluff/utils/reflow/config.py +++ b/src/sqlfluff/utils/reflow/config.py @@ -118,8 +118,8 @@ class ReflowConfig: >>> cfg.get_block_config({"comma"}) # doctest: +ELLIPSIS Blo...
[ "test/utils/reflow/reindent_test.py::test_reflow__crawl_indent_points[select\\n1-raw-points_out2]", "test/utils/reflow/respace_test.py::test_reflow__point_respace_point[select\\n1-1-kwargs4-\\n-fixes_out4]", "test/utils/reflow/sequence_test.py::test_reflow_sequence_from_around_target_non_raw" ]
[ "test/utils/reflow/depthmap_test.py::test_reflow_depthmap_from_parent", "test/utils/reflow/depthmap_test.py::test_reflow_depthmap_from_raws_and_root", "test/utils/reflow/depthmap_test.py::test_reflow_depthmap_order_by", "test/utils/reflow/reindent_test.py::test_reflow__desired_indent_units[indent_line0-forced...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
swesmith/sqlfluff__sqlfluff.50a1c4b6
Reflow configuration logic inverted causing incorrect spacing behavior #### Description The reflow configuration system is applying spacing rules incorrectly due to inverted logic in several key areas. When processing block configurations, the system is using set difference instead of intersection to determine which ...
cantools__cantools.0c6a7871.func_pm_op_change_const__21ku0kht
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..c05b5c4 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -1094,7 +1094,7 @@ class SystemL...
[ "tests/test_database.py::CanToolsDatabaseTest::test_no_compu_method_category_arxml", "tests/test_database.py::CanToolsDatabaseTest::test_system_3_arxml", "tests/test_database.py::CanToolsDatabaseTest::test_system_4_arxml", "tests/test_database.py::CanToolsDatabaseTest::test_system_arxml_float_values", "test...
[ "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:...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
swesmith/cantools__cantools.0c6a7871
ARXML cycle time calculation incorrect for time periods When loading ARXML files, the cycle time calculation for messages with time periods is off by 1 millisecond. The system is multiplying the time period by 999 instead of 1000 when converting to milliseconds. #### Steps/Code to Reproduce ```python import cantools...
spulec__freezegun.5f171db0.combine_file__f3rcc5ea
diff --git a/freezegun/api.py b/freezegun/api.py index d235292..7f8bade 100644 --- a/freezegun/api.py +++ b/freezegun/api.py @@ -534,11 +534,11 @@ class FrozenDateTimeFactory: def tick(self, delta: Union[datetime.timedelta, float]=datetime.timedelta(seconds=1)) -> datetime.datetime: if isinstance(delta,...
[ "tests/test_asyncio.py::test_datetime_in_coroutine", "tests/test_asyncio.py::test_freezing_time_in_coroutine", "tests/test_asyncio.py::test_freezing_time_before_running_coroutine", "tests/test_asyncio.py::test_asyncio_sleeping_not_affected_by_freeze_time", "tests/test_asyncio.py::test_asyncio_to_call_later_...
[ "tests/test_configure.py::test_default_ignore_list_is_overridden[ignorelist0]", "tests/test_configure.py::test_default_ignore_list_is_overridden[ignorelist1]", "tests/test_configure.py::test_extend_default_ignore_list[ignorelist0]", "tests/test_configure.py::test_extend_default_ignore_list[ignorelist1]", "t...
jyangballin/swesmith.x86_64.spulec_1776_freezegun.5f171db0
swesmith/spulec__freezegun.5f171db0
Tick method behavior changed for integer and float values When using the `tick()` method with integer or float values, the behavior has changed unexpectedly. Previously, integer values would increment time by seconds, but now they seem to increment by minutes instead. Float values also behave differently than expected...
Project-MONAI__MONAI.a09c1f08.func_pm_ctrl_shuffle__l7tb4td2
diff --git a/monai/networks/layers/simplelayers.py b/monai/networks/layers/simplelayers.py index 6d34c3f..ae08e83 100644 --- a/monai/networks/layers/simplelayers.py +++ b/monai/networks/layers/simplelayers.py @@ -445,6 +445,27 @@ def median_filter( kernel: torch.Tensor | None = None, **kwargs, ) -> torch.Ten...
[ "tests/networks/layers/test_median_filter.py::MedianFilterTestCase::test_3d_0", "tests/networks/layers/test_median_filter.py::MedianFilterTestCase::test_3d_1", "tests/networks/layers/test_median_filter.py::MedianFilterTestCase::test_3d_radii" ]
[ "tests/networks/layers/test_affine_transform.py::TestNormTransform::test_norm_xform_0", "tests/networks/layers/test_affine_transform.py::TestNormTransform::test_norm_xform_1", "tests/networks/layers/test_affine_transform.py::TestNormTransform::test_norm_xform_2", "tests/networks/layers/test_affine_transform.p...
jyangballin/swesmith.x86_64.project-monai_1776_monai.a09c1f08
swesmith/Project-MONAI__MONAI.a09c1f08
# `median_filter` function in MONAI is broken due to code reordering ### Description The `median_filter` function in MONAI's `simplelayers.py` appears to be broken. The function's code has been reordered in a way that makes it execute in an incorrect sequence, causing it to fail when applied to tensors. ### Expected...
cknd__stackprinter.219fcc52.func_basic__em6pyfo8
diff --git a/stackprinter/__init__.py b/stackprinter/__init__.py index 94ae70c..5970e4e 100644 --- a/stackprinter/__init__.py +++ b/stackprinter/__init__.py @@ -17,9 +17,8 @@ def _guess_thing(f): @wraps(f) def show_or_format(thing=None, *args, **kwargs): if thing is None: - thing = sys.exc...
[ "tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting" ]
[ "tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match" ]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
swesmith/cknd__stackprinter.219fcc52
**Issue Text** Incorrect frame reference when calling stackprinter.format() with no arguments **Describe the bug** When calling `stackprinter.format()` without any arguments, it's not correctly capturing the current frame. This causes incorrect output when trying to format the current stack frame. **To Reproduce** ...
pdfminer__pdfminer.six.1a8bd2f7.func_pm_remove_loop__44ypavfm
diff --git a/pdfminer/pdfpage.py b/pdfminer/pdfpage.py index a6e6cfc..a35df2e 100644 --- a/pdfminer/pdfpage.py +++ b/pdfminer/pdfpage.py @@ -142,9 +142,6 @@ class PDFPage: pages = False if "Pages" in document.catalog: objects = depth_first_search(document.catalog["Pages"], document.catalo...
[ "tests/test_highlevel_extracttext.py::TestExtractText::test_simple4_with_file", "tests/test_highlevel_extracttext.py::TestExtractText::test_simple4_with_string", "tests/test_highlevel_extracttext.py::TestExtractPages::test_line_margin", "tests/test_highlevel_extracttext.py::TestExtractPages::test_no_boxes_flo...
[ "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::TestPaintP...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
swesmith/pdfminer__pdfminer.six.1a8bd2f7
PDFPage.create_pages() returns no pages when Pages catalog exists #### Description When a PDF document has a valid `/Pages` catalog entry, `PDFPage.create_pages()` returns an empty generator instead of yielding the actual pages. This affects PDF processing where documents have proper page tree structures. #### Steps...
pyupio__safety.7654596b.func_pm_remove_cond__5gmahf3s
diff --git a/safety/cli.py b/safety/cli.py index 36099f3..7c56ef3 100644 --- a/safety/cli.py +++ b/safety/cli.py @@ -562,10 +562,6 @@ def generate(ctx, name, path): def validate(ctx, name, version, path): """Verify that a local policy file is valid. NAME is the name of the file type to validate. Valid values are:...
[ "tests/test_cli.py::TestSafetyCLI::test_validate_with_unsupported_argument" ]
[ "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::TestS...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
swesmith/pyupio__safety.7654596b
validate command accepts unsupported arguments without error #### Description The `safety validate` command is supposed to only support "policy_file" validation, but it now accepts any argument without showing an error message or exiting with a failure code. #### Steps/Code to Reproduce ```bash safety validate safe...
kurtmckee__feedparser.cad965a3.lm_rewrite__162lhsl3
diff --git a/feedparser/html.py b/feedparser/html.py index 2fbec36..0366149 100644 --- a/feedparser/html.py +++ b/feedparser/html.py @@ -115,12 +115,11 @@ class BaseHTMLProcessor(sgmllib.SGMLParser): :type match: Match[str] :rtype: str """ - tag = match.group(1) if tag in se...
[ "tests/test_well_formed.py::test_loose_parser[info1478]" ]
[ "tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category"...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
swesmith/kurtmckee__feedparser.cad965a3
# HTML tag closing issue in BaseHTMLProcessor ## Description I found a bug in the HTML processing when using the BaseHTMLProcessor. The issue occurs when handling empty tags that need closing tags. Here's a simple example to reproduce the issue: ```python from feedparser.html import BaseHTMLProcessor # Create a pr...
tobymao__sqlglot.036601ba.func_pm_remove_loop__yccwgn7a
diff --git a/sqlglot/transforms.py b/sqlglot/transforms.py index 10c0faf..b893cb8 100644 --- a/sqlglot/transforms.py +++ b/sqlglot/transforms.py @@ -258,24 +258,6 @@ def eliminate_qualify(expression: exp.Expression) -> exp.Expression: } select_candidates = exp.Window if expression.is_star else (exp....
[ "tests/test_transforms.py::TestTransforms::test_eliminate_qualify" ]
[ "tests/test_transforms.py::TestTransforms::test_eliminate_distinct_on", "tests/test_transforms.py::TestTransforms::test_eliminate_join_marks", "tests/test_transforms.py::TestTransforms::test_remove_precision_parameterized_types", "tests/test_transforms.py::TestTransforms::test_unalias_group" ]
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
swesmith/tobymao__sqlglot.036601ba
eliminate_qualify transform removes window function handling logic #### Description The `eliminate_qualify` function in `sqlglot/transforms.py` is missing critical logic for handling window functions and column references in QUALIFY clauses. When transforming queries with QUALIFY clauses that contain window functions...
mahmoud__glom.fb3c4e76.func_basic__h6cv91ae
diff --git a/glom/streaming.py b/glom/streaming.py index 4da5fb5..4e89b6b 100644 --- a/glom/streaming.py +++ b/glom/streaming.py @@ -83,12 +83,12 @@ class Iter: return ''.join(chunks) def glomit(self, target, scope): - iterator = self._iterate(target, scope) + iterator = self._iterate(scop...
[ "glom/test/test_basic.py::test_ref", "glom/test/test_streaming.py::test_iter", "glom/test/test_streaming.py::test_filter", "glom/test/test_streaming.py::test_map", "glom/test/test_streaming.py::test_split_flatten", "glom/test/test_streaming.py::test_chunked", "glom/test/test_streaming.py::test_windowed"...
[ "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.p...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
swesmith/mahmoud__glom.fb3c4e76
Iter returns list instead of iterator #### Description The `Iter` class in glom's streaming module is returning a list instead of an iterator when used with `glomit()`. This breaks the expected streaming behavior and causes issues with iterator consumption. #### Steps/Code to Reproduce ```python from glom import gl...
pydicom__pydicom.7d361b3d.func_pm_ctrl_invert_if__g8oim14q
diff --git a/src/pydicom/filewriter.py b/src/pydicom/filewriter.py index cb3ce64..d8995ed 100644 --- a/src/pydicom/filewriter.py +++ b/src/pydicom/filewriter.py @@ -479,11 +479,11 @@ def write_text( if _is_multi_value(val): val = cast(Sequence[bytes] | Sequence[str], val) if isinstanc...
[ "tests/test_charset.py::TestCharset::test_charset_patient_names[chrFrenMulti-Buc^J\\xe9r\\xf4me]", "tests/test_charset.py::TestCharset::test_charset_patient_names[chrJapMulti-\\u3084\\u307e\\u3060^\\u305f\\u308d\\u3046]", "tests/test_charset.py::TestCharset::test_charset_patient_names[chrJapMultiExplicitIR6-\\u...
[ "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::TestRunnerB...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
swesmith/pydicom__pydicom.7d361b3d
Text encoding logic swapped for multi-value elements When writing multi-value text elements, the encoding logic appears to be reversed. String values are being treated as bytes and bytes values are being treated as strings, causing encoding errors when saving DICOM files. #### Steps/Code to Reproduce ```python impor...
pdfminer__pdfminer.six.1a8bd2f7.func_basic__zctj4eba
diff --git a/pdfminer/lzw.py b/pdfminer/lzw.py index 8e9585a..8d94343 100644 --- a/pdfminer/lzw.py +++ b/pdfminer/lzw.py @@ -102,4 +102,4 @@ class LZWDecoder: def lzwdecode(data: bytes) -> bytes: fp = BytesIO(data) s = LZWDecoder(fp).run() - return b"".join(s) + return b" ".join(s)
[ "tests/test_pdfminer_crypto.py::TestLzw::test_lzwdecode" ]
[ "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::TestPaintP...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
swesmith/pdfminer__pdfminer.six.1a8bd2f7
# LZW Decoder produces incorrect output when decoding compressed data ### Bug report **Bug summary** The LZW decoder in pdfminer is incorrectly joining the decoded bytes with spaces instead of concatenating them directly. This causes incorrect output when decoding LZW-compressed data in PDF files. **Code for reprodu...
facebookresearch__hydra.0f03eb60.combine_module__j6kuvpzl
diff --git a/hydra/plugins/completion_plugin.py b/hydra/plugins/completion_plugin.py index 8bc6138..1c06354 100644 --- a/hydra/plugins/completion_plugin.py +++ b/hydra/plugins/completion_plugin.py @@ -59,6 +59,7 @@ class CompletionPlugin(Plugin): @staticmethod def _get_filename(filename: str) -> Tuple[Optiona...
[ "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[one_item]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[self_leading]", "tests/defaults_list/test_defaults_list.py::test_loaded_defaults_list[self_trailing]", "tests/defaults_list/test_defaults_list.py::test_loaded...
[ "build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.p...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
swesmith/facebookresearch__hydra.0f03eb60
Completion plugin returns None for all filenames #### Description The completion plugin's `_get_filename` method always returns `(None, None)` regardless of input, breaking file completion functionality. #### Steps/Code to Reproduce ```python from hydra.plugins.completion_plugin import CompletionPlugin # Test with...
HIPS__autograd.ac044f0d.lm_rewrite__tj4c6xvp
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..aea281b 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -624,16 +624,13 @@ def dot_adjoint_0(B, G, A_meta, B_meta): def dot_adjoint_1(A, G, A_meta, B_meta): _, A_ndim, _, _ = A_meta _, B_nd...
[ "tests/test_systematic.py::test_dot" ]
[ "tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_m...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
swesmith/HIPS__autograd.ac044f0d
**Unexpected Behavior in np.dot Function** **Describe the bug** When using the `np.dot` function, a `ValueError` is raised unexpectedly. This seems to occur when attempting to perform a dot product with certain input shapes. **To Reproduce** Steps to reproduce the behavior: 1. Use the `np.dot` function with the follo...
sqlfluff__sqlfluff.50a1c4b6.combine_module__ea00ihiu
diff --git a/src/sqlfluff/core/helpers/dict.py b/src/sqlfluff/core/helpers/dict.py index ae76dcd..df54295 100644 --- a/src/sqlfluff/core/helpers/dict.py +++ b/src/sqlfluff/core/helpers/dict.py @@ -61,27 +61,19 @@ def nested_combine(*dicts: NestedStringDict[T]) -> NestedStringDict[T]: {'a': {'b': 'e'}} """ ...
[ "test/core/helpers/dict_test.py::test__helpers_dict__nested_combine", "test/core/helpers/string_test.py::test__helpers_string__split_comma_separated_string[AL01,LT08,AL07-expected0]", "test/core/helpers/string_test.py::test__helpers_string__split_comma_separated_string[\\nAL01,\\nLT08,\\nAL07,-expected1]", "t...
[ "test/core/helpers/dict_test.py::test_helpers_dict_doctests", "test/core/helpers/dict_test.py::test__helpers_dict__nested_combine_copy_effect", "test/core/helpers/dict_test.py::test__helpers_dict__dict_diff", "test/core/helpers/dict_test.py::test__config__iter_records_from_nested_dict", "test/core/helpers/s...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
swesmith/sqlfluff__sqlfluff.50a1c4b6
## Comma separated string parsing adds unexpected whitespace When parsing comma-separated strings, the `split_comma_separated_string` function is adding an extra space to each parsed element. #### Steps to Reproduce ```python from sqlfluff.core.helpers.string import split_comma_separated_string # Test with a simple...
lincolnloop__python-qrcode.456b01d4.func_basic__bwo8gknn
diff --git a/qrcode/util.py b/qrcode/util.py index 02fe11d..723cf4d 100644 --- a/qrcode/util.py +++ b/qrcode/util.py @@ -491,9 +491,9 @@ class BitBuffer: buf_index = self.length // 8 if len(self.buffer) <= buf_index: self.buffer.append(0) - if bit: + if not bit: ...
[ "qrcode/tests/test_qrcode.py::test_fit", "qrcode/tests/test_qrcode.py::test_mode_number", "qrcode/tests/test_qrcode.py::test_mode_alpha", "qrcode/tests/test_qrcode.py::test_mode_8bit", "qrcode/tests/test_qrcode.py::test_optimize", "qrcode/tests/test_qrcode.py::test_optimize_short", "qrcode/tests/test_qr...
[ "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_qr...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
swesmith/lincolnloop__python-qrcode.456b01d4
QR code generation produces incorrect version numbers When generating QR codes, the library is selecting higher version numbers than necessary, causing inefficient encoding. This affects both optimized and non-optimized data encoding. #### Steps/Code to Reproduce ```python import qrcode from qrcode.constants import ...
gruns__furl.da386f68.func_basic__dsxqzc7y
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..65afddf 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -1049,7 +1049,8 @@ class Query(object): __nonzero__ = __bool__ def __str__(self): - return self.encode() + encoded_str = self.encode() + return encoded_str.decode('utf-8') ...
[ "tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestQuery::test_add", "tests/test_furl.py::TestQuery::test_asdict", "tests/test_furl.py::TestQuery...
[ "tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_itruediv", "tests/test_furl.py::TestPath::test_leading_slash", "tests/test_furl.py::TestPath::test_load", "tests/test_furl.py::TestPath::test_none", "tests/test_furl.py::Te...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
swesmith/gruns__furl.da386f68
Query.__str__() raises AttributeError on Python 3 #### Description When using furl with Python 3, calling `str()` on a Query object raises an AttributeError because the code tries to call `.decode()` on a string that's already decoded. #### Steps/Code to Reproduce ```python import furl # Create a simple query q = ...
pallets__jinja.ada0a9a6.func_pm_ctrl_shuffle__yc8iarbo
diff --git a/src/jinja2/filters.py b/src/jinja2/filters.py index 1420877..846580d 100644 --- a/src/jinja2/filters.py +++ b/src/jinja2/filters.py @@ -105,7 +105,6 @@ def make_multi_attrgetter( parts = [_prepare_attribute_parts(item) for item in split] def attrgetter(item: t.Any) -> t.List[t.Any]: - it...
[ "tests/test_filters.py::TestFilter::test_sort1", "tests/test_filters.py::TestFilter::test_sort2", "tests/test_filters.py::TestFilter::test_sort3", "tests/test_filters.py::TestFilter::test_sort4", "tests/test_filters.py::TestFilter::test_sort5", "tests/test_filters.py::TestFilter::test_sort6", "tests/tes...
[ "tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
swesmith/pallets__jinja.ada0a9a6
Sort filter raises UnboundLocalError when using attribute access #### Description The sort filter fails with an UnboundLocalError when trying to sort objects by attributes. This affects any template that uses the sort filter with attribute-based sorting. #### Steps/Code to Reproduce ```python from jinja2 import Tem...
marshmallow-code__apispec.8b421526.func_pm_ctrl_shuffle__ncizv48o
diff --git a/src/apispec/core.py b/src/apispec/core.py index e9ccb40..41b90ef 100644 --- a/src/apispec/core.py +++ b/src/apispec/core.py @@ -300,13 +300,12 @@ class Components: :param str component_id: component_id to use as reference :param dict component: security scheme fields """ + ...
[ "tests/test_core.py::TestComponents::test_security_scheme_duplicate_name[2.0]", "tests/test_core.py::TestComponents::test_security_scheme_duplicate_name[3.0.0]" ]
[ "tests/test_core.py::TestAPISpecInit::test_raises_wrong_apispec_version", "tests/test_core.py::TestMetadata::test_openapi_metadata[2.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata[3.0.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestTags...
jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526
swesmith/marshmallow-code__apispec.8b421526
security_scheme() doesn't check for duplicate component names When registering a security scheme with the same component_id twice, the second registration overwrites the first one without raising an error. This is inconsistent with other component registration methods which properly check for duplicates. For example,...
pylint-dev__astroid.b114f6b5.combine_file__k0ewiny4
diff --git a/astroid/nodes/_base_nodes.py b/astroid/nodes/_base_nodes.py index 65b703d..5f04abc 100644 --- a/astroid/nodes/_base_nodes.py +++ b/astroid/nodes/_base_nodes.py @@ -356,32 +356,32 @@ class OperatorNode(NodeNG): TODO: Instead of returning Uninferable we should rely on the call to '%' to see...
[ "tests/brain/test_named_tuple.py::NamedTupleTest::test_namedtuple_advanced_inference", "tests/test_inference.py::InferenceTest::test_aug_different_types_aug_not_implemented", "tests/test_inference.py::InferenceTest::test_aug_different_types_aug_not_implemented_rop_fallback", "tests/test_inference.py::Inferenc...
[ "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...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
swesmith/pylint-dev__astroid.b114f6b5
String formatting with dictionaries returns incorrect results #### Description When using old-style string formatting with dictionary arguments, the key-value pairs are being swapped in the result. The values are being used as keys and keys as values. #### Steps/Code to Reproduce ```python import astroid code = ''...
oauthlib__oauthlib.1fd52536.func_basic__yxkg1g6o
diff --git a/oauthlib/oauth2/rfc8628/endpoints/device_authorization.py b/oauthlib/oauth2/rfc8628/endpoints/device_authorization.py index 7cda5ee..510147b 100644 --- a/oauthlib/oauth2/rfc8628/endpoints/device_authorization.py +++ b/oauthlib/oauth2/rfc8628/endpoints/device_authorization.py @@ -79,7 +79,7 @@ class DeviceA...
[ "tests/oauth2/rfc8628/test_server.py::DeviceAuthorizationEndpointTest::test_device_authorization_grant" ]
[ "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", "te...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
swesmith/oauthlib__oauthlib.1fd52536
Device authorization endpoint returns incorrect verification URI #### Description The device authorization endpoint is returning an incorrect verification URI with an extra "/invalid" suffix appended to it. #### Steps/Code to Reproduce ```python from oauthlib.oauth2.rfc8628.endpoints.device_authorization import Dev...
pandas-dev__pandas.95280573.func_pm_ctrl_invert_if__jel5g83d
diff --git a/pandas/core/arrays/arrow/array.py b/pandas/core/arrays/arrow/array.py index e2feda4..4ba41e2 100644 --- a/pandas/core/arrays/arrow/array.py +++ b/pandas/core/arrays/arrow/array.py @@ -1217,9 +1217,6 @@ class ArrowExtensionArray( else: encoded = data.dictionary_encode(null_encoding=nul...
[ "pandas/tests/extension/test_arrow.py::TestArrowArray::test_sort_values_frame[uint8-True]", "pandas/tests/extension/test_arrow.py::TestArrowArray::test_sort_values_frame[uint8-False]", "pandas/tests/extension/test_arrow.py::TestArrowArray::test_sort_values_frame[uint16-True]", "pandas/tests/extension/test_arr...
[ "pandas/tests/extension/test_arrow.py::TestArrowArray::test_is_immutable[uint8]", "pandas/tests/extension/test_arrow.py::TestArrowArray::test_is_immutable[uint16]", "pandas/tests/extension/test_arrow.py::TestArrowArray::test_is_immutable[uint32]", "pandas/tests/extension/test_arrow.py::TestArrowArray::test_is...
jyangballin/swesmith.x86_64.pandas-dev_1776_pandas.95280573
swesmith/pandas-dev__pandas.95280573
ArrowExtensionArray.factorize() fails with empty arrays #### Description When calling `factorize()` on an empty ArrowExtensionArray, the method fails due to incorrect handling of the empty array case. #### Steps/Code to Reproduce ```python import pandas as pd import pyarrow as pa # Create an empty ArrowExtensionAr...
Project-MONAI__MONAI.a09c1f08.pr_3560
diff --git a/monai/data/dataset_summary.py b/monai/data/dataset_summary.py index 5b9e32a..682ad9a 100644 --- a/monai/data/dataset_summary.py +++ b/monai/data/dataset_summary.py @@ -17,12 +17,10 @@ from itertools import chain import numpy as np import torch -from monai.config import KeysCollection from monai.data.d...
[ "tests/data/test_dataset_summary.py::TestDatasetSummary::test_anisotropic_spacing", "tests/data/test_dataset_summary.py::TestDatasetSummary::test_spacing_intensity" ]
[]
jyangballin/swesmith.x86_64.project-monai_1776_monai.a09c1f08
swesmith/Project-MONAI__MONAI.a09c1f08
Enhance `DatasetSummary` for several points **Is your feature request related to a problem? Please describe.** Thanks for @dongyang0122 's great work to develop `DatasetSummary`, would be nice to enhance the below items: 1. It only has `meta_key_postfix` arg, missed `meta_key` to be consistent with other MONAI module...
pyca__pyopenssl.04766a49.combine_module__gjw7znnl
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index eed27a0..88df83f 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -1177,10 +1177,11 @@ class Context: _raise_current_error() def _raise_passphrase_exception(self) -> None: - if self._passphrase_helper is not None: + ...
[ "tests/test_ssl.py::TestContext::test_load_client_ca_invalid", "tests/test_ssl.py::TestContext::test_set_session_id_fail", "tests/test_ssl.py::TestContext::test_use_privatekey_file_missing", "tests/test_ssl.py::TestContext::test_passwd_callback_exception", "tests/test_ssl.py::TestContext::test_passwd_callba...
[ "tests/test_crypto.py::TestX509Ext::test_str", "tests/test_crypto.py::TestX509Ext::test_type", "tests/test_crypto.py::TestX509Ext::test_construction", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[thisIsMadeUp-False-hi]", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[proxyCertInfo-...
jyangballin/swesmith.x86_64.pyca_1776_pyopenssl.04766a49
swesmith/pyca__pyopenssl.04766a49
# Private key passphrase errors are silently ignored ## Description I've discovered an issue with the OpenSSL library where private key passphrase errors are being silently ignored instead of being properly reported. When trying to use a private key file that requires a passphrase, but providing an incorrect passphr...
pylint-dev__astroid.b114f6b5.combine_file__du37dhzc
diff --git a/astroid/raw_building.py b/astroid/raw_building.py index c1f7ec1..70bd29d 100644 --- a/astroid/raw_building.py +++ b/astroid/raw_building.py @@ -86,8 +86,8 @@ def attach_import_node(node, modname: str, membername: str) -> None: """create a ImportFrom node and register it in the locals of the given ...
[ "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...
[ "tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarr...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
swesmith/pylint-dev__astroid.b114f6b5
Function arguments reversed and body set to None in build_function #### Description When using `build_function` from `astroid.raw_building`, function arguments are being reversed and the function body is incorrectly set to `None` instead of an empty list. #### Steps/Code to Reproduce ```python from astroid.raw_buil...
pandas-dev__pandas.95280573.func_pm_class_rm_base__hvq80i5t
diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index 0f734a8..c424f5c 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -3812,7 +3812,7 @@ class Styler(StylerRenderer): # mypy doesn't like dynamically-defined classes # error: Variable "cls" is not valid ...
[ "pandas/tests/io/formats/style/test_html.py::test_from_custom_template_table", "pandas/tests/io/formats/style/test_html.py::test_from_custom_template_style" ]
[ "pandas/tests/io/formats/style/test_bar.py::test_align_positive_cases[left-exp0]", "pandas/tests/io/formats/style/test_bar.py::test_align_positive_cases[right-exp1]", "pandas/tests/io/formats/style/test_bar.py::test_align_positive_cases[mid-exp2]", "pandas/tests/io/formats/style/test_bar.py::test_align_positi...
jyangballin/swesmith.x86_64.pandas-dev_1776_pandas.95280573
swesmith/pandas-dev__pandas.95280573
Styler.from_custom_template creates class without proper inheritance #### Description When using `Styler.from_custom_template()`, the returned class doesn't properly inherit from the original Styler class, causing issues with method resolution and class hierarchy. #### Steps/Code to Reproduce ```python import panda...
kurtmckee__feedparser.cad965a3.combine_file__tr476l10
diff --git a/feedparser/parsers/strict.py b/feedparser/parsers/strict.py index f00718f..a0b0bec 100644 --- a/feedparser/parsers/strict.py +++ b/feedparser/parsers/strict.py @@ -41,8 +41,8 @@ class StrictXMLParser: @staticmethod def _normalize_attributes(kv): - k = kv[0].lower() - v = k in ("re...
[ "tests/test_well_formed.py::test_strict_parser[info1082]", "tests/test_well_formed.py::test_strict_parser[info771]", "tests/test_well_formed.py::test_strict_parser[info1010]", "tests/test_well_formed.py::test_strict_parser[info360]", "tests/test_well_formed.py::test_strict_parser[info757]", "tests/test_we...
[ "tests/test_json.py::test_json[path0]", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_multiple_mapping_target_2", "tests/test_feedparser_dict.py::test_category", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/t...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
swesmith/kurtmckee__feedparser.cad965a3
# XML parsing broken in StrictXMLParser - attributes and namespaces not handled correctly I've found an issue with the StrictXMLParser in feedparser. After some recent changes, it seems that XML parsing is completely broken, particularly with attribute handling and namespace management. ## Description When parsing f...
getnikola__nikola.0f4c230e.func_pm_op_swap__43086agz
diff --git a/nikola/plugins/command/import_wordpress.py b/nikola/plugins/command/import_wordpress.py index 9a8b130..9e1c9b5 100644 --- a/nikola/plugins/command/import_wordpress.py +++ b/nikola/plugins/command/import_wordpress.py @@ -1182,7 +1182,7 @@ def separate_qtranslate_tagged_langs(text): qt_start = "[:" ...
[ "tests/test_command_import_wordpress_translation.py::test_legacy_split_a_two_language_post[withintermission]", "tests/test_command_import_wordpress_translation.py::test_split_a_two_language_post_with_teaser" ]
[ "tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_ful...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
swesmith/getnikola__nikola.0f4c230e
qtranslate content parsing produces incorrect order for language sections #### Description When importing WordPress content with qtranslate language tags, the content sections are being parsed in the wrong order. Language-specific content that should appear at the end is being prepended to the beginning instead. ###...
marshmallow-code__webargs.dbde72fe.func_pm_ctrl_shuffle__70hxbky7
diff --git a/src/webargs/testing.py b/src/webargs/testing.py index 0d7bf0f..c1c80d7 100644 --- a/src/webargs/testing.py +++ b/src/webargs/testing.py @@ -178,13 +178,12 @@ class CommonTestCase: assert res.json == {"value": 42} def test_use_args_with_validation(self, testapp): - result = testapp.po...
[ "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_use_args_with_validation", "tests/test_bottleparser.py::TestBottleParser::test_use_args_with_validation", "tests/test_falconparser.py::TestFalconParser::test_use_args_with_validation", "tests/test_flaskparser.py::TestFlaskParser::test_use_args_with_validat...
[ "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpp...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
swesmith/marshmallow-code__webargs.dbde72fe
Validation test assertions in wrong order #### Description The validation test for `use_args_with_validation` has incorrect assertion order, causing the test to check the wrong status code for each request. #### Steps/Code to Reproduce When testing argument validation with webargs, the test makes two requests: 1. A...
pyupio__safety.7654596b.func_pm_op_swap__chbq032y
diff --git a/safety/safety.py b/safety/safety.py index 7bb6ad7..675bdcc 100644 --- a/safety/safety.py +++ b/safety/safety.py @@ -164,12 +164,12 @@ def fetch_database_url( """ headers = {'schema-version': JSON_SCHEMA_VERSION, 'ecosystem': ecosystem.value} - if cached and from_cache: + if from_cache and...
[ "tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_safety.py::TestSafety::test_check_live", "tests/test_safety.py::TestSafety::test_check_live_cached", "tests/test_safety.py::TestSafety::test_get_packages_licenses_without_api_key" ]
[ "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::test_check_ignore_unpinned_requirements", "tests/test_cli.py...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
swesmith/pyupio__safety.7654596b
Database URL construction broken when using mirror parameter #### Description When using the `db_mirror` parameter with the safety database fetching functionality, the URL construction is incorrect, causing database fetch failures. #### Steps/Code to Reproduce ```python from safety.safety import fetch_database_url ...
pallets__click.fde47b4b.func_basic__28d739f2
diff --git a/src/click/types.py b/src/click/types.py index 354c7e3..4dfbf77 100644 --- a/src/click/types.py +++ b/src/click/types.py @@ -475,7 +475,7 @@ class _NumberRangeBase(_NumberParamTypeBase): operator.ge if self.max_open else operator.gt )(rv, self.max) - if self.clamp: + if...
[ "tests/test_options.py::test_counting", "tests/test_types.py::test_range[type5--1-0]", "tests/test_types.py::test_range[type6-6-5]", "tests/test_types.py::test_range[type7-0-1]", "tests/test_types.py::test_range[type8-5-4]", "tests/test_types.py::test_range[type12--0.0-0.5]", "tests/test_types.py::test_...
[ "tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.p...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
swesmith/pallets__click.fde47b4b
IntRange and FloatRange clamping behavior inverted #### Description When using `clamp=True` with IntRange or FloatRange types, values outside the range are being rejected with BadParameter exceptions instead of being clamped to the range boundaries. Conversely, when `clamp=False` (the default), values are being clamp...
Knio__dominate.9082227e.func_pm_ctrl_shuffle__kfrdb3er
diff --git a/dominate/util.py b/dominate/util.py index 1d730b3..01c7b26 100644 --- a/dominate/util.py +++ b/dominate/util.py @@ -125,13 +125,12 @@ class container(dom_tag): Contains multiple elements, but does not add a level ''' is_inline = True - def _render(self, sb, indent_level, indent_str, pretty, xhtml...
[ "tests/test_document.py::test_doc", "tests/test_document.py::test_decorator", "tests/test_document.py::test_bare_decorator", "tests/test_document.py::test_title", "tests/test_document.py::test_containers", "tests/test_document.py::test_attributes", "tests/test_utils.py::test_container" ]
[ "tests/test_document.py::test_repr", "tests/test_dom1core.py::test_dom", "tests/test_dom1core.py::test_element", "tests/test_dom1core.py::test_parent_node", "tests/test_dom_tag.py::test___get_thread_context", "tests/test_dom_tag.py::test_add_raw_string", "tests/test_dom_tag.py::test_clear", "tests/tes...
jyangballin/swesmith.x86_64.knio_1776_dominate.9082227e
swesmith/Knio__dominate.9082227e
# Container rendering issue in dominate ## Description I've found a bug in the `container` class in dominate. When using containers, the HTML output is not being rendered correctly. ## Steps/Code to Reproduce ```python from dominate.util import container from dominate.tags import div # Create a container with some c...
davidhalter__parso.338a5760.func_basic__ecrtwyfe
diff --git a/parso/python/parser.py b/parso/python/parser.py index fa45e8b..1e86903 100644 --- a/parso/python/parser.py +++ b/parso/python/parser.py @@ -87,15 +87,11 @@ class Parser(BaseParser): strictly bottom-up. """ try: - node = self.node_map[nonterminal](children) + ...
[ "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "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_pa...
[ "parso/__init__.py::parso", "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.py::test_cache_last_used_update...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
swesmith/davidhalter__parso.338a5760
Parser fails to handle indented code blocks correctly Description When parsing Python code with indented blocks, the parser is not correctly handling the structure, causing issues with code that contains function definitions and other indented constructs. Steps/Code to Reproduce ```python import parso # This shoul...
mido__mido.a0158ff9.func_basic__8twcuc2o
diff --git a/mido/parser.py b/mido/parser.py index e52852b..e0635d6 100644 --- a/mido/parser.py +++ b/mido/parser.py @@ -67,9 +67,8 @@ class Parser: parser. """ for msg in self: - return msg - else: - return None + pass + return msg def pe...
[ "../dev/tests/test_parser.py::test_encode_and_parse_all" ]
[ "../dev/tests/test_frozen.py::test_hashability", "../dev/tests/test_frozen.py::test_freeze_and_thaw", "../dev/tests/test_frozen.py::test_thawed_message_is_copy", "../dev/tests/test_frozen.py::test_is_frozen", "../dev/tests/test_frozen.py::test_frozen_repr", "../dev/tests/test_frozen.py::test_frozen_meta_r...
jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9
swesmith/mido__mido.a0158ff9
Parser.poll() returns undefined variable when no messages available #### Description The `poll()` method in the Parser class raises a `NameError` when called on an empty parser due to an undefined variable reference. #### Steps/Code to Reproduce ```python import mido parser = mido.Parser() result = parser.poll() ...
pydicom__pydicom.7d361b3d.func_pm_remove_assign__f5hfgqkk
diff --git a/src/pydicom/charset.py b/src/pydicom/charset.py index 28a777e..b6101b9 100644 --- a/src/pydicom/charset.py +++ b/src/pydicom/charset.py @@ -575,11 +575,7 @@ def _encode_string_parts(value: str, encodings: Sequence[str]) -> bytes: """ encoded = bytearray() unencoded_part = value - best_enc...
[ "tests/test_charset.py::TestCharset::test_japanese_multi_byte_personname", "tests/test_charset.py::TestCharset::test_japanese_multi_byte_encoding", "tests/test_filewriter.py::TestWriteText::test_encode_mixed_charsets_text", "tests/test_filewriter.py::TestWriteText::test_invalid_encoding", "tests/test_filewr...
[ "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::TestRunnerB...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
swesmith/pydicom__pydicom.7d361b3d
String encoding fails with undefined variables after recent changes #### Description When encoding strings with multiple character sets, the encoding process fails with `UnboundLocalError` for undefined variables `max_index` and `best_encoding`. This affects multi-byte character encoding functionality. #### Steps/Co...
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__ws5klpg5
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..e6c9422 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -2999,6 +2999,16 @@ class GenericMap(NDData): return contours def _check_axes(self, axes, warn_different_wcs=False): + + if not wcsaxes_compat.is_wcsaxes...
[ "sunpy/map/tests/test_mapbase.py::test_find_contours_inputs", "sunpy/map/tests/test_mapbase.py::test_plot_deprecated_positional_args" ]
[ "sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
swesmith/sunpy__sunpy.f8edfd5c
Map plotting methods fail when axes parameter is None #### Description When calling map plotting methods like `draw_contours()` or `plot()` without explicitly passing an axes parameter (or passing `axes=None`), the methods now raise a TypeError about needing WCSAxes instead of automatically creating appropriate axes....
pygments__pygments.27649ebb.combine_file__y1ivi3hz
diff --git a/pygments/lexers/scripting.py b/pygments/lexers/scripting.py index d38387e..ec5ffb5 100644 --- a/pygments/lexers/scripting.py +++ b/pygments/lexers/scripting.py @@ -188,17 +188,17 @@ def _luau_make_expression(should_pop, _s): def _luau_make_expression_special(should_pop): temp_list = [ (r'\{'...
[ "tests/examplefiles/luau/extraTests.luau::", "tests/examplefiles/luau/Guard.luau::", "tests/examplefiles/luau/createSignal.luau::", "tests/test_guess.py::test_rexx_can_guess_from_text" ]
[ "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/t...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
swesmith/pygments__pygments.27649ebb
# Incorrect regex compilation in RexxLexer causing text analysis issues While working on some Rexx code, I noticed that the lexer is not properly identifying Rexx code snippets. This appears to be related to how regular expressions are compiled in the RexxLexer class. ## Description The `_c` function in the RexxLexe...
scanny__python-pptx.278b47b1.func_basic__0bpz0klq
diff --git a/src/pptx/shapes/freeform.py b/src/pptx/shapes/freeform.py index afe8738..f9d8ad4 100644 --- a/src/pptx/shapes/freeform.py +++ b/src/pptx/shapes/freeform.py @@ -46,10 +46,10 @@ class FreeformBuilder(Sequence[DrawingOperation]): ): super(FreeformBuilder, self).__init__() self._shapes =...
[ "tests/shapes/test_freeform.py::DescribeFreeformBuilder::it_can_add_straight_line_segments[True]", "tests/shapes/test_freeform.py::DescribeFreeformBuilder::it_can_add_straight_line_segments[False]", "tests/shapes/test_freeform.py::DescribeFreeformBuilder::it_can_move_the_pen_location", "tests/shapes/test_free...
[ "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAx...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
swesmith/scanny__python-pptx.278b47b1
FreeformBuilder constructor swaps x/y coordinates and applies incorrect scaling #### Description When creating a FreeformBuilder instance, the constructor incorrectly assigns start_x and start_y parameters, and applies wrong scaling factors to x_scale and y_scale. #### Steps/Code to Reproduce ```python from pptx.sh...
python-trio__trio.cfbbe2c1.func_basic__pnhy8ydx
diff --git a/src/trio/_socket.py b/src/trio/_socket.py index 259992b..d9fd388 100644 --- a/src/trio/_socket.py +++ b/src/trio/_socket.py @@ -823,8 +823,8 @@ class _SocketType(SocketType): buflen: int | None = None, ) -> int | bytes: if buflen is None: - return self._sock.getsockopt(lev...
[ "src/trio/_tests/test_highlevel_open_tcp_stream.py::test_local_address_real", "src/trio/_tests/test_highlevel_socket.py::test_SocketStream_basics", "src/trio/_tests/test_highlevel_socket.py::test_SocketListener", "src/trio/_tests/test_socket.py::test_SocketType_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", "s...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
swesmith/python-trio__trio.cfbbe2c1
# Socket getsockopt parameters swapped and incorrect optname value I'm trying to use the socket.getsockopt method in Trio and encountering strange behavior. When I try to get socket options, I'm getting unexpected results or errors. Here's a simple reproduction: ```python import trio async def main(): sock = tr...
andialbrecht__sqlparse.e57923b3.func_basic__tx84mrth
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index a63f4da..669348c 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -204,25 +204,27 @@ def group_assignment(tlist): def group_comparison(tlist): sqlcls = (sql.Parenthesis, sql.Function, sql.Identifier, ...
[ "tests/test_cli.py::test_valid_args", "tests/test_format.py::TestFormat::test_strip_comments_single", "tests/test_format.py::TestFormat::test_strip_comments_multi", "tests/test_format.py::TestFormat::test_strip_comments_preserves_linebreak", "tests/test_format.py::TestFormatReindentAligned::test_case_statem...
[ "tests/test_cli.py::test_cli_main_empty", "tests/test_cli.py::test_parser_empty", "tests/test_cli.py::test_main_help", "tests/test_cli.py::test_invalid_choice", "tests/test_cli.py::test_invalid_args", "tests/test_cli.py::test_invalid_infile", "tests/test_cli.py::test_invalid_outfile", "tests/test_cli....
jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3
swesmith/andialbrecht__sqlparse.e57923b3
SQL comparison operators not being grouped correctly #### Description When parsing SQL statements with comparison operators, the grouping logic appears to be inverted, causing incorrect parsing behavior. Simple comparisons like `1=1` or string comparisons are not being properly identified and grouped as comparison ex...
pallets__click.fde47b4b.combine_file__rb2ff805
diff --git a/src/click/_compat.py b/src/click/_compat.py index feb8366..59eb041 100644 --- a/src/click/_compat.py +++ b/src/click/_compat.py @@ -349,10 +349,10 @@ def get_text_stdout(encoding: str | None = None, errors: str | None = None) -> t def get_text_stderr(encoding: str | None = None, errors: str | None = N...
[ "tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs_tup_composite[opts2]", "tests/test_arguments.py::test_nargs_tu...
[ "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_bytes_args", "tests/test_arguments.py::test_file_args", "tests/test_arguments.py::test_file_atomics", "tests/test_arguments.py::test_stdout_default", "tests/test_arguments.py::test_nargs_envvar[2--No...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
swesmith/pallets__click.fde47b4b
Terminal output functions broken after recent changes #### Description Several terminal-related functions in Click are not working correctly. The `isatty()` function seems to be returning inverted results, and there are issues with ANSI escape sequence handling and stream output. #### Steps/Code to Reproduce ```pyt...
cantools__cantools.0c6a7871.func_basic__db2t1sw3
diff --git a/src/cantools/database/can/formats/kcd.py b/src/cantools/database/can/formats/kcd.py index a54c86c..d4fb886 100644 --- a/src/cantools/database/can/formats/kcd.py +++ b/src/cantools/database/can/formats/kcd.py @@ -380,26 +380,23 @@ def _dump_message(message, bus, node_refs, sort_signals): message_el...
[ "tests/test_convert.py::CanToolsConvertFullTest::test_kcd_dump_default_sort_signals", "tests/test_convert.py::CanToolsConvertFullTest::test_kcd_dump_sort_signals_by_name", "tests/test_database.py::CanToolsDatabaseTest::test_as_kcd_string", "tests/test_database.py::CanToolsDatabaseTest::test_vehicle" ]
[ "tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py:...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
swesmith/cantools__cantools.0c6a7871
KCD format incorrectly sets extended frames as standard When dumping CAN database to KCD format, extended frames are incorrectly marked with `format="standard"` instead of `format="extended"`. This causes issues when loading the KCD file back, as extended frame IDs that are larger than 11 bits get rejected as invalid ...
sqlfluff__sqlfluff.50a1c4b6.func_basic__y8746jdy
diff --git a/src/sqlfluff/core/parser/parsers.py b/src/sqlfluff/core/parser/parsers.py index 5feab6e..98c092c 100644 --- a/src/sqlfluff/core/parser/parsers.py +++ b/src/sqlfluff/core/parser/parsers.py @@ -180,9 +180,8 @@ class StringParser(BaseParser): trim_chars: Optional[Tuple[str, ...]] = None, cas...
[ "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_exclude", "test/core/parser/grammar/grammar_anyof_test.py::tes...
[ "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_templated", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_anyof_modes[ParseMode.STRICT-options1-terminators1-input_slice1-kw...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
swesmith/sqlfluff__sqlfluff.50a1c4b6
StringParser template processing broken after recent changes #### Description The StringParser class is not working correctly - it appears to be processing templates in an unexpected way. SQL keywords and other string matching is failing across the parser. #### Steps/Code to Reproduce ```python from sqlfluff.core.p...
pylint-dev__astroid.b114f6b5.lm_rewrite__g4stblrp
diff --git a/astroid/brain/brain_multiprocessing.py b/astroid/brain/brain_multiprocessing.py index e6413b0..4d3877c 100644 --- a/astroid/brain/brain_multiprocessing.py +++ b/astroid/brain/brain_multiprocessing.py @@ -11,42 +11,116 @@ from astroid.nodes.scoped_nodes import FunctionDef def _multiprocessing_transform...
[ "tests/brain/test_multiprocessing.py::MultiprocessingBrainTest::test_module_name", "tests/brain/test_multiprocessing.py::MultiprocessingBrainTest::test_multiprocessing_module_attributes" ]
[ "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...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
swesmith/pylint-dev__astroid.b114f6b5
**Multiprocessing Module Attribute Inference Issue** **Describe the bug** It seems that the recent changes have affected the inference of certain attributes in the `multiprocessing` module. Specifically, the `SyncManager` and `cpu_count` attributes are not being inferred correctly, which is causing unexpected behavior...
RoaringBitmap__roaring.09c46a0a.func_pm_op_change__qe68dhns
diff --git a/roaring.go b/roaring.go index 66f797e..71e9a15 100644 --- a/roaring.go +++ b/roaring.go @@ -1016,7 +1016,7 @@ func (rb *Bitmap) CheckedRemove(x uint32) bool { // TODO: add unit tests for this method hb := highbits(x) i := rb.highlowcontainer.getIndex(hb) - if i >= 0 { + if i > 0 { C := rb.highlowc...
[ "TestAddCheckedRemove64" ]
[ "TestParAggregations", "TestParAggregations/par1", "TestParAggregations/par1/simple_case", "TestParAggregations/par1/aggregate_nothing", "TestParAggregations/par1/single_bitmap", "TestParAggregations/par1/empty_and_single_elem_bitmaps", "TestParAggregations/par1/two_single_elem_disjoint_sets", "TestPa...
jyangballin/swesmith.x86_64.roaringbitmap_1776_roaring.09c46a0a
swesmith/RoaringBitmap__roaring.09c46a0a
CheckedRemove returns incorrect result when removing element at index 0 #### Description The `CheckedRemove` method returns incorrect boolean values when attempting to remove elements that are stored at index 0 in the bitmap's container structure. #### Steps/Code to Reproduce ```go package main import ( "fmt" ...
davidhalter__parso.338a5760.func_pm_class_rm_funcs__09jd2omv
diff --git a/parso/python/errors.py b/parso/python/errors.py index 09c5047..78b5bfe 100644 --- a/parso/python/errors.py +++ b/parso/python/errors.py @@ -1197,36 +1197,6 @@ class _ExprStmtRule(_CheckAssignmentRule): message = "illegal expression for augmented assignment" extended_message = "'{target}' is an " ...
[ "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_normalizer_iss...
[ "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::t...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
swesmith/davidhalter__parso.338a5760
Augmented assignment validation not working for certain expressions #### Description When parsing Python code with augmented assignment operators (like `+=`, `-=`, etc.), parso is not properly validating illegal expressions that should raise syntax errors. This affects code analysis and error detection capabilities. ...
getmoto__moto.694ce1f4.func_pm_remove_assign__lmmgjrrm
diff --git a/moto/dynamodb/comparisons.py b/moto/dynamodb/comparisons.py index e8c6899..8cc1164 100644 --- a/moto/dynamodb/comparisons.py +++ b/moto/dynamodb/comparisons.py @@ -1193,9 +1193,6 @@ class FuncBetween(Func): super().__init__(attribute, start, end) def expr(self, item: Optional[Item]) -> bool...
[ "tests/test_dynamodb/test_dynamodb.py::test_filter_expression" ]
[ "tests/test_dynamodb/test_dynamodb.py::test_list_tables_boto3[no-table]", "tests/test_dynamodb/test_dynamodb.py::test_list_tables_boto3[one-table]", "tests/test_dynamodb/test_dynamodb.py::test_list_tables_boto3[multiple-tables]", "tests/test_dynamodb/test_dynamodb.py::test_list_tables_paginated", "tests/tes...
jyangballin/swesmith.x86_64.getmoto_1776_moto.694ce1f4
swesmith/getmoto__moto.694ce1f4
DynamoDB BETWEEN filter expression fails with NameError Description When using a BETWEEN filter expression in DynamoDB queries, a NameError is raised for undefined variables `start` and `attr`. This appears to be related to the FuncBetween comparison function. Steps/Code to Reproduce ```python import moto.dynamodb....
pndurette__gTTS.dbcda4f3.combine_file__eihpfmp7
diff --git a/gtts/tts.py b/gtts/tts.py index eae351f..379331d 100644 --- a/gtts/tts.py +++ b/gtts/tts.py @@ -331,10 +331,10 @@ class gTTS: :class:`gTTSError`: When there's an error with the API request. """ + savefile = savefile + ".bak" with open(str(savefile), "wb") as f: ...
[ "gtts/tests/test_cli.py::test_lang_nocheck", "gtts/tests/test_tts.py::test_TTS[Afrikaans]", "gtts/tests/test_tts.py::test_TTS[Amharic]", "gtts/tests/test_tts.py::test_TTS[Arabic]", "gtts/tests/test_tts.py::test_TTS[Bulgarian]", "gtts/tests/test_tts.py::test_TTS[Bengali]", "gtts/tests/test_tts.py::test_T...
[ "gtts/tests/test_cli.py::test_text_no_text_or_file", "gtts/tests/test_cli.py::test_text_text_and_file", "gtts/tests/test_cli.py::test_text_empty", "gtts/tests/test_cli.py::test_file_not_exists", "gtts/tests/test_cli.py::test_all", "gtts/tests/test_cli.py::test_lang_not_valid", "gtts/tests/test_cli.py::t...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
swesmith/pndurette__gTTS.dbcda4f3
gTTS save method appends ".bak" extension unexpectedly #### Description When using the `save()` method to save TTS audio files, the method is unexpectedly appending ".bak" to the filename. This breaks existing code that expects files to be saved with the original specified filename. #### Steps/Code to Reproduce ```...
mahmoud__boltons.3bfcfdd0.combine_file__c5rs0ihw
diff --git a/boltons/jsonutils.py b/boltons/jsonutils.py index bf61b03..3336112 100644 --- a/boltons/jsonutils.py +++ b/boltons/jsonutils.py @@ -147,12 +147,12 @@ class JSONLIterator: ignore_errors=False, reverse=False, rel_seek=None): self._reverse = bool(reverse) self._file_obj = f...
[ "tests/test_jsonutils.py::test_jsonl_iterator" ]
[ "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]", ...
jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0
swesmith/mahmoud__boltons.3bfcfdd0
[Bug]: JSONLIterator returns raw JSON strings instead of parsed objects ### Bug summary When using the `JSONLIterator` class to iterate over a JSONL file, it returns the raw JSON strings instead of the parsed JSON objects. This makes the iterator unusable for its intended purpose. ### Code for reproduction ```pytho...
pygments__pygments.27649ebb.func_basic__lfwxc2o2
diff --git a/pygments/lexers/robotframework.py b/pygments/lexers/robotframework.py index 5449441..85aabef 100644 --- a/pygments/lexers/robotframework.py +++ b/pygments/lexers/robotframework.py @@ -94,16 +94,16 @@ class VariableTokenizer: yield value, token def _tokenize(self, var, string, orig_t...
[ "tests/snippets/robotframework/test_basic.txt::", "tests/examplefiles/robotframework/robotframework_test.robot::" ]
[ "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/t...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
swesmith/pygments__pygments.27649ebb
Robot Framework lexer produces incorrect token output for variables #### Description The Robot Framework lexer is generating malformed token output when parsing variables. The tokenization appears to be producing reversed text and incorrect syntax highlighting for variable expressions. #### Steps/Code to Reproduce ...
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__xtj0vs7f
diff --git a/sqlglot/generator.py b/sqlglot/generator.py index 34d2c0d..37bc3d3 100644 --- a/sqlglot/generator.py +++ b/sqlglot/generator.py @@ -3593,7 +3593,6 @@ class Generator(metaclass=_Generator): def binary(self, expression: exp.Binary, op: str) -> str: sqls: t.List[str] = [] stack: t.List[...
[ "tests/test_generator.py::TestGenerator::test_fallback_function_var_args_sql", "tests/test_generator.py::TestGenerator::test_generate_nested_binary" ]
[ "tests/test_generator.py::TestGenerator::test_fallback_function_sql", "tests/test_generator.py::TestGenerator::test_identify" ]
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
swesmith/tobymao__sqlglot.036601ba
Binary expression generation broken for nested operations #### Description When generating SQL for nested binary expressions, the output is incorrect. The binary type detection seems to be happening at the wrong time during the generation process. #### Steps/Code to Reproduce ```python import sqlglot from sqlglot i...
pylint-dev__astroid.b114f6b5.func_pm_ctrl_shuffle__1zjwta9s
diff --git a/astroid/brain/brain_numpy_utils.py b/astroid/brain/brain_numpy_utils.py index a3d4ed5..516ad81 100644 --- a/astroid/brain/brain_numpy_utils.py +++ b/astroid/brain/brain_numpy_utils.py @@ -49,6 +49,13 @@ def infer_numpy_attribute( def _is_a_numpy_module(node: Name) -> bool: + return any( + ("...
[ "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...
[ "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_dtype", "tests/brain/numpy/test_core_numerictypes.py::NumpyBrainCoreNumericTypesTest::test_array_types_have_unary_operators", "tests/brain/numpy/test_core_numerictypes.py::NumpyBrainCoreNumericTypesTe...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
swesmith/pylint-dev__astroid.b114f6b5
UnboundLocalError in numpy brain module detection #### Description When using astroid to analyze code that imports numpy, an UnboundLocalError is raised due to a variable being used before assignment in the `_is_a_numpy_module` function. #### Steps/Code to Reproduce ```python import astroid # This will trigger the...
cantools__cantools.0c6a7871.func_basic__ge8ol4wa
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..b9b5c49 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -1496,12 +1496,12 @@ def _load_signals(tokens, return False def get_signal_n...
[ "tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "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_comma...
[ "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:...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
swesmith/cantools__cantools.0c6a7871
Signal names not properly retrieved from DBC files with SystemSignalLongSymbol attributes #### Description When loading DBC files that contain `SystemSignalLongSymbol` attributes, signal names are not being retrieved correctly. Instead of getting the proper signal names, signals appear to be missing or have incorrect...
tobymao__sqlglot.036601ba.lm_rewrite__0uzpst6e
diff --git a/sqlglot/parser.py b/sqlglot/parser.py index 248a128..83b329a 100644 --- a/sqlglot/parser.py +++ b/sqlglot/parser.py @@ -7202,40 +7202,44 @@ class Parser(metaclass=_Parser): return self.expression(exp.AlterRename, this=self._parse_table(schema=True)) def _parse_alter_table_set(self) -> exp.A...
[ "tests/dialects/test_hive.py::TestHive::test_ddl", "tests/dialects/test_postgres.py::TestPostgres::test_ddl", "tests/dialects/test_redshift.py::TestRedshift::test_alter_table", "tests/dialects/test_snowflake.py::TestSnowflake::test_alter_set_unset", "tests/dialects/test_spark.py::TestSpark::test_ddl", "te...
[ "tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/tes...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
swesmith/tobymao__sqlglot.036601ba
### Issue: ALTER TABLE SET Syntax Not Recognized Hello, I've encountered an issue with the SQL parser when trying to use the `ALTER TABLE SET` syntax. It seems that certain variations of this command are not being recognized correctly, leading to parsing errors. #### Steps to Reproduce: 1. Use the following SQL com...
marshmallow-code__webargs.dbde72fe.func_basic__d9qi3u1g
diff --git a/src/webargs/testing.py b/src/webargs/testing.py index 0d7bf0f..97024ab 100644 --- a/src/webargs/testing.py +++ b/src/webargs/testing.py @@ -141,9 +141,9 @@ class CommonTestCase: def test_parse_json_list_error_malformed_data(self, testapp): res = testapp.post_json( - "/echo_multi_...
[ "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_list_error_malformed_data", "tests/test_bottleparser.py::TestBottleParser::test_parse_json_list_error_malformed_data", "tests/test_djangoparser.py::TestDjangoParser::test_parse_json_list_error_malformed_data", "tests/test_falconparser.py::TestFa...
[ "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpp...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
swesmith/marshmallow-code__webargs.dbde72fe
JSON list parsing returns wrong status code for malformed data #### Description When parsing JSON list data with malformed input, the parser returns status code 424 instead of the expected 422. #### Steps/Code to Reproduce ```python import requests # Send malformed JSON data to endpoint expecting a list response =...
pallets__click.fde47b4b.func_basic__31d1def0
diff --git a/src/click/decorators.py b/src/click/decorators.py index 901f831..7794367 100644 --- a/src/click/decorators.py +++ b/src/click/decorators.py @@ -116,10 +116,12 @@ def pass_meta_key( def decorator(f: t.Callable[te.Concatenate[T, P], R]) -> t.Callable[P, R]: def new_func(*args: P.args, **kwargs:...
[ "tests/test_context.py::test_make_pass_meta_decorator" ]
[ "tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.p...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
swesmith/pallets__click.fde47b4b
`pass_meta_key` decorator returns None when meta key exists #### Description When using the `pass_meta_key` decorator with a key that exists in the context meta, the decorated function returns `None` instead of the expected return value. #### Steps/Code to Reproduce ```python import click from click.decorators impo...
pylint-dev__astroid.b114f6b5.combine_file__f7nesu4y
diff --git a/astroid/nodes/_base_nodes.py b/astroid/nodes/_base_nodes.py index 65b703d..935b4fd 100644 --- a/astroid/nodes/_base_nodes.py +++ b/astroid/nodes/_base_nodes.py @@ -356,32 +356,32 @@ class OperatorNode(NodeNG): TODO: Instead of returning Uninferable we should rely on the call to '%' to see...
[ "tests/brain/test_named_tuple.py::NamedTupleTest::test_namedtuple_advanced_inference", "tests/test_inference.py::InferenceTest::test_aug_different_types_aug_not_implemented_rop_fallback", "tests/test_inference.py::InferenceTest::test_aug_different_types_augop_implemented", "tests/test_inference.py::InferenceT...
[ "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...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
swesmith/pylint-dev__astroid.b114f6b5
String formatting with % operator returns incorrect results #### Description When using the % operator for string formatting, the operation produces incorrect results. The formatting appears to be swapping keys and values in dictionary formatting and returning wrong types in some cases. #### Steps/Code to Reproduce ...
tornadoweb__tornado.d5ac65c1.func_pm_ctrl_invert_if__q1xpqtwd
diff --git a/tornado/process.py b/tornado/process.py index 339ef65..20b4926 100644 --- a/tornado/process.py +++ b/tornado/process.py @@ -154,15 +154,15 @@ def fork_processes( os.WTERMSIG(status), ) elif os.WEXITSTATUS(status) != 0: + gen_log.info("child %d (pid %d) exit...
[ "test_multi_process (tornado.test.process_test.ProcessTest)", "test_close_stdin (tornado.test.process_test.SubprocessTest)", "test_sigchild (tornado.test.process_test.SubprocessTest)", "test_sigchild_future (tornado.test.process_test.SubprocessTest)", "test_sigchild_signal (tornado.test.process_test.Subproc...
[ "Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputi...
jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1
swesmith/tornadoweb__tornado.d5ac65c1
Child process restart logic inverted in fork_processes #### Description The restart logic for child processes in `fork_processes` appears to be inverted. When a child process exits with a non-zero status (indicating an error), it logs that the child exited normally and continues without restarting. When a child exits...
davidhalter__parso.338a5760.lm_rewrite__bxebtqfx
diff --git a/conftest.py b/conftest.py index 35a1846..8a7a2f1 100644 --- a/conftest.py +++ b/conftest.py @@ -41,21 +41,12 @@ def pytest_addoption(parser): def pytest_generate_tests(metafunc): - if 'normalizer_issue_case' in metafunc.fixturenames: - base_dir = os.path.join(os.path.dirname(__file__), 'test...
[ "test/test_normalizer_issues_files.py::test_normalizer_issue[latin-1.py]", "test/test_normalizer_issues_files.py::test_normalizer_issue[E30not.py]", "test/test_normalizer_issues_files.py::test_normalizer_issue[E12_second.py]", "test/test_normalizer_issues_files.py::test_normalizer_issue[E50.py]", "test/test...
[ "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::t...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
swesmith/davidhalter__parso.338a5760
### Unexpected Behavior in Normalizer Issue Handling Hey team, I've encountered an issue with the normalizer functionality after the recent changes. It seems like the normalizer isn't processing issues as expected, leading to discrepancies in the output. ### Description When running the normalizer on certain test c...
pandas-dev__pandas.95280573.func_pm_ctrl_shuffle__159dbtsu
diff --git a/pandas/core/reshape/tile.py b/pandas/core/reshape/tile.py index 034b861..7ce931c 100644 --- a/pandas/core/reshape/tile.py +++ b/pandas/core/reshape/tile.py @@ -548,11 +548,8 @@ def _bins_to_cuts( def _coerce_to_type(x: Index) -> tuple[Index, DtypeObj | None]: - """ - if the passed data is of dat...
[ "pandas/tests/reshape/test_cut.py::test_simple", "pandas/tests/reshape/test_cut.py::test_bins[list]", "pandas/tests/reshape/test_cut.py::test_bins[array]", "pandas/tests/reshape/test_cut.py::test_right", "pandas/tests/reshape/test_cut.py::test_no_right", "pandas/tests/reshape/test_cut.py::test_bins_from_i...
[ "pandas/tests/reshape/concat/test_append.py::TestAppend::test_append[True]", "pandas/tests/reshape/concat/test_append.py::TestAppend::test_append[False]", "pandas/tests/reshape/concat/test_append.py::TestAppend::test_append_empty", "pandas/tests/reshape/concat/test_append.py::TestAppend::test_append_overlap_r...
jyangballin/swesmith.x86_64.pandas-dev_1776_pandas.95280573
swesmith/pandas-dev__pandas.95280573
`cut` and `qcut` functions raise UnboundLocalError for datetime and nullable integer data #### Description When using `cut` or `qcut` functions with datetime, timedelta, boolean, or nullable integer data types, an `UnboundLocalError` is raised because the `dtype` variable is referenced before assignment. #### Steps/...
pydantic__pydantic.acb0f10f.func_pm_remove_cond__k8s7mm4f
diff --git a/pydantic/_internal/_docs_extraction.py b/pydantic/_internal/_docs_extraction.py index 685a6d0..6afbace 100644 --- a/pydantic/_internal/_docs_extraction.py +++ b/pydantic/_internal/_docs_extraction.py @@ -72,12 +72,9 @@ def _extract_source_from_frame(cls: type[Any]) -> list[str] | None: ...
[ "tests/test_docs_extraction.py::test_model_docs_extraction", "tests/test_docs_extraction.py::test_model_docs_duplicate_class", "tests/test_docs_extraction.py::test_model_docs_dedented_string", "tests/test_docs_extraction.py::test_model_docs_inheritance", "tests/test_docs_extraction.py::test_model_different_...
[ "tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fasta...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
swesmith/pydantic__pydantic.acb0f10f
Docstring extraction broken for models with decorators #### Description When using `use_attribute_docstrings=True` with BaseModel or pydantic_dataclass, field docstrings are not being extracted properly when the class has decorators applied to it. #### Steps/Code to Reproduce ```python from pydantic import BaseMode...
benoitc__gunicorn.bacbf8aa.lm_rewrite__l4tg5kfz
diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 419ac50..239417b 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -252,37 +252,40 @@ class Response: return self.write def process_headers(self, headers): + """ + Process the headers that are set by the appli...
[ "tests/test_http.py::test_http_invalid_response_header" ]
[ "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_arbi...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
swesmith/benoitc__gunicorn.bacbf8aa
Invalid HTTP Response Header Handling ### Describe the bug It seems there's an issue with processing certain HTTP response headers. When headers are passed to the `process_headers` function, it raises a `TypeError` unexpectedly. This behavior is inconsistent with the expected handling of headers, which should allow f...
seperman__deepdiff.ed252022.func_pm_remove_assign__rpix23oy
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..214a3f5 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -928,10 +928,6 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): self._report_result('iterable_item_moved', change_level, local_tree=local_tree) ...
[ "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_d...
[ "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::TestCac...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
swesmith/seperman__deepdiff.ed252022
DeepDiff crashes with NameError when comparing iterables with moved items #### Description When comparing iterables that contain moved items, DeepDiff raises a `NameError: name 'next_level' is not defined` error. This appears to happen when the comparison involves items that have been moved between positions in the i...
sunpy__sunpy.f8edfd5c.func_pm_remove_assign__rmewsd8k
diff --git a/sunpy/util/datatype_factory_base.py b/sunpy/util/datatype_factory_base.py index 6c132c0..1bab0d0 100644 --- a/sunpy/util/datatype_factory_base.py +++ b/sunpy/util/datatype_factory_base.py @@ -128,14 +128,12 @@ class BasicRegistrationFactory: _classmethod = inspect.ismethod(vfunc) and v...
[ "sunpy/util/tests/test_datatype_factory_base.py::test_default_factory", "sunpy/util/tests/test_datatype_factory_base.py::test_no_default_factory", "sunpy/util/tests/test_datatype_factory_base.py::test_with_external_registry", "sunpy/util/tests/test_datatype_factory_base.py::test_multiple_match_factory", "su...
[ "sunpy/util/tests/test_datatype_factory_base.py::test_validation_fun_not_callable" ]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
swesmith/sunpy__sunpy.f8edfd5c
Factory registration fails with ValidationFunctionError when validation function found #### Description When registering widgets with the BasicRegistrationFactory, the registration process incorrectly raises a ValidationFunctionError claiming "No proper validation function for class [ClassName] found" even when a val...
joke2k__faker.8b401a7d.combine_module__d5l7upva
diff --git a/faker/providers/ssn/es_CL/__init__.py b/faker/providers/ssn/es_CL/__init__.py index fcfb772..073bbe2 100644 --- a/faker/providers/ssn/es_CL/__init__.py +++ b/faker/providers/ssn/es_CL/__init__.py @@ -4,25 +4,24 @@ from .. import Provider as BaseProvider def rut_check_digit(number: int) -> str: + if...
[ "tests/providers/test_ssn.py::TestEsMX::test_elector_code[woman]", "tests/providers/test_ssn.py::TestEsMX::test_elector_code[man]", "tests/providers/test_ssn.py::TestEsMX::test_elector_code[any]", "tests/providers/test_ssn.py::TestEsMX::test_elector_code_unsupported_gender", "tests/providers/test_ssn.py::Te...
[ "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::Te...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
swesmith/joke2k__faker.8b401a7d
# [Bug]: Variables referenced before assignment in es_CL and es_MX SSN providers ## Description When using the `rut` method from the es_CL provider or the `elector_code` method from the es_MX provider, an `UnboundLocalError` is raised because variables are being referenced before they are assigned. ## Steps/Code to R...
stanfordnlp__string2string.c4a72f59.func_pm_remove_assign__fuaw60vh
diff --git a/string2string/alignment/classical.py b/string2string/alignment/classical.py index 86c8039..0d82452 100644 --- a/string2string/alignment/classical.py +++ b/string2string/alignment/classical.py @@ -1192,13 +1192,8 @@ class LongestCommonSubstring(LongestCommonSubsequence): * It's important to not...
[ "tests/test_alignment.py::AlignmentTestCase::test_longest_common_subsubtring", "tests/test_alignment.py::AlignmentTestCase::test_parallelization" ]
[ "tests/test_alignment.py::AlignmentTestCase::test_dtw", "tests/test_alignment.py::AlignmentTestCase::test_hiirschberg", "tests/test_alignment.py::AlignmentTestCase::test_longest_common_subsequence", "tests/test_alignment.py::AlignmentTestCase::test_needleman_wunsch", "tests/test_alignment.py::AlignmentTestC...
jyangballin/swesmith.x86_64.stanfordnlp_1776_string2string.c4a72f59
swesmith/stanfordnlp__string2string.c4a72f59
### Issue: Longest Common Substring Functionality Not Working as Expected #### Describe the Bug It seems like there's an issue with the `LongestCommonSubstring` class when trying to compute the longest common substring between two strings. The function is not returning the expected candidates, and the results are inc...
pandas-dev__pandas.95280573.func_pm_remove_assign__oec8go09
diff --git a/pandas/util/_decorators.py b/pandas/util/_decorators.py index a1a0d51..125c94f 100644 --- a/pandas/util/_decorators.py +++ b/pandas/util/_decorators.py @@ -390,16 +390,10 @@ def doc(*docstrings: None | str | Callable, **params: object) -> Callable[[F], F for component in params_applied ...
[ "pandas/tests/util/test_doc.py::test_docstring_appending", "pandas/tests/util/test_doc.py::test_doc_template_from_func", "pandas/tests/util/test_doc.py::test_inherit_doc_template" ]
[ "pandas/tests/copy_view/test_util.py::test_get_array_numpy", "pandas/tests/copy_view/test_util.py::test_get_array_masked", "pandas/tests/indexes/multi/test_util.py::TestCartesianProduct::test_simple", "pandas/tests/indexes/multi/test_util.py::TestCartesianProduct::test_datetimeindex", "pandas/tests/indexes/...
jyangballin/swesmith.x86_64.pandas-dev_1776_pandas.95280573
swesmith/pandas-dev__pandas.95280573
Decorated functions missing `_docstring_components` attribute #### Description Functions decorated with the `@doc` decorator are missing the `_docstring_components` attribute that should be set during decoration. This breaks functionality that relies on accessing docstring components from decorated functions. #### S...
python-trio__trio.cfbbe2c1.func_basic__8qso3siw
diff --git a/src/trio/_core/_ki.py b/src/trio/_core/_ki.py index 46a7fdf..5f18338 100644 --- a/src/trio/_core/_ki.py +++ b/src/trio/_core/_ki.py @@ -255,12 +255,12 @@ class KIManager: return def handler(signum: int, frame: types.FrameType | None) -> None: - assert signum == signal.SIG...
[ "src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_ki", "src/trio/_core/_tests/test_ki.py::test_ki_protection_works", "src/trio/_tests/test_repl.py::test_KI_interrupts", "src/trio/_tests/test_repl.py::test_system_exits_in_exc_group", "src/trio/_tests/test_repl.py::test_system_exits_in_nested_exc_gro...
[ "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", "s...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
swesmith/python-trio__trio.cfbbe2c1
KeyboardInterrupt handling broken - signals not properly delivered #### Description SIGINT handling appears to be completely broken. When sending a SIGINT signal, it's not being delivered as a KeyboardInterrupt exception as expected. #### Steps/Code to Reproduce ```python import trio import signal async def main()...
jawah__charset_normalizer.1fdd6463.func_basic__q8ofpkcd
diff --git a/charset_normalizer/md.py b/charset_normalizer/md.py index d177db0..6b00592 100644 --- a/charset_normalizer/md.py +++ b/charset_normalizer/md.py @@ -251,17 +251,17 @@ class SuperWeirdWordPlugin(MessDetectorPlugin): def __init__(self) -> None: self._word_count: int = 0 self._bad_word_c...
[ "tests/test_base_detection.py::test_content_with_bom_or_sig[\\x841\\x953\\xce\\xd2\\xc3\\xbb\\xd3\\xd0\\xc2\\xf1\\xd4\\xb9\\xa3\\xac\\xb4\\xe8\\xed\\xc8\\xb5\\xc4\\xd6\\xbb\\xca\\xc7\\xd2\\xbb\\xd0\\xa9\\xca\\xb1\\xbc\\xe4\\xa1\\xa3-gb18030]", "tests/test_base_detection.py::test_content_with_bom_or_sig[\\xff\\xfe...
[ "tests/test_base_detection.py::test_empty", "tests/test_base_detection.py::test_bool_matches", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xfe\\xff-utf_16]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\x841\\x953-gb18030]", "tests/test_base_detection.py::test_empty_bu...
jyangballin/swesmith.x86_64.jawah_1776_charset_normalizer.1fdd6463
swesmith/jawah__charset_normalizer.1fdd6463
SuperWeirdWordPlugin initialization causes incorrect mess detection #### Description The SuperWeirdWordPlugin in the mess detection module has incorrect default values in its initialization, causing charset detection to fail on various text samples. The plugin starts with wrong initial states that affect the mess det...
pandas-dev__pandas.95280573.func_pm_ctrl_shuffle__4w37t7tm
diff --git a/pandas/core/arrays/_mixins.py b/pandas/core/arrays/_mixins.py index 4e6f20e..cdece4e 100644 --- a/pandas/core/arrays/_mixins.py +++ b/pandas/core/arrays/_mixins.py @@ -330,20 +330,6 @@ class NDArrayBackedExtensionArray(NDArrayBacked, ExtensionArray): # type: ignor @doc(ExtensionArray.fillna) def...
[ "pandas/tests/arrays/categorical/test_missing.py::TestCategoricalMissing::test_fillna_array", "pandas/tests/arrays/test_period.py::test_fillna_raises" ]
[ "pandas/tests/arrays/boolean/test_arithmetic.py::test_add_mul[add]", "pandas/tests/arrays/boolean/test_arithmetic.py::test_add_mul[mul]", "pandas/tests/arrays/boolean/test_arithmetic.py::test_sub", "pandas/tests/arrays/boolean/test_arithmetic.py::test_div", "pandas/tests/arrays/boolean/test_arithmetic.py::t...
jyangballin/swesmith.x86_64.pandas-dev_1776_pandas.95280573
swesmith/pandas-dev__pandas.95280573
fillna with limit parameter not working correctly #### Description The `fillna` method with a `limit` parameter is not working as expected. The limit logic appears to be unreachable due to incorrect code placement. #### Steps/Code to Reproduce ```python import pandas as pd import numpy as np # Create a categorical...
scanny__python-pptx.278b47b1.func_basic__8c833ei4
diff --git a/src/pptx/dml/chtfmt.py b/src/pptx/dml/chtfmt.py index c37e484..b92de73 100644 --- a/src/pptx/dml/chtfmt.py +++ b/src/pptx/dml/chtfmt.py @@ -27,8 +27,8 @@ class ChartFormat(ElementProxy): |FillFormat| instance for this object, providing access to fill properties such as fill color. ...
[ "tests/dml/test_chtfmt.py::DescribeChartFormat::it_provides_access_to_its_fill[fill_fixture0]", "tests/dml/test_chtfmt.py::DescribeChartFormat::it_provides_access_to_its_fill[fill_fixture1]", "tests/dml/test_chtfmt.py::DescribeChartFormat::it_provides_access_to_its_fill[fill_fixture2]", "tests/dml/test_chtfmt...
[ "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAx...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
swesmith/scanny__python-pptx.278b47b1
ChartFormat.fill property returns incorrect element #### Description When accessing the `fill` property on a `ChartFormat` object, it's returning the wrong XML element. The property should provide access to shape properties (`spPr`) for fill formatting, but it's currently accessing line properties instead. #### Step...
pallets__click.fde47b4b.func_basic__0f3ae7fe
diff --git a/src/click/core.py b/src/click/core.py index abe9fa9..714e2e7 100644 --- a/src/click/core.py +++ b/src/click/core.py @@ -1637,19 +1637,19 @@ class Group(Command): (func,) = args args = () - if self.group_class is not None and kwargs.get("cls") is None: + if self.gro...
[ "tests/test_arguments.py::test_nested_subcommand_help", "tests/test_basic.py::test_hidden_group", "tests/test_command_decorators.py::test_group_no_parens", "tests/test_custom_classes.py::test_group_group_class", "tests/test_custom_classes.py::test_group_group_class_self", "tests/test_formatting.py::test_w...
[ "tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.p...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
swesmith/pallets__click.fde47b4b
Group decorator returns None when used without parentheses When using the `@group.group` decorator without parentheses, the decorator returns `None` instead of the expected group object, causing subsequent operations to fail. #### Steps/Code to Reproduce ```python import click @click.group() def cli(): pass @c...
sunpy__sunpy.f8edfd5c.combine_file__wvdsb700
diff --git a/sunpy/coordinates/utils.py b/sunpy/coordinates/utils.py index 6f868af..22b7166 100644 --- a/sunpy/coordinates/utils.py +++ b/sunpy/coordinates/utils.py @@ -84,35 +84,40 @@ class GreatArc: def __init__(self, start, end, center=None, points=None): + # Convert the start, end and center points ...
[ "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start0-end0]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start1-end1]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start2-end2]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[s...
[ "sunpy/coordinates/tests/test_utils.py::test_rectangle_incomplete_input", "sunpy/coordinates/tests/test_utils.py::test_rectangle_invalid_input", "sunpy/coordinates/tests/test_utils.py::test_rectangle_all_parameters_passed", "sunpy/coordinates/tests/test_utils.py::test_rectangle_mismatching_frames_missing_para...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
swesmith/sunpy__sunpy.f8edfd5c
GreatArc initialization broken due to attribute access before definition When creating a GreatArc object, the initialization fails because the code tries to access attributes that haven't been defined yet. #### Steps/Code to Reproduce ```python from sunpy.coordinates.utils import GreatArc from sunpy.coordinates impo...
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__sez99adj
diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py index 14e3c3e..7fd365f 100644 --- a/src/sqlfluff/cli/commands.py +++ b/src/sqlfluff/cli/commands.py @@ -942,11 +942,6 @@ def _paths_fix( if c in ("y", "\r", "\n"): if formatter.verbosity >= 0: cli...
[ "test/cli/commands_test.py::test__cli__command_lint_parse[command18]", "test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command0-1]", "test/cli/commands_test.py::test__cli__command_lint_parse_with_retcode[command1-1]", "test/cli/commands_test.py::test__cli__command_lint_parse_with_retcod...
[ "test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_no_dialect[command0]", "test/cli/commands_test.py::test__cli__command_no_dialect[command1]", "test/cli/commands_test.py::test__cli__command_no_dia...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
swesmith/sqlfluff__sqlfluff.50a1c4b6
#### Description The `sqlfluff fix` command crashes with a `NameError` when attempting to fix SQL files. The error occurs because variables are being referenced before they are defined in the fix command logic. #### Steps/Code to Reproduce ```bash # Create a simple SQL file with linting issues echo "select * fro...
kurtmckee__feedparser.cad965a3.pr_354
diff --git a/feedparser/api.py b/feedparser/api.py index 1c9cf15..d2f5f98 100644 --- a/feedparser/api.py +++ b/feedparser/api.py @@ -26,11 +26,13 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. +import datetime import io +import time import urllib.erro...
[ "tests/test_well_formed.py::test_http_conditions[info4]", "tests/test_well_formed.py::test_http_conditions[info28]", "tests/test_well_formed.py::test_http_conditions[info62]", "tests/test_well_formed.py::test_http_conditions[info84]", "tests/test_well_formed.py::test_http_conditions[info50]", "tests/test_...
[ "tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category"...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
swesmith/kurtmckee__feedparser.cad965a3
### HTTP Header Handling Issue in Feedparser #### Description It seems there's an issue with how HTTP headers are being processed in the latest update. When attempting to parse feeds, the expected behavior of handling HTTP headers like `ETag` and `Last-Modified` is not functioning correctly. This results in unexpecte...
encode__starlette.db5063c2.func_pm_ctrl_shuffle__gvkb5ynp
diff --git a/starlette/middleware/exceptions.py b/starlette/middleware/exceptions.py index d708929..b59d9e3 100644 --- a/starlette/middleware/exceptions.py +++ b/starlette/middleware/exceptions.py @@ -21,17 +21,16 @@ class ExceptionMiddleware: handlers: typing.Mapping[typing.Any, typing.Callable[[Request, Exce...
[ "tests/test_applications.py::test_subdomain_route[asyncio]", "tests/test_applications.py::test_500[asyncio]", "tests/test_applications.py::test_middleware[asyncio]", "tests/test_applications.py::test_subdomain_route[trio]", "tests/test_applications.py::test_500[trio]", "tests/test_applications.py::test_mi...
[ "tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/mid...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
swesmith/encode__starlette.db5063c2
ExceptionMiddleware initialization order causes AttributeError when adding handlers #### Description When initializing ExceptionMiddleware with custom handlers, an AttributeError is raised because `_status_handlers` is accessed before it's defined. #### Steps/Code to Reproduce ```python from starlette.middleware.ex...
pygments__pygments.27649ebb.pr_2419
diff --git a/pygments/lexers/elpi.py b/pygments/lexers/elpi.py index 3b73436..4e4c490 100644 --- a/pygments/lexers/elpi.py +++ b/pygments/lexers/elpi.py @@ -10,7 +10,7 @@ from pygments.lexer import RegexLexer, bygroups, include, using from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - ...
[ "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/t...
[]
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
swesmith/pygments__pygments.27649ebb
### Describe the bug It seems there's an issue with the ElpiLexer in the Pygments library. After a recent change, the lexer is unable to recognize certain punctuation tokens, leading to a `NameError`. This is causing problems when trying to process Elpi code, as the lexer fails to correctly tokenize the input. ### Ho...
tobymao__sqlglot.036601ba.func_pm_op_swap__khiwmi1i
diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py index 3ab987d..b8382d9 100644 --- a/sqlglot/optimizer/qualify_columns.py +++ b/sqlglot/optimizer/qualify_columns.py @@ -611,7 +611,7 @@ def _expand_stars( pivot_exclude_columns = None pivot = t.cast(t.Optional[exp.Pivot...
[ "tests/test_optimizer.py::TestOptimizer::test_canonicalize", "tests/test_optimizer.py::TestOptimizer::test_expand_alias_refs", "tests/test_optimizer.py::TestOptimizer::test_file_schema", "tests/test_optimizer.py::TestOptimizer::test_lateral_annotation", "tests/test_optimizer.py::TestOptimizer::test_merge_su...
[ "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_bra...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
swesmith/tobymao__sqlglot.036601ba
AttributeError: 'NoneType' object has no attribute 'alias_column_names' in qualify_columns optimizer #### Description When running SQL optimization with certain pivot operations, the qualify_columns optimizer throws an AttributeError because it tries to access the `alias_column_names` attribute on a None object. ###...
cknd__stackprinter.219fcc52.func_pm_class_rm_funcs__l85sx3ii
diff --git a/stackprinter/frame_formatting.py b/stackprinter/frame_formatting.py index 136920e..da95719 100644 --- a/stackprinter/frame_formatting.py +++ b/stackprinter/frame_formatting.py @@ -282,9 +282,6 @@ class ColorfulFrameFormatter(FrameFormatter): super().__init__(**kwargs) - def tpl(self, name):...
[ "tests/test_formatting.py::test_exception_formatting" ]
[ "tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match" ...
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
swesmith/cknd__stackprinter.219fcc52
ColorfulFrameFormatter missing tpl method after refactoring #### Description After some recent changes, the `ColorfulFrameFormatter` class is missing the `tpl` method which causes an `AttributeError` when trying to format exceptions with colored output. #### Steps/Code to Reproduce ```python import stackprinter # ...
Mimino666__langdetect.a1598f1a.func_basic__s4s0fk2j
diff --git a/langdetect/utils/ngram.py b/langdetect/utils/ngram.py index ee82e38..d2a61cb 100644 --- a/langdetect/utils/ngram.py +++ b/langdetect/utils/ngram.py @@ -65,35 +65,34 @@ class NGram(object): def normalize(cls, ch): block = unicode_block(ch) if block == UNICODE_BASIC_LATIN: - ...
[ "langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector4", "langdetect/tests/utils/test_ngram.py::NGramTest::test_ngram", "langdetect/tests/utils/test_ngram.py::NGramTest::test_normalize_for_romanian", "langdetect/tests/utils/test_ng...
[ "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_factory_from_json_string", "langdetect/tests/test_detector.py::DetectorTest::test_lang_list", "langdetect/tests/test_la...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
swesmith/Mimino666__langdetect.a1598f1a
Character normalization broken for multiple Unicode blocks #### Description The character normalization in NGram is producing incorrect results for various Unicode blocks. Characters that should be normalized to specific values are either being left unchanged when they should be modified, or being normalized to wrong...
alecthomas__voluptuous.a7a55f83.func_basic__ykbybegn
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..8240213 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -976,7 +976,7 @@ class Marker(object): return str(self.schema) def __repr__(self): - return repr(self.schema) + re...
[ "voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_required" ]
[ "voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests.py::test_in", "voluptuous/tests/tests.py::test_in_unsortable_container...
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
swesmith/alecthomas__voluptuous.a7a55f83
Marker.__repr__ returns string representation instead of proper repr #### Description When using `Required` keys in schema validation, the error messages are not displaying the key names with proper quotes. The `Marker` class's `__repr__` method is returning a string representation instead of a proper repr, which aff...
sunpy__sunpy.f8edfd5c.func_pm_remove_cond__dfisbbrd
diff --git a/sunpy/util/logger.py b/sunpy/util/logger.py index 774d89f..19097f1 100644 --- a/sunpy/util/logger.py +++ b/sunpy/util/logger.py @@ -20,10 +20,6 @@ class SunpyLogger(AstropyLogger): def _showwarning(self, *args, **kwargs): - # Bail out if we are not catching a warning from SunPy - if ...
[ "sunpy/util/tests/test_logger.py::test_sunpy_warnings_logging" ]
[ "sunpy/util/tests/test_logger.py::test_logger_name", "sunpy/util/tests/test_logger.py::test_is_the_logger_there", "sunpy/util/tests/test_logger.py::test_is_level_configured", "sunpy/util/tests/test_logger.py::test_is_log_to_file_configured", "sunpy/util/tests/test_logger.py::test_origin" ]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
swesmith/sunpy__sunpy.f8edfd5c
SunpyLogger not handling non-SunPy warnings properly #### Description The SunpyLogger's `_showwarning` method is no longer filtering out non-SunPy warnings, causing issues with warning handling behavior. When warnings that are not instances of `SunpyWarning` are issued, they are being processed by the SunPy logger in...
PyCQA__flake8.cf1542ce.func_pm_remove_assign__cyq5vtse
diff --git a/src/flake8/options/manager.py b/src/flake8/options/manager.py index 4fd26b2..0860715 100644 --- a/src/flake8/options/manager.py +++ b/src/flake8/options/manager.py @@ -136,11 +136,9 @@ class Option: self.default = default self.type = type self.dest = dest - self.nargs = na...
[ "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_main.py::test_form_feed_line_split", "tests/integration/test_main.py::test_e101_indent_char_does_not_reset", "tests/integration/test_main.py::test_statistics_option", "tests/integration/test_main.py::test_show_source_option", ...
[ "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_gen]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_list]", "tests/integration/test_checker.py::test_line_check_results[plugin_func_p...
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
swesmith/PyCQA__flake8.cf1542ce
Option attributes missing after initialization #### Description When creating Option instances, some attributes are not being properly set during initialization, causing AttributeError when accessing them later. #### Steps/Code to Reproduce ```python from flake8.options.manager import Option # Create an option wit...
seperman__deepdiff.ed252022.func_pm_remove_cond__p206nuo0
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..4cda895 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -1656,9 +1656,6 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): if self.type_check_func(level.t1, type_group) and self.type_check_func(level.t2, type_g...
[ "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_command.py::TestCommands::test_command_math_epsilon", "tests/test_del...
[ "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::TestCac...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
swesmith/seperman__deepdiff.ed252022
DeepDiff comparison fails for many data types after recent changes I'm getting unexpected behavior when comparing various data types with DeepDiff. It seems like the comparison logic is not working properly for many common scenarios. #### Steps/Code to Reproduce ```python from deepdiff import DeepDiff import numpy a...
mozilla__bleach.73871d76.combine_file__omyrysqs
diff --git a/bleach/_vendor/html5lib/serializer.py b/bleach/_vendor/html5lib/serializer.py index 5666f49..cf63b76 100644 --- a/bleach/_vendor/html5lib/serializer.py +++ b/bleach/_vendor/html5lib/serializer.py @@ -229,11 +229,11 @@ class HTMLSerializer(object): return string def encodeStrict(self, st...
[ "tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-False-<!--comment-->text]", "tests/test_clean.py::test_comments[text<!--comment-->-False-text<!--co...
[ "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_nofo...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
swesmith/mozilla__bleach.73871d76
HTMLSerializer encodeStrict method breaks with string encoding changes #### Description The HTMLSerializer's encodeStrict method has incorrect logic that causes encoding failures when processing text strings. The method now incorrectly asserts that input should NOT be a text_type and applies wrong encoding behavior. ...
Mimino666__langdetect.a1598f1a.combine_module__2q2ur4nm
diff --git a/langdetect/utils/messages.py b/langdetect/utils/messages.py index 6af3eb5..1622c61 100644 --- a/langdetect/utils/messages.py +++ b/langdetect/utils/messages.py @@ -20,4 +20,4 @@ def get_string(key): global _messages if _messages is None: _messages = Messages() - return _messages.get_s...
[ "langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_detector4", "langdetect/tests/utils/test_ngram.py::N...
[ "langdetect/tests/test_detector.py::DetectorTest::test_factory_from_json_string", "langdetect/tests/test_detector.py::DetectorTest::test_lang_list", "langdetect/tests/test_language.py::LanguageTest::test_cmp", "langdetect/tests/test_language.py::LanguageTest::test_language", "langdetect/tests/utils/test_lan...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
swesmith/Mimino666__langdetect.a1598f1a
NGram normalization produces incorrect results for various character types #### Description The NGram character normalization is producing unexpected results for different Unicode character blocks. When processing text through the language detection pipeline, characters are being normalized to incorrect values, causi...
seperman__deepdiff.ed252022.lm_rewrite__57akt828
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..18540b6 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -1575,15 +1575,22 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): self._report_result('type_changes', level, local_tree=local_tree) def _count_diff(self...
[ "tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "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_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::TestCac...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
swesmith/seperman__deepdiff.ed252022
**Unexpected Behavior in DeepDiff with Cache Tuning** **Describe the bug** It seems that the recent changes to the `_count_diff` method in the DeepDiff class have introduced an issue with how differences are counted and cached. The auto-tuning of the cache appears to be affecting the final results unexpectedly. **To ...
pydata__patsy.a5d16484.func_pm_ctrl_invert_if__onrr8wpf
diff --git a/patsy/parse_formula.py b/patsy/parse_formula.py index 1a324f7..81e1523 100644 --- a/patsy/parse_formula.py +++ b/patsy/parse_formula.py @@ -90,11 +90,10 @@ def _tokenize_formula(code, operator_strings): it = PushbackAdapter(python_tokenize(code)) for pytype, token_string, origin in it: i...
[ "patsy/desc.py::test_ModelDesc_from_formula", "patsy/desc.py::test_eval_formula", "patsy/desc.py::test_eval_formula_error_reporting", "patsy/desc.py::test_formula_factor_origin", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgc...
[ "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/bui...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
swesmith/pydata__patsy.a5d16484
Formula parsing fails with KeyError when magic tokens are encountered #### Description When parsing formulas that contain magic tokens (like `~`, `+`, `-`, etc.), the formula parser is throwing KeyError exceptions instead of properly tokenizing the formula. This affects basic formula parsing functionality. #### Step...
mozillazg__python-pinyin.e42dede5.lm_rewrite__kcs7ts4t
diff --git a/pypinyin/seg/mmseg.py b/pypinyin/seg/mmseg.py index f35eb1c..60f39ef 100644 --- a/pypinyin/seg/mmseg.py +++ b/pypinyin/seg/mmseg.py @@ -21,49 +21,28 @@ class Seg(object): :param text: 待分词的文本 :yield: 单个词语 """ - remain = text - while remain: - matched = '' ...
[ "tests/contrib/test_mmseg.py::test_phrases", "tests/contrib/test_mmseg.py::test_seg_long" ]
[ "pypinyin/core.py::pypinyin.core.lazy_pinyin", "pypinyin/core.py::pypinyin.core.pinyin", "pypinyin/core.py::pypinyin.core.slug", "pypinyin/style/_tone_convert.py::pypinyin.style._tone_convert.to_finals", "pypinyin/style/_tone_convert.py::pypinyin.style._tone_convert.to_finals_tone", "pypinyin/style/_tone_...
jyangballin/swesmith.x86_64.mozillazg_1776_python-pinyin.e42dede5
swesmith/mozillazg__python-pinyin.e42dede5
# Incorrect word segmentation in mmseg.py ### Problem I've found an issue with the word segmentation in the `mmseg.py` module. The segmentation algorithm is not correctly handling multi-character words and phrases. When segmenting Chinese text, it's incorrectly splitting words that should be kept together. For exampl...
scanny__python-pptx.278b47b1.combine_module__meksi99n
diff --git a/src/pptx/shapes/picture.py b/src/pptx/shapes/picture.py index 5918286..599957d 100644 --- a/src/pptx/shapes/picture.py +++ b/src/pptx/shapes/picture.py @@ -47,7 +47,7 @@ class _BasePicture(BaseShape): @crop_left.setter def crop_left(self, value: float): - self._pic.srcRect_l = value + ...
[ "tests/shapes/test_picture.py::Describe_BasePicture::it_can_change_its_cropping[crop_set_fixture0]", "tests/shapes/test_picture.py::Describe_BasePicture::it_can_change_its_cropping[crop_set_fixture4]", "tests/shapes/test_picture.py::Describe_BasePicture::it_can_change_its_cropping[crop_set_fixture8]", "tests/...
[ "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAx...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
swesmith/scanny__python-pptx.278b47b1
Picture crop_left property produces incorrect values #### Description When setting the `crop_left` property on a picture shape, the resulting crop values are incorrect. The property appears to be applying some unexpected transformation to the input value. #### Steps/Code to Reproduce ```python from pptx import Pres...
python-openxml__python-docx.0cf6d71f.func_basic__m7kdmq84
diff --git a/src/docx/oxml/table.py b/src/docx/oxml/table.py index e38d585..9f64177 100644 --- a/src/docx/oxml/table.py +++ b/src/docx/oxml/table.py @@ -865,7 +865,7 @@ class CT_TcPr(BaseOxmlElement): """The value of the ./w:vMerge/@val attribute, or |None| if the w:vMerge element is not present.""" ...
[ "tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[2-1-1-top-0]", "tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[4-2-1-top-1]", "tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[1-0-0-bottom-1]", "tests/oxml/test_table.py::DescribeCT_Tc::it_know...
[ "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:...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
swesmith/python-openxml__python-docx.0cf6d71f
Table cell vertical merge detection broken #### Description When working with table cells that have vertical merge properties, the `vMerge_val` property returns `None` even when a `w:vMerge` element is present in the cell properties. #### Steps/Code to Reproduce ```python from docx import Document from docx.shared ...
sunpy__sunpy.f8edfd5c.func_pm_op_break_chains__o9vguecm
diff --git a/sunpy/map/header_helper.py b/sunpy/map/header_helper.py index 4b12bc6..4fe890a 100644 --- a/sunpy/map/header_helper.py +++ b/sunpy/map/header_helper.py @@ -156,7 +156,7 @@ def _set_rotation_params(meta_wcs, rotation_angle, rotation_matrix): lam = meta_wcs['cdelt2'] / meta_wcs['cdelt1'] p ...
[ "sunpy/map/tests/test_header_helper.py::test_rotation_angle_rectangular_pixels" ]
[ "sunpy/map/tests/test_header_helper.py::test_scale_conversion", "sunpy/map/tests/test_header_helper.py::test_default_rotation", "sunpy/map/tests/test_header_helper.py::test_rotation_angle", "sunpy/map/tests/test_header_helper.py::test_rotation_matrix", "sunpy/map/tests/test_header_helper.py::test_hpc_header...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
swesmith/sunpy__sunpy.f8edfd5c
Rotation matrix calculation incorrect for rectangular pixels When creating a FITS WCS header with rectangular pixels (different x and y scales) and a rotation angle, the rotation matrix calculation produces incorrect results. The PC matrix values don't match the expected transformation for non-square pixels. #### Ste...
python-openxml__python-docx.0cf6d71f.func_basic__92vp2dh6
diff --git a/src/docx/oxml/coreprops.py b/src/docx/oxml/coreprops.py index 8ba9ff4..aec42b4 100644 --- a/src/docx/oxml/coreprops.py +++ b/src/docx/oxml/coreprops.py @@ -180,7 +180,7 @@ class CT_CoreProperties(BaseOxmlElement): @title_text.setter def title_text(self, value: str): - self._set_element_t...
[ "tests/opc/parts/test_coreprops.py::DescribeCorePropertiesPart::it_can_create_a_default_core_properties_part", "tests/opc/test_coreprops.py::DescribeCoreProperties::it_can_change_the_string_property_values[title-dc:title-Dissertation]" ]
[ "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:...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
swesmith/python-openxml__python-docx.0cf6d71f
Document title gets reversed when setting core properties #### Description When setting the title property on a document's core properties, the title text gets reversed (characters in reverse order). #### Steps/Code to Reproduce ```python from docx import Document # Create a new document doc = Document() # Set th...