selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
6,200
swe_smith::train::38429
swe_smith
train
38,429
dbader__schedule.82a43db1.func_pm_remove_cond__ad9botmz
swesmith/dbader__schedule.82a43db1
dbader/schedule
python
null
Job scheduling fails with UnboundLocalError for hourly jobs with timezone #### Description When scheduling hourly jobs with timezone using the `.at()` method, the scheduler raises an `UnboundLocalError` because the `hour` variable is not defined in certain code paths. #### Steps/Code to Reproduce ```python import s...
diff --git a/schedule/__init__.py b/schedule/__init__.py index 8e12eeb..09a272f 100644 --- a/schedule/__init__.py +++ b/schedule/__init__.py @@ -498,28 +498,6 @@ class Job: if tz is not None: import pytz - if isinstance(tz, str): - self.at_time_zone = pytz.timezone(tz) ...
["test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_gap", "test_schedule.py::SchedulerTests::test_at_time", "test_schedule.py::SchedulerTests::test_at_time_hour", "test_schedule.py::SchedulerTests::test_next_run_time_hour_end_katmandu", "test_schedule.py::SchedulerTests::test_time_units", "test_schedule....
["test_schedule.py::SchedulerTests::test_align_utc_offset_after_fold_fixate", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_change", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold", "test_schedule.py::SchedulerT...
jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1
true
null
1
26
32
1,073
0
0.6
1
0.75
1
0.2655
81.0715
6,201
swe_smith::train::51692
swe_smith
train
51,692
pydicom__pydicom.7d361b3d.func_basic__1jsvoc9g
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
DSfloat constructor fails with AttributeError on 'original_str' #### Description When creating DSfloat objects, the constructor is failing with an AttributeError because it's trying to access `original_str` instead of `original_string`. #### Steps/Code to Reproduce ```python from pydicom.valuerep import DSfloat # ...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..a15d8e6 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -1041,50 +1041,44 @@ class DSfloat(float): value later. """ if validation_mode is None: - validation_mode = config.settings.re...
["tests/test_charset.py::TestCharset::test_standard_file", "tests/test_charset.py::TestCharset::test_invalid_character_set", "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[chrJapMu...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
36
93
872
0
0.6
1
0.75
1
0.265333
81.071
6,202
swe_smith::train::28171
swe_smith
train
28,171
Mimino666__langdetect.a1598f1a.combine_file__coepipoj
swesmith/Mimino666__langdetect.a1598f1a
mimino666/langdetect
python
null
**Language detection not working after recent changes** **Describe the bug** After recent changes to the `DetectorFactory` class, language detection is completely broken. The detector is not properly initializing and returns `None` instead of detecting languages. **To Reproduce** Here's a simple script to reproduce t...
diff --git a/langdetect/detector_factory.py b/langdetect/detector_factory.py index e026161..9180a87 100644 --- a/langdetect/detector_factory.py +++ b/langdetect/detector_factory.py @@ -29,8 +29,8 @@ class DetectorFactory(object): seed = None def __init__(self): - self.word_lang_prob_map = {} - ...
["langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_detector4", "langdetect/tests/test_detector.py::DetectorTest::t...
["langdetect/tests/test_language.py::LanguageTest::test_cmp", "langdetect/tests/test_language.py::LanguageTest::test_language", "langdetect/tests/utils/test_lang_profile.py::LangProfileText::test_add", "langdetect/tests/utils/test_lang_profile.py::LangProfileText::test_add_illegally1", "langdetect/tests/utils/test_lang...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
true
null
1
10
6
1,392
0
0.6
1
0.75
1
0.265333
81.071
6,203
swe_smith::train::10026
swe_smith
train
10,026
google__textfsm.c31b6007.lm_rewrite__cncw6efa
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
### Issue: AttributeError in CliTable Methods I've encountered an issue with the `CliTable` methods after a recent update. It seems like there's an `AttributeError` being raised when trying to execute certain operations. #### Problem The problem arises when attempting to use methods like `AddKey`, `KeyValue`, and `Pa...
diff --git a/textfsm/parser.py b/textfsm/parser.py index c00c976..d25cd03 100755 --- a/textfsm/parser.py +++ b/textfsm/parser.py @@ -1060,20 +1060,14 @@ class TextFSM(object): """Remove all record entries.""" _ = [value.ClearAllVar() for value in self.values] - def GetValuesByAttrib(self, attribute): +def ...
["tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testKeyValue", "tests/clitable_test.py::UnitTestCliTable::testParseCmd", "tests/clitable_test.py::UnitTestCliTable::testParseCmdFromIndex", "tests/clitable_test.py::UnitTestCliTable::testParseCmdItem", "tests/clitable_te...
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.py::UnitTestCliTable::testCompletion", "tests/clitable_te...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
12
10
1,352
0
0.6
1
0.75
1
0.265333
81.071
6,204
swe_smith::train::20385
swe_smith
train
20,385
gruns__furl.da386f68.lm_rewrite__nkij6kg7
swesmith/gruns__furl.da386f68
gruns/furl
python
null
# furl.origin returns None for URLs without a host I'm having an issue with the `origin` property of the `furl` class. When working with URLs that don't have a host component, the `origin` property returns `None` instead of a string representation. ## Reproduction ```python from furl import furl # This used to work...
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..a838f6a 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -1538,15 +1538,26 @@ class furl(URLPathCompositionInterface, QueryCompositionInterface, @property def origin(self): - port = '' + """ + Returns the origin of this URL, which i...
["tests/test_furl.py::TestFurl::test_origin"]
["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_asdict", "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::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_it...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
25
1
1,092
0
0.6
1
0.75
1
0.265333
81.071
6,205
swe_smith::train::32834
swe_smith
train
32,834
pydantic__pydantic.acb0f10f.pr_10059
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# Bug: `has_instance_in_type` function missing `type_args` variable ## Description I found a bug in the `has_instance_in_type` function in `pydantic/_internal/_generics.py`. The function tries to use a variable `type_args` that is not defined anywhere in the function scope. This causes errors when working with gener...
diff --git a/pydantic/_internal/_generics.py b/pydantic/_internal/_generics.py index ad8af1a..4f8fc00 100644 --- a/pydantic/_internal/_generics.py +++ b/pydantic/_internal/_generics.py @@ -206,6 +206,21 @@ def get_origin(v: Any) -> Any: return typing_extensions.get_origin(v) +def has_instance_in_type(type_: An...
["tests/test_docs.py::test_docstrings_examples[pydantic/_internal/_generics.py:256-263]"]
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
23
1
1,132
0
0.6
1
0.75
1
0.265333
81.071
6,206
swe_smith::train::19627
swe_smith
train
19,627
kurtmckee__feedparser.cad965a3.combine_file__bw2ht1b4
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
# Media RSS namespace handling issues with restrictions and title depth ## Description I've found a bug in the Media RSS namespace handling. When parsing feeds with media:restriction elements, the parser fails with a KeyError for 'restriction'. Additionally, there seems to be an issue with the title depth handling in...
diff --git a/feedparser/namespaces/mediarss.py b/feedparser/namespaces/mediarss.py index b057580..d02ea97 100644 --- a/feedparser/namespaces/mediarss.py +++ b/feedparser/namespaces/mediarss.py @@ -55,7 +55,7 @@ class Namespace: def _end_media_title(self): title_depth = self.title_depth self._end_...
["tests/test_well_formed.py::test_strict_parser[info1147]", "tests/test_well_formed.py::test_loose_parser[info1146]", "tests/test_well_formed.py::test_strict_parser[info1146]", "tests/test_well_formed.py::test_loose_parser[info1147]"]
["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
1
6
4
1,472
0
0.6
1
0.75
1
0.265333
81.071
6,207
swe_smith::train::33081
swe_smith
train
33,081
django-money__django-money.835c1ab8.combine_module__130ydp62
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
Money field operations broken after recent changes #### Description Money field operations are failing with AttributeError when trying to access basic attributes on queryset results. This affects filtering, updating, and other database operations with Money fields. #### Steps/Code to Reproduce ```python from djmone...
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index dc5f6ad..209504c 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -33,10 +33,10 @@ def get_value(obj, expr): if isinstance(expr, F): expr = getattr(obj, expr.name) else: - expr = expr.value + e...
["tests/test_form.py::test_save", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs0-expected0]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs1-expected1]", "tests/test_models.py::TestVanillaMoneyField::test_creat...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
2
13
164
1,331
0
0.6
1
0.75
1
0.265167
81.0705
6,208
swe_smith::train::35839
swe_smith
train
35,839
stanfordnlp__dspy.651a4c71.func_pm_remove_wrapper__01qe5ve7
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# ImportError when using Databricks finetuning ## Description I believe there's a bug in the Databricks provider implementation for finetuning. When trying to finetune a model using the Databricks provider, I'm getting an ImportError because the code is trying to use the `foundation_model` module without first import...
diff --git a/dspy/clients/databricks.py b/dspy/clients/databricks.py index 427accf..891c2f3 100644 --- a/dspy/clients/databricks.py +++ b/dspy/clients/databricks.py @@ -189,14 +189,6 @@ class DatabricksProvider(Provider): train_data, train_kwargs["train_data_path"], train_data_format ) - ...
["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"]
["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
9
4
1,411
0
0.6
1
0.75
1
0.265167
81.0705
6,209
swe_smith::train::9908
swe_smith
train
9,908
matthewwithanm__python-markdownify.6258f5c3.func_pm_class_rm_funcs__cj9nb7no
swesmith/matthewwithanm__python-markdownify.6258f5c3
matthewwithanm/python-markdownify
python
null
Missing methods cause AttributeError when converting HTML tags #### Description After a recent change, the markdownify library is throwing `AttributeError` exceptions when trying to convert HTML content. The converter seems to be missing several essential methods that were previously available. #### Steps/Code to Re...
diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 3272ce5..79652d2 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -221,17 +221,6 @@ class MarkdownConverter(object): raise AttributeError(attr) - def should_convert_tag(self, tag): - tag = tag.lower() - ...
["tests/test_advanced.py::test_chomp", "tests/test_advanced.py::test_nested", "tests/test_advanced.py::test_ignore_comments_with_other_tags", "tests/test_advanced.py::test_code_with_tricky_content", "tests/test_args.py::test_strip", "tests/test_args.py::test_do_not_strip", "tests/test_args.py::test_convert", "tests/tes...
["tests/test_advanced.py::test_ignore_comments", "tests/test_advanced.py::test_special_tags", "tests/test_basic.py::test_single_tag", "tests/test_basic.py::test_soup", "tests/test_basic.py::test_whitespace", "tests/test_conversions.py::test_div", "tests/test_conversions.py::test_head", "tests/test_escaping.py::test_ast...
jyangballin/swesmith.x86_64.matthewwithanm_1776_python-markdownify.6258f5c3
true
null
1
18
61
1,231
0
0.6
1
0.75
1
0.265167
81.0705
6,210
swe_smith::train::14294
swe_smith
train
14,294
python-openxml__python-docx.0cf6d71f.func_pm_ctrl_shuffle__l8c1cucv
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
TabStops indexing broken after code reorganization #### Description When trying to access tab stops by index using `tab_stops[idx]`, the code fails with a `NameError` because variables are referenced before they are defined. #### Steps/Code to Reproduce ```python from docx import Document from docx.text.tabstops im...
diff --git a/src/docx/text/tabstops.py b/src/docx/text/tabstops.py index 824085d..f3fb88c 100644 --- a/src/docx/text/tabstops.py +++ b/src/docx/text/tabstops.py @@ -29,13 +29,12 @@ class TabStops(ElementProxy): self._pPr.remove(tabs) def __getitem__(self, idx): - """Enables list-style access ...
["tests/text/test_tabstops.py::DescribeTabStops::it_can_get_a_tab_stop_by_index[index_fixture0]", "tests/text/test_tabstops.py::DescribeTabStops::it_can_get_a_tab_stop_by_index[index_fixture1]", "tests/text/test_tabstops.py::DescribeTabStops::it_can_get_a_tab_stop_by_index[index_fixture2]", "tests/text/test_tabstops.py...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
7
4
1,451
0
0.6
1
0.75
1
0.265167
81.0705
6,211
swe_smith::train::32125
swe_smith
train
32,125
davidhalter__parso.338a5760.func_pm_class_rm_funcs__asjhqil4
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
ImportFrom methods missing after refactoring #### Description After some recent changes, `ImportFrom` nodes are missing critical methods that were previously available. When trying to access import alias information or parse import statements, several methods that used to exist are no longer available. #### Steps/Co...
diff --git a/parso/python/tree.py b/parso/python/tree.py index 0624e67..5014eb4 100644 --- a/parso/python/tree.py +++ b/parso/python/tree.py @@ -831,11 +831,6 @@ class ImportFrom(Import): """ return [alias or name for name, alias in self._as_name_tuples()] - def _aliases(self): - """Mappin...
["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_issues_files.py:...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
23
7
1,131
0
0.6
1
0.75
1
0.265167
81.0705
6,212
swe_smith::train::5081
swe_smith
train
5,081
agronholm__exceptiongroup.0b4f4937.combine_file__s0m5ibx3
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
ExceptionGroup.subgroup() returns incorrect results #### Description The `subgroup()` method on ExceptionGroup instances is returning unexpected results. When filtering exceptions, it appears to be returning the wrong subgroups or None when it should return valid subgroups. #### Steps/Code to Reproduce ```python fr...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..e6be7c2 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -110,7 +110,9 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]): @property def message(sel...
["tests/test_catch.py::test_catch_handler_raises", "tests/test_exceptions.py::ExceptionGroupFields::test_basics_ExceptionGroup_fields", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predicate__match", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predi...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
16
31
1,271
0
0.6
1
0.75
1
0.265167
81.0705
6,213
r2e_gym::train::77
r2e_gym
train
77
orange3__8226727eec78794ec1dd7b0e338de7c65ef60474
orange3
biolab/orange3
python
8226727eec78794ec1dd7b0e338de7c65ef60474
**Title:** AttributeError When Scoring Predictions with Missing Target Values **Description:** When attempting to score predictions using a dataset that includes instances with missing target values, the application encounters an `AttributeError`. Specifically, the system tries to access a `missing_targets` attribute ...
diff --git a/Orange/widgets/evaluate/owpredictions.py b/Orange/widgets/evaluate/owpredictions.py --- a/Orange/widgets/evaluate/owpredictions.py +++ b/Orange/widgets/evaluate/owpredictions.py @@ -65,6 +65,8 @@ empty_data = Msg("Empty dataset") wrong_targets = Msg( "Some model(s) predict a ...
diff --git a/Orange/widgets/evaluate/tests/test_owpredictions.py b/Orange/widgets/evaluate/tests/test_owpredictions.py --- a/Orange/widgets/evaluate/tests/test_owpredictions.py +++ b/Orange/widgets/evaluate/tests/test_owpredictions.py @@ -11,6 +11,7 @@ from Orange.base import Model from Orange.classification import L...
null
null
namanjain12/orange3_final:8226727eec78794ec1dd7b0e338de7c65ef60474
true
null
1
40
null
1,503
0
0.75
1
0.6375
1
0.383833
81.07025
6,214
swe_smith::train::48362
swe_smith
train
48,362
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__csdfb2s7
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Bracketed grammar parser fails with undefined variable error #### Description The Bracketed grammar parser is throwing `UnboundLocalError` when trying to parse bracketed expressions. The error occurs because some variables are being referenced before they are defined in the parsing logic. #### Steps/Code to Reproduc...
diff --git a/src/sqlfluff/core/parser/grammar/sequence.py b/src/sqlfluff/core/parser/grammar/sequence.py index fabc0c1..69df018 100644 --- a/src/sqlfluff/core/parser/grammar/sequence.py +++ b/src/sqlfluff/core/parser/grammar/sequence.py @@ -483,11 +483,6 @@ class Bracketed(Sequence): the content of the brack...
["test/core/parser/grammar/grammar_sequence_test.py::test__parser__grammar_bracketed_modes[input_seed0-ParseMode.STRICT-sequence0-kwargs0-output_tuple0]", "test/core/parser/grammar/grammar_sequence_test.py::test__parser__grammar_bracketed_modes[input_seed1-ParseMode.GREEDY-sequence1-kwargs1-output_tuple1]", "test/core/...
["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar__oneof__copy", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[True]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[False]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser_...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
15
18
1,290
0
0.6
1
0.75
1
0.265
81.07
6,215
swe_smith::train::1933
swe_smith
train
1,933
agronholm__typeguard.b6a7e438.func_pm_remove_wrapper__q7zhg0en
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Union type checking not working for Type[Union[...]] I noticed that when using `Type[Union[...]]` annotations, the type checking doesn't work properly. The code doesn't check against each type in the union as it should. ## Steps to reproduce Here's a simple example that demonstrates the issue: ```python from typi...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..273fc89 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -481,29 +481,9 @@ def check_class( check_typevar(value, expected_class, (), memo, subclass_check=True) elif get_origin(expected_class) is ...
["tests/test_checkers.py::TestType::test_union_fail"]
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
20
1
1,190
0
0.6
1
0.75
1
0.265
81.07
6,216
swe_smith::train::24077
swe_smith
train
24,077
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__slfv78i3
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
prime_meridian function raises UnboundLocalError when axes frame lacks observer #### Description The `prime_meridian` function in `sunpy.visualization.drawing` raises an `UnboundLocalError` instead of the expected `ValueError` when the coordinate frame of the WCSAxes does not have an observer. #### Steps/Code to Rep...
diff --git a/sunpy/visualization/drawing.py b/sunpy/visualization/drawing.py index e1996d6..a0083c5 100644 --- a/sunpy/visualization/drawing.py +++ b/sunpy/visualization/drawing.py @@ -155,6 +155,22 @@ def equator(axes, *, rsun: u.m = R_sun, resolution=500, **kwargs): @u.quantity_input def prime_meridian(axes, *, r...
["sunpy/visualization/tests/test_drawing.py::test_prime_meridian_error"]
["sunpy/visualization/tests/test_drawing.py::test_limb_invisible"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
33
1
929
0
0.6
1
0.75
1
0.264833
81.0695
6,217
swe_smith::train::14543
swe_smith
train
14,543
hukkin__tomli.443a0c1b.func_pm_ctrl_invert_if__cenwfijp
swesmith/hukkin__tomli.443a0c1b
hukkin/tomli
python
null
# TOML parser fails to parse basic strings correctly I'm having an issue with the TOML parser where it's not correctly handling basic strings and multiline basic strings. The parser seems to be mixing up the error checking and escape handling between the two string types. ## Description When trying to parse valid TO...
diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index 16c76cd..91e2048 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -623,11 +623,11 @@ def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str] def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos,...
["tests/test_data.py::TestData::test_invalid", "tests/test_data.py::TestData::test_valid"]
["tests/test_error.py::TestError::test_deprecated_tomldecodeerror", "tests/test_error.py::TestError::test_invalid_char_quotes", "tests/test_error.py::TestError::test_invalid_parse_float", "tests/test_error.py::TestError::test_line_and_col", "tests/test_error.py::TestError::test_missing_value", "tests/test_error.py::Tes...
jyangballin/swesmith.x86_64.hukkin_1776_tomli.443a0c1b
true
null
1
7
2
1,449
0
0.6
1
0.75
1
0.264833
81.0695
6,218
swe_smith::train::49252
swe_smith
train
49,252
mozilla__bleach.73871d76.func_basic__5txuvoin
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parser silently ignores unknown tags instead of raising KeyError #### Description When processing HTML with unknown/unrecognized tags, the parser now silently ignores them instead of properly handling them according to the HTML5 specification. This causes issues with tag cleaning and linkification where unknown ...
diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py index 5427b7d..96b3795 100644 --- a/bleach/_vendor/html5lib/html5parser.py +++ b/bleach/_vendor/html5lib/html5parser.py @@ -452,19 +452,13 @@ def getPhases(debug): self.tree.insertText(token["data"]) def...
["tests/test_clean.py::test_unquoted_attr_values_are_quoted", "tests/test_clean.py::test_poster_attribute", "tests/test_clean.py::TestCleaner::test_basics", "tests/test_linkify.py::test_recognized_tags_arg"]
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
10
4
1,388
0
0.6
1
0.75
1
0.264667
81.069
6,219
swe_smith::train::2893
swe_smith
train
2,893
seatgeek__thefuzz.8a05a3ee.combine_file__2uoca06x
swesmith/seatgeek__thefuzz.8a05a3ee
seatgeek/thefuzz
python
null
Broken string matching in extract and extractBests functions ### Problem The string matching functions in thefuzz are not working correctly. When trying to find matches between strings, the functions are returning incorrect results. I'm trying to use the extract and extractBests functions to find similar strings, bu...
diff --git a/thefuzz/process.py b/thefuzz/process.py index bdfe900..fc64831 100644 --- a/thefuzz/process.py +++ b/thefuzz/process.py @@ -188,7 +188,7 @@ def extract(query, choices, processor=default_processor, scorer=default_scorer, [('train', 22, 'bard'), ('man', 0, 'dog')] """ - return extractBests...
["test_thefuzz.py::ProcessTest::testIssue57", "test_thefuzz.py::ProcessTest::test_dedupe", "test_thefuzz.py::ProcessTest::test_dict_like_extract", "test_thefuzz.py::ProcessTest::test_list_like_extract", "test_thefuzz_hypothesis.py::test_identical_strings_extracted[ratio-<lambda>]", "test_thefuzz_hypothesis.py::test_ide...
["test_thefuzz.py::StringProcessingTest::test_dont_condense_whitespace", "test_thefuzz.py::StringProcessingTest::test_replace_non_letters_non_numbers_with_whitespace", "test_thefuzz.py::UtilsTest::test_ascii_only", "test_thefuzz.py::UtilsTest::test_fullProcess", "test_thefuzz.py::UtilsTest::test_fullProcessForceAscii",...
jyangballin/swesmith.x86_64.seatgeek_1776_thefuzz.8a05a3ee
true
null
1
16
25
1,268
0
0.6
1
0.75
1
0.264667
81.069
6,220
swe_smith::train::5285
swe_smith
train
5,285
PyCQA__flake8.cf1542ce.combine_file__vyjnqkfm
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
**Plugin execution error message shows incorrect information** I've found an issue with the error message displayed when a plugin fails during execution. The error message is showing incorrect information, with the plugin name and filename swapped. **To Reproduce** Here's a simple example that demonstrates the issue:...
diff --git a/src/flake8/exceptions.py b/src/flake8/exceptions.py index 18646e7..8d2372f 100644 --- a/src/flake8/exceptions.py +++ b/src/flake8/exceptions.py @@ -64,15 +64,15 @@ class PluginExecutionFailed(Flake8Exception): exception: Exception, ) -> None: """Utilize keyword arguments for message ...
["tests/unit/test_file_checker.py::test_raises_exception_on_failed_plugin"]
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker....
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
1
12
1
1,348
0
0.6
1
0.75
1
0.264667
81.069
6,221
swe_smith::train::46749
swe_smith
train
46,749
python-trio__trio.cfbbe2c1.combine_module__nu52kzb5
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
CancelScope validation logic broken for timeout parameters #### Description When creating a CancelScope with timeout parameters, the validation logic is incorrectly checking the wrong parameters and has inverted conditions, causing unexpected ValueError exceptions. #### Steps/Code to Reproduce ```python import trio...
diff --git a/src/trio/_core/_run.py b/src/trio/_core/_run.py index bfb38f4..d79ab25 100644 --- a/src/trio/_core/_run.py +++ b/src/trio/_core/_run.py @@ -553,15 +553,13 @@ class CancelScope: def __attrs_post_init__(self) -> None: if isnan(self._deadline): - raise ValueError("deadline must not ...
["src/trio/_core/_tests/test_run.py::test_cancel_scope_validation", "src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_basic", "src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_blocking", "src/trio/_tests/test_timeouts.py::test_timeouts_raise_value_error"]
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
2
16
4
1,267
0
0.6
1
0.75
1
0.2645
81.0685
6,222
swe_smith::train::42603
swe_smith
train
42,603
python-jsonschema__jsonschema.93e0caa5.func_basic__iqvxbjop
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
propertyNames validation not working correctly for objects #### Description The `propertyNames` keyword validation appears to be broken. When validating objects with property names that should fail validation according to the schema, the validation incorrectly passes instead of raising validation errors. #### Steps/...
diff --git a/jsonschema/_keywords.py b/jsonschema/_keywords.py index f30f954..5a0a89b 100644 --- a/jsonschema/_keywords.py +++ b/jsonschema/_keywords.py @@ -26,11 +26,11 @@ def patternProperties(validator, patternProperties, instance, schema): def propertyNames(validator, propertyNames, instance, schema): - if ...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft6::test_propertyNames_propertyNames_validation_ignores_arrays", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft6::test_propertyNames_propertyNames_validation_ignores_other_non_objects", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft6::tes...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
6
26
1,466
0
0.6
1
0.75
1
0.264333
81.068
6,223
swe_smith::train::20340
swe_smith
train
20,340
gruns__furl.da386f68.func_pm_ctrl_shuffle__kkoillpr
swesmith/gruns__furl.da386f68
gruns/furl
python
null
urlsplit function broken due to variable reference before assignment #### Description The `urlsplit` function in `furl.py` is throwing `UnboundLocalError: local variable referenced before assignment` errors when trying to parse URLs. This appears to be affecting most URL parsing functionality in the library. #### St...
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..4ec6667 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -282,16 +282,14 @@ def has_netloc(url): def urlsplit(url): - """ - Parameters: - url: URL string to split. - Returns: urlparse.SplitResult tuple subclass, just like - urlparse.urlsplit...
["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_equality", "tests/test_furl.py::TestQuery::test_special_characters", "tests/test_furl.py::TestFra...
["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::TestPath::test_no...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
39
32
806
0
0.6
1
0.75
1
0.264333
81.068
6,224
swe_smith::train::48067
swe_smith
train
48,067
sqlfluff__sqlfluff.50a1c4b6.func_basic__xn2jds35
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
ParseContext match_segment context manager yields None instead of self #### Description The `match_segment` context manager in ParseContext is yielding `None` instead of `self`, breaking code that expects to receive the context object. #### Steps/Code to Reproduce ```python from sqlfluff.core.parser.context import ...
diff --git a/src/sqlfluff/core/parser/context.py b/src/sqlfluff/core/parser/context.py index 7edf331..89cf081 100644 --- a/src/sqlfluff/core/parser/context.py +++ b/src/sqlfluff/core/parser/context.py @@ -239,25 +239,22 @@ class ParseContext: """ self._match_stack.append(self.match_segment) s...
["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[True]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[False]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof_templated", "test/core/parser/grammar/grammar_anyof_test.py::test__pars...
["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar__oneof__copy", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_anyof_modes[ParseMode.STRICT-options1-terminators1-input_slice1-kwargs1-output_tuple1]", "test/core/parser/grammar/grammar_other_test.py::test__parser__grammar_an...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
25
75
1,086
0
0.6
1
0.75
1
0.264333
81.068
6,225
swe_smith::train::32240
swe_smith
train
32,240
davidhalter__parso.338a5760.func_pm_remove_assign__dde40l2j
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Error messages missing for syntax and indentation errors #### Description When parsing Python code with syntax errors or indentation issues, parso is not generating the expected error messages. The error detection is working but the actual error message content is missing or undefined. #### Steps/Code to Reproduce ...
diff --git a/parso/python/errors.py b/parso/python/errors.py index 09c5047..d6ac0d9 100644 --- a/parso/python/errors.py +++ b/parso/python/errors.py @@ -434,12 +434,8 @@ class ErrorFinder(Normalizer): def visit_leaf(self, leaf): if leaf.type == 'error_leaf': if leaf.token_type in ('INDENT', '...
["test/test_normalizer_issues_files.py::test_normalizer_issue[E12_second.py]", "test/test_normalizer_issues_files.py::test_normalizer_issue[E10.py]", "test/test_normalizer_issues_files.py::test_normalizer_issue[E11.py]", "test/test_python_errors.py::test_python_exception_matches[?]", "test/test_python_errors.py::test_p...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
10
26
1,386
0
0.6
1
0.75
1
0.264333
81.068
6,226
swe_smith::train::22284
swe_smith
train
22,284
tweepy__tweepy.91a41c6e.func_basic__46llchds
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
#### Description Encountered an issue with the `supported_languages` method in the Tweepy API. It seems that the method is not returning the expected dictionary format for supported languages. #### Steps/Code to Reproduce Here's a snippet to reproduce the issue: ```python import tweepy # Assuming 'api' is an authe...
diff --git a/tweepy/models.py b/tweepy/models.py index f29361e..b91f8e7 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -447,7 +447,11 @@ class JSONModel(Model): @classmethod def parse(cls, api, json): - return json + if not json: + return None + modified_json = dict(...
["tests/test_api.py::TweepyAPITests::testsupportedlanguages"]
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
6
1
1,466
0
0.6
1
0.75
1
0.264333
81.068
6,227
swe_smith::train::47750
swe_smith
train
47,750
sqlfluff__sqlfluff.50a1c4b6.func_basic__5l3irlx5
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
NoQa directive filtering logic inverted - violations not being ignored properly #### Description The NoQa directive filtering is not working correctly. When a `-- noqa` comment is added to ignore specific violations on a line, the violations are still being reported instead of being filtered out. #### Steps/Code to ...
diff --git a/src/sqlfluff/core/rules/noqa.py b/src/sqlfluff/core/rules/noqa.py index 0dbfb3e..6cfff9a 100644 --- a/src/sqlfluff/core/rules/noqa.py +++ b/src/sqlfluff/core/rules/noqa.py @@ -38,16 +38,14 @@ class NoQaDirective: v for v in violations if ( - v.line_no =...
["test/core/rules/noqa_test.py::test_linted_file_ignore_masked_violations[1_violation_ignore_specific_line]", "test/core/rules/noqa_test.py::test_linted_file_ignore_masked_violations[1_violations_comment_inline_glob_ignore_match]"]
["test/core/rules/noqa_test.py::test__linter__raises_malformed_noqa", "test/core/rules/noqa_test.py::test_parse_noqa[-None]", "test/core/rules/noqa_test.py::test_parse_noqa[noqa-expected1]", "test/core/rules/noqa_test.py::test_parse_noqa[noqa?-SQLParseError]", "test/core/rules/noqa_test.py::test_parse_noqa[noqa:-expect...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
12
2
1,346
0
0.6
1
0.75
1
0.264333
81.068
6,228
swe_smith::train::45484
swe_smith
train
45,484
dask__dask.5f61e423.pr_11337
swesmith/dask__dask.5f61e423
dask/dask
python
null
Rechunking method 'None' leads to NotImplementedError It seems that the recent changes to the `rechunk` function have introduced an issue where the rechunking method is not being set correctly, resulting in a `NotImplementedError` when the method is 'None'. This error occurs when attempting to rechunk arrays with vari...
diff --git a/dask/array/rechunk.py b/dask/array/rechunk.py index e979a01..1526642 100644 --- a/dask/array/rechunk.py +++ b/dask/array/rechunk.py @@ -363,9 +363,7 @@ def rechunk( _validate_rechunk(x.chunks, chunks) - if method is None: - method = _choose_rechunk_method(x.chunks, chunks, threshold=thre...
["dask/array/tests/test_rechunk.py::test_rechunk_1d", "dask/array/tests/test_rechunk.py::test_rechunk_2d", "dask/array/tests/test_rechunk.py::test_rechunk_4d", "dask/array/tests/test_rechunk.py::test_rechunk_expand", "dask/array/tests/test_rechunk.py::test_rechunk_expand2", "dask/array/tests/test_rechunk.py::test_rechu...
["dask/array/tests/test_rechunk.py::test_rechunk_internals_1", "dask/array/tests/test_rechunk.py::test_intersect_1", "dask/array/tests/test_rechunk.py::test_intersect_2", "dask/array/tests/test_rechunk.py::test_rechunk_blockshape", "dask/array/tests/test_rechunk.py::test_rechunk_with_empty_input", "dask/array/tests/tes...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
31
85
965
0
0.6
1
0.75
1
0.264167
81.0675
6,229
swe_smith::train::22798
swe_smith
train
22,798
graphql-python__graphene.82903263.func_basic__18ucovvq
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
Time scalar type returns wrong values and raises incorrect errors #### Description The Time scalar type is not working correctly. When parsing time values, it's returning date objects instead of time objects, and the error handling is backwards - it raises errors for valid datetime.time instances and accepts invalid ...
diff --git a/graphene/types/datetime.py b/graphene/types/datetime.py index d8388f8..dc67dab 100644 --- a/graphene/types/datetime.py +++ b/graphene/types/datetime.py @@ -101,11 +101,12 @@ class Time(Scalar): @classmethod def parse_value(cls, value): - if isinstance(value, datetime.time): - ...
["graphene/types/tests/test_datetime.py::test_time_query", "graphene/types/tests/test_datetime.py::test_time_query_with_variables", "graphene/types/tests/test_datetime.py::test_bad_time_query", "graphene/types/tests/test_datetime.py::test_time_query_variable"]
["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i...
jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263
true
null
1
11
4
1,365
0
0.6
1
0.75
1
0.264167
81.0675
6,230
swe_smith::train::31208
swe_smith
train
31,208
scrapy__scrapy.35212ec5.combine_module__zo990gtb
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
ReturnsContract missing required attributes after initialization #### Description When using the `@returns` contract decorator, the contract fails to initialize properly and is missing required attributes like `obj_name`, `obj_type_verifier`, `min_bound`, and `max_bound`. #### Steps/Code to Reproduce ```python from...
diff --git a/scrapy/contracts/__init__.py b/scrapy/contracts/__init__.py index bdb68c4..b9a7cfb 100644 --- a/scrapy/contracts/__init__.py +++ b/scrapy/contracts/__init__.py @@ -85,10 +85,6 @@ class Contract: return request - def adjust_request_args(self, args: dict[str, Any]) -> dict[str, Any]: - ...
["tests/test_contracts.py::ContractsManagerTest::test_cb_kwargs", "tests/test_contracts.py::ContractsManagerTest::test_contracts", "tests/test_contracts.py::ContractsManagerTest::test_errback", "tests/test_contracts.py::ContractsManagerTest::test_meta", "tests/test_contracts.py::ContractsManagerTest::test_returns", "te...
["tests/test_contracts.py::ContractsManagerTest::test_custom_contracts", "tests/test_contracts.py::ContractsManagerTest::test_form_contract", "tests/test_contracts.py::ContractsManagerTest::test_inherited_contracts", "tests/test_contracts.py::ContractsManagerTest::test_regex", "tests/test_contracts.py::ContractsManager...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
2
25
9
1,085
0
0.6
1
0.75
1
0.264167
81.0675
6,231
swe_smith::train::27615
swe_smith
train
27,615
arrow-py__arrow.1d70d009.func_basic__plode5x8
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
ISO 8601 datetime parsing broken after recent changes #### Description The ISO 8601 datetime parser is not working correctly for strings with time components. It seems like the logic for detecting and parsing time portions has been inverted or corrupted somehow. #### Steps/Code to Reproduce ```python import arrow ...
diff --git a/arrow/parser.py b/arrow/parser.py index 3929788..0a266c4 100644 --- a/arrow/parser.py +++ b/arrow/parser.py @@ -273,17 +273,15 @@ class DateTimeParser: has_t_divider = "T" in datetime_string num_spaces = datetime_string.count(" ") - if has_space_divider and num_spaces != 1 or has...
["tests/test_factory.py::TestGet::test_kwarg_normalize_whitespace", "tests/test_factory.py::TestGet::test_one_arg_iso_str", "tests/test_parser.py::TestDateTimeParserParse::test_parse_subsecond_rounding", "tests/test_parser.py::TestDateTimeParserParse::test_parse_subsecond_rounding_overflow", "tests/test_parser.py::Test...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
25
28
1,085
0
0.6
1
0.75
1
0.264167
81.0675
6,232
swe_smith::train::40236
swe_smith
train
40,236
scanny__python-pptx.278b47b1.combine_file__vgcyeapb
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Range validation logic inverted for inclusive bounds #### Description The range validation for integer values is incorrectly rejecting valid values at the boundaries. Values that should be accepted within the inclusive range are being rejected, and values outside the range might be accepted. #### Steps/Code to Repro...
diff --git a/src/pptx/oxml/simpletypes.py b/src/pptx/oxml/simpletypes.py index 6ceb06f..7891ea3 100644 --- a/src/pptx/oxml/simpletypes.py +++ b/src/pptx/oxml/simpletypes.py @@ -50,7 +50,7 @@ class BaseSimpleType: @classmethod def validate_int_in_range(cls, value, min_inclusive, max_inclusive): cls.va...
["tests/dml/test_fill.py::Describe_GradFill::it_knows_the_gradient_angle[angle_fixture2]", "tests/dml/test_fill.py::Describe_GradFill::it_knows_the_gradient_angle[angle_fixture3]", "tests/oxml/shapes/test_groupshape.py::DescribeCT_GroupShape::it_can_recalculate_its_pos_and_size[recalc_fixture1]", "tests/oxml/shapes/tes...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
10
79
1,384
0
0.6
1
0.75
1
0.264
81.067
6,233
swe_smith::train::34822
swe_smith
train
34,822
mozillazg__python-pinyin.e42dede5.func_pm_ctrl_shuffle__xn5fcd5u
swesmith/mozillazg__python-pinyin.e42dede5
mozillazg/python-pinyin
python
null
# Bug in Wade-Giles conversion implementation in pypinyin ## Description The Wade-Giles conversion functionality in pypinyin has a bug. When trying to convert Chinese characters to Wade-Giles romanization, the code fails with an `UnboundLocalError` indicating that the variable 'initials' is referenced before assignme...
diff --git a/pypinyin/style/wadegiles.py b/pypinyin/style/wadegiles.py index cd64571..4ed1816 100644 --- a/pypinyin/style/wadegiles.py +++ b/pypinyin/style/wadegiles.py @@ -525,23 +525,22 @@ _except_table.sort(key=lambda x: len(x[0]), reverse=True) def to_wade_glides(pinyin, **kwargs): - pinyin = replace_symbol...
["tests/test_pinyin.py::test_wadegiles[\\u5317\\u4eac-expect0]", "tests/test_pinyin.py::test_wadegiles[\\u53f0\\u5317-expect1]", "tests/test_pinyin.py::test_wadegiles[\\u592a\\u6781-expect2]", "tests/test_pinyin.py::test_wadegiles[\\u53ea-expect3]", "tests/test_pinyin.py::test_wadegiles[\\u97e6\\u6c0f\\u62fc\\u97f3-exp...
["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_convert.py::p...
jyangballin/swesmith.x86_64.mozillazg_1776_python-pinyin.e42dede5
true
null
1
17
8
1,244
0
0.6
1
0.75
1
0.264
81.067
6,234
swe_smith::train::28912
swe_smith
train
28,912
encode__starlette.db5063c2.lm_rewrite__ib4jhk3e
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
# Environment variable deletion doesn't properly prevent re-reading ## Description I found a bug in the `Environ` class in `starlette/config.py`. When an environment variable is deleted after it has been read, the deletion is allowed but the variable is still tracked as "has been read". The current implementation pr...
diff --git a/starlette/config.py b/starlette/config.py index ca15c56..d9a0d6b 100644 --- a/starlette/config.py +++ b/starlette/config.py @@ -29,10 +29,10 @@ class Environ(typing.MutableMapping[str, str]): self._environ.__setitem__(key, value) def __delitem__(self, key: str) -> None: - if key in s...
["tests/test_config.py::test_environ"]
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
6
1
1,464
0
0.6
1
0.75
1
0.264
81.067
6,235
swe_smith::train::10066
swe_smith
train
10,066
paramiko__paramiko.23f92003.combine_file__68er46t0
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
DSS key loading fails with AttributeError and incorrect parameter handling #### Description DSS key operations are failing when loading keys from files or creating new keys. The issue appears to affect multiple DSS key operations including loading from private key files, generating new keys, and signing operations. ...
diff --git a/paramiko/dsskey.py b/paramiko/dsskey.py index 5215d28..2e738c8 100644 --- a/paramiko/dsskey.py +++ b/paramiko/dsskey.py @@ -67,20 +67,20 @@ class DSSKey(PKey): self._from_private_key_file(filename, password) return if (msg is None) and (data is not None): - msg...
["tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[dss]", "tests/agent.py::AgentKey_::fields::defers_to_inner_key_when_present[dss]", "tests/agent.py::AgentKey_::get_bits::defers_to_inner_key_when_present[dss]", "tests/agent.py::AgentKey_::asbytes::defers_to_inner_key_when_present[dss]", "tests/pkey.py::...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
14
14
1,304
0
0.6
1
0.75
1
0.264
81.067
6,236
swe_smith::train::38456
swe_smith
train
38,456
amueller__word_cloud.ec24191c.combine_file__9ofvoad5
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
CLI argument parsing broken after recent changes #### Description The command line interface is completely broken and throws `ValueError: FileType('r') is not callable` when trying to parse any arguments. This affects all CLI functionality including basic help output. #### Steps/Code to Reproduce ```python from wor...
diff --git a/wordcloud/wordcloud_cli.py b/wordcloud/wordcloud_cli.py index 4ddd3db..7c45720 100644 --- a/wordcloud/wordcloud_cli.py +++ b/wordcloud/wordcloud_cli.py @@ -48,41 +48,22 @@ class FileType(object): self._mode = mode self._bufsize = bufsize - def __call__(self, string): - # the s...
["test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option0]", "test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option1]", "test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option2]", "test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option3]", "test/test_wordcloud_cli.py...
["test/test_wordcloud.py::test_collocations", "test/test_wordcloud.py::test_collocation_stopwords", "test/test_wordcloud.py::test_collocation_stopwords_uppercase", "test/test_wordcloud.py::test_plurals_numbers", "test/test_wordcloud.py::test_multiple_s", "test/test_wordcloud.py::test_empty_text", "test/test_wordcloud.p...
jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c
true
null
1
27
33
1,043
0
0.6
1
0.75
1
0.263833
81.0665
6,237
swe_smith::train::50904
swe_smith
train
50,904
python-hyper__h11.bed0dd4a.func_pm_remove_assign__0bwb69y3
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
# Chunked HTTP transfer encoding broken after recent changes ## Description I found a bug in the chunked encoding implementation. When trying to process chunked HTTP messages, the code fails with a `NameError` for the variable `matches`. ## Steps to reproduce 1. Create a simple HTTP client that sends a chunked requ...
diff --git a/h11/_readers.py b/h11/_readers.py index 08a9574..a751e41 100644 --- a/h11/_readers.py +++ b/h11/_readers.py @@ -174,18 +174,11 @@ class ChunkedReader: chunk_header = buf.maybe_extract_next_line() if chunk_header is None: return None - matches = validate...
["h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_connection.py::test_reuse_simple", "h11/tests/test_connection.py::test_protocol_switch", "h11/tests/test_connection.py::test_close_different_states", "h11/tests/test_connection.py::test_special_exceptio...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_conn...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
8
7
1,423
0
0.6
1
0.75
1
0.263833
81.0665
6,238
swe_smith::train::44479
swe_smith
train
44,479
pydata__patsy.a5d16484.func_pm_remove_wrapper__ps38zths
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
categorical_to_int silently returns incorrect results for unknown levels When `categorical_to_int` encounters a value that doesn't match any of the expected levels, it should raise a `PatsyError`. However, the function currently has a bug where it silently continues processing and returns incorrect integer codes. ###...
diff --git a/patsy/categorical.py b/patsy/categorical.py index c88ecd5..9ef09ae 100644 --- a/patsy/categorical.py +++ b/patsy/categorical.py @@ -367,35 +367,11 @@ def categorical_to_int(data, levels, NA_action, origin=None): if NA_action.is_categorical_NA(value): out[i] = -1 else: - ...
["patsy/build.py::test__eval_factor_categorical", "patsy/categorical.py::test_categorical_to_int", "patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy_thoroughly", "patsy/test_build.py::test_data_types", "patsy/test_build.py::test_NA_action", "patsy/test_build.p...
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__examine_factor_types", "patsy/builtins.py::test_I",...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
26
20
1,063
0
0.6
1
0.75
1
0.263833
81.0665
6,239
swe_smith::train::42131
swe_smith
train
42,131
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__grt1i1l7
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Hyperlink.address property returns incorrect value when no hyperlink is present #### Description The `Hyperlink.address` property is returning an unexpected value when there's no hyperlink action or when the hyperlink has no relationship ID. Instead of returning `None` as expected, it appears to be trying to access a...
diff --git a/src/pptx/action.py b/src/pptx/action.py index 83c6ebf..e969974 100644 --- a/src/pptx/action.py +++ b/src/pptx/action.py @@ -207,6 +207,8 @@ class Hyperlink(Subshape): @property def address(self) -> str | None: + + return self.part.target_ref(rId) """Read/write. The URL of the hy...
["tests/test_action.py::DescribeHyperlink::it_knows_the_target_url_of_the_hyperlink", "tests/test_action.py::DescribeHyperlink::it_knows_when_theres_no_url[p:cNvPr]", "tests/test_action.py::DescribeHyperlink::it_knows_when_theres_no_url[p:cNvPr/a:hlinkClick]"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
13
3
1,323
0
0.6
1
0.75
1
0.263833
81.0665
6,240
swe_smith::train::4242
swe_smith
train
4,242
pygments__pygments.27649ebb.func_pm_class_rm_funcs__30dnzz42
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
PhpLexer missing required attributes after initialization #### Description The PhpLexer class is missing essential attributes that are expected to be available after initialization. When trying to use the lexer, it fails with AttributeError for missing attributes like `startinline` and `_functions`. #### Steps/Code ...
diff --git a/pygments/lexers/php.py b/pygments/lexers/php.py index 4f00c6f..f5fc21c 100644 --- a/pygments/lexers/php.py +++ b/pygments/lexers/php.py @@ -293,26 +293,6 @@ class PhpLexer(RegexLexer): ], } - def __init__(self, **options): - self.funcnamehighlighting = get_bool_opt( - o...
["tests/test_basic_api.py::test_lexer_options[HtmlPhpLexer]", "tests/test_basic_api.py::test_lexer_options[JavascriptPhpLexer]", "tests/test_basic_api.py::test_lexer_options[XmlPhpLexer]", "tests/test_basic_api.py::test_random_input[JavascriptPhpLexer]", "tests/test_basic_api.py::test_random_input[HtmlPhpLexer]", "test...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
30
20
983
0
0.6
1
0.75
1
0.263833
81.0665
6,241
swe_bench::dev::6
swe_bench
dev
6
marshmallow-code__marshmallow-1702
marshmallow-code/marshmallow
marshmallow-code/marshmallow
python
fa6c7379468f59d4568e29cbbeb06b797d656215
RFC: Change the way we store metadata? Users are often bit by the fact that fields store arbitrary keyword arguments as metadata. See https://github.com/marshmallow-code/marshmallow/issues/683. > ...The reasons we use **kwargs instead of e.g. `metadata=` are mostly historical. The original decision was that storing kw...
Solution 1. is preferable to 2., I think. That said, there are some use cases where it's awkward to call additional kwargs "metadata". `location` in webargs is one that comes to mind. ```python # current API "some_query_param": fields.Bool(location="query") ``` though we could probably wrap all the fields in w...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -101,7 +101,7 @@ class Field(FieldABC): its value will be present in the deserialized object. In the context of an HTTP API, this effectively marks the field as "read-o...
diff --git a/tests/test_fields.py b/tests/test_fields.py --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -197,11 +197,27 @@ def test_extra_metadata_may_be_added_to_field(self, FieldClass): # noqa required=True, default=None, validate=lambda v: True, - descript...
["tests/test_fields.py::TestMetadata::test_extra_metadata_may_be_added_to_field[String]", "tests/test_fields.py::TestMetadata::test_extra_metadata_may_be_added_to_field[Integer]", "tests/test_fields.py::TestMetadata::test_extra_metadata_may_be_added_to_field[Boolean]", "tests/test_fields.py::TestMetadata::test_extra_me...
["tests/test_fields.py::test_field_aliases[Integer-Integer]", "tests/test_fields.py::test_field_aliases[String-String]", "tests/test_fields.py::test_field_aliases[Boolean-Boolean]", "tests/test_fields.py::test_field_aliases[Url-Url]", "tests/test_fields.py::TestField::test_repr", "tests/test_fields.py::TestField::test_...
null
true
2020-12-02T20:37:47Z
1
16
28
1,062
0
0.8
1
0.55
1
0.230333
81.066
6,242
swe_smith::train::10130
swe_smith
train
10,130
paramiko__paramiko.23f92003.combine_file__ihz41wjs
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP operations failing with "OSError: ess" after recent changes #### Description SFTP operations are now failing with cryptic "OSError: ess" messages. This appears to affect all basic SFTP functionality including file operations, directory listing, and file transfers. #### Steps/Code to Reproduce ```python import ...
diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index cd3910d..c337fb7 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -183,14 +183,14 @@ class SFTPServer(BaseSFTP, SubsystemHandler): :param int e: an errno code, as from ``OSError.errno``. :return: an `int` SFTP er...
["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_append", "tests/test_sftp.py::TestSFTP::test_rename", "tests/test_sftp.py::TestSFTP::testa_posix_rename", "tests/test...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
20
42
1,182
0
0.6
1
0.75
1
0.263667
81.066
6,243
swe_smith::train::3447
swe_smith
train
3,447
pygments__pygments.27649ebb.combine_file__o3cjl239
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
#### Description The `get_choice_opt` function in `pygments.util` is raising `OptionError` for valid option values instead of invalid ones. When a valid option is provided that exists in the allowed list, the function incorrectly raises an error. #### Steps/Code to Reproduce ```python from pygments.util import get_c...
diff --git a/pygments/util.py b/pygments/util.py index 83cf104..429fc19 100644 --- a/pygments/util.py +++ b/pygments/util.py @@ -43,11 +43,11 @@ def get_choice_opt(options, optname, allowed, default=None, normcase=False): `allowed`, raise an error, otherwise return it. """ string = options.get(optname, d...
["tests/test_util.py::test_guess_decode_from_terminal", "tests/test_util.py::test_analysator_value_error", "tests/test_util.py::test_analysator_returns_boolean", "tests/test_util.py::test_analysator_type_error", "tests/test_util.py::test_doctype_matches", "tests/test_util.py::test_analysator_returns_float", "tests/test...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
26
65
1,062
0
0.6
1
0.75
1
0.263667
81.066
6,244
swe_smith::train::43423
swe_smith
train
43,423
theskumar__python-dotenv.2b8635b7.lm_rewrite__fe456aob
swesmith/theskumar__python-dotenv.2b8635b7
theskumar/python-dotenv
python
null
# Bug: python-dotenv fails when no .env file exists ## Description When trying to load environment variables from a non-existent .env file, python-dotenv raises a `FileNotFoundError` instead of gracefully handling the missing file. ## Steps to reproduce ```python from dotenv import load_dotenv # Try to load from a...
diff --git a/src/dotenv/main.py b/src/dotenv/main.py index 052de05..2a5f5f3 100644 --- a/src/dotenv/main.py +++ b/src/dotenv/main.py @@ -52,19 +52,19 @@ class DotEnv: @contextmanager def _get_stream(self) -> Iterator[IO[str]]: - if self.dotenv_path and os.path.isfile(self.dotenv_path): - w...
["tests/test_main.py::test_get_key_no_file", "tests/test_main.py::test_load_dotenv_no_file_verbose", "tests/test_zip_imports.py::test_load_dotenv_gracefully_handles_zip_imports_when_no_env_file"]
["tests/test_cli.py::test_list[shell-x='a\\nb\\nc'-x='a\\nb\\nc'\\n]", "tests/test_cli.py::test_list_non_existent_file", "tests/test_cli.py::test_list_not_a_file", "tests/test_cli.py::test_list_no_file", "tests/test_cli.py::test_get_existing_value", "tests/test_cli.py::test_get_non_existent_value", "tests/test_cli.py::...
jyangballin/swesmith.x86_64.theskumar_1776_python-dotenv.2b8635b7
true
null
1
22
3
1,142
0
0.6
1
0.75
1
0.263667
81.066
6,245
swe_smith::train::12946
swe_smith
train
12,946
python-openxml__python-docx.0cf6d71f.combine_file__tkzxh7ea
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Document section operations return None instead of expected section object #### Description When adding a new section to a document, the operation returns `None` instead of the expected section object. This breaks the API contract and causes failures in code that expects to work with the returned section. #### Steps...
diff --git a/src/docx/oxml/document.py b/src/docx/oxml/document.py index 36819ef..68ed127 100644 --- a/src/docx/oxml/document.py +++ b/src/docx/oxml/document.py @@ -28,8 +28,8 @@ class CT_Document(BaseOxmlElement): `w:sectPr` elements appear in document order. The last one is always `w:body/w:sectPr`,...
["tests/oxml/parts/test_document.py::DescribeCT_Body::it_can_add_a_section_break", "tests/test_document.py::DescribeDocument::it_can_add_a_section[add_section_fixture0]", "tests/test_document.py::DescribeDocument::it_can_add_a_section[add_section_fixture1]", "tests/test_document.py::DescribeDocument::it_can_add_a_secti...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
14
9
1,302
0
0.6
1
0.75
1
0.263667
81.066
6,246
swe_smith::train::28760
swe_smith
train
28,760
encode__starlette.db5063c2.func_pm_class_rm_funcs__jqyg7xg2
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
# Config.get method missing after recent changes **Describe the bug** After a recent change, the `Config.get` method seems to have been removed from the codebase. This method is essential for retrieving configuration values. **To Reproduce** When trying to use the `Config` class to retrieve configuration values: ```...
diff --git a/starlette/config.py b/starlette/config.py index ca15c56..cd3d6b7 100644 --- a/starlette/config.py +++ b/starlette/config.py @@ -89,23 +89,6 @@ class Config: ) -> typing.Any: return self.get(key, cast, default) - def get( - self, - key: str, - cast: typing.Callable[[t...
["tests/test_config.py::test_config_types", "tests/test_config.py::test_config", "tests/test_config.py::test_config_with_env_prefix"]
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
19
3
1,202
0
0.6
1
0.75
1
0.263667
81.066
6,247
swe_smith::train::17856
swe_smith
train
17,856
pyasn1__pyasn1.0f07d724.func_pm_class_rm_funcs__m59f0xfo
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
RealEncoder fails to encode binary Real values after removing _dropFloatingPoint method #### Description When encoding Real values with binary bases, the encoder throws an AttributeError because it's trying to call a method that no longer exists. #### Steps/Code to Reproduce ```python from pyasn1.type import univ f...
diff --git a/pyasn1/codec/ber/encoder.py b/pyasn1/codec/ber/encoder.py index d16fb1f..553eb15 100644 --- a/pyasn1/codec/ber/encoder.py +++ b/pyasn1/codec/ber/encoder.py @@ -388,34 +388,6 @@ class RealEncoder(AbstractItemEncoder): supportIndefLenMode = False binEncBase = 2 # set to None to choose encoding bas...
["tests/codec/ber/test_encoder.py::RealEncoderTestCase::testBin1", "tests/codec/ber/test_encoder.py::RealEncoderTestCase::testBin2", "tests/codec/ber/test_encoder.py::RealEncoderTestCase::testBin3", "tests/codec/ber/test_encoder.py::RealEncoderTestCase::testBin4", "tests/codec/ber/test_encoder.py::RealEncoderTestCase::...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
29
7
1,001
0
0.6
1
0.75
1
0.2635
81.0655
6,248
swe_smith::train::44310
swe_smith
train
44,310
pydata__patsy.a5d16484.func_pm_ctrl_shuffle__0uwt77lx
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Origin.combine method fails with UnboundLocalError #### Description The `Origin.combine` class method is throwing an `UnboundLocalError` when trying to access local variables. This appears to be affecting multiple parts of the codebase that rely on origin tracking for formula parsing and error reporting. #### Steps/...
diff --git a/patsy/origin.py b/patsy/origin.py index fcabf21..6d0a511 100644 --- a/patsy/origin.py +++ b/patsy/origin.py @@ -40,6 +40,17 @@ class Origin(object): @classmethod def combine(cls, origin_objs): + return cls(codes.pop(), start, end) + for obj in origin_objs: + if obj is n...
["patsy/constraint.py::test_linear_constraint", "patsy/constraint.py::test_eval_errors", "patsy/desc.py::test_ModelDesc_from_formula", "patsy/desc.py::test_eval_formula", "patsy/desc.py::test_eval_formula_error_reporting", "patsy/desc.py::test_formula_factor_origin", "patsy/design_info.py::test_DesignInfo_linear_constr...
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
25
34
1,081
0
0.6
1
0.75
1
0.2635
81.0655
6,249
swe_smith::train::42326
swe_smith
train
42,326
scanny__python-pptx.278b47b1.lm_rewrite__t2fso57h
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
# PackURI no longer raises ValueError for URIs without leading slash ## Description The `PackURI` class has changed behavior and no longer raises a `ValueError` when constructed with a URI string that doesn't begin with a slash. Instead, it silently prepends a slash to the string. This is a breaking change from prev...
diff --git a/src/pptx/opc/packuri.py b/src/pptx/opc/packuri.py index 74ddd33..4531bd7 100644 --- a/src/pptx/opc/packuri.py +++ b/src/pptx/opc/packuri.py @@ -15,10 +15,13 @@ class PackURI(str): _filename_re = re.compile("([a-zA-Z]+)([0-9][0-9]*)?") def __new__(cls, pack_uri_str: str): - if not pack_ur...
["tests/opc/test_packuri.py::DescribePackURI::it_should_raise_on_construct_with_bad_pack_uri_str"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
9
1
1,400
0
0.6
1
0.75
1
0.263333
81.065
6,250
swe_smith::train::8936
swe_smith
train
8,936
pyupio__safety.7654596b.func_pm_remove_assign__lex9ehgj
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
Scan command fails with NameError when using --debug flag #### Description When running the `safety scan` command with the `--debug` flag, the command fails with a NameError due to undefined variables being referenced in the scan function. #### Steps/Code to Reproduce ```bash safety --debug scan ``` The command ex...
diff --git a/safety/scan/command.py b/safety/scan/command.py index 2c74baf..5fc2eea 100644 --- a/safety/scan/command.py +++ b/safety/scan/command.py @@ -272,13 +272,6 @@ def scan(ctx: typer.Context, ecosystems = [Ecosystem(member.value) for member in list(ScannableEcosystems)] to_include = {file_type: paths f...
["tests/test_cli.py::TestSafetyCLI::test_debug_flag"]
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
40
1
780
0
0.6
1
0.75
1
0.263333
81.065
6,251
swe_smith::train::10365
swe_smith
train
10,365
paramiko__paramiko.23f92003.func_basic__8q9uy1dg
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP file prefetching broken - parameters swapped in async requests #### Description SFTP file operations with prefetching are failing due to incorrect parameter ordering in async read requests. When using prefetch functionality, the length and offset parameters appear to be swapped, causing read operations to fail. ...
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index c74695e..d2d5006 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -546,23 +546,20 @@ class SFTPFile(BufferedFile): t.start() def _prefetch_thread(self, chunks, max_concurrent_requests): - # do these read requests in...
["tests/test_sftp.py::TestSFTP::test_get_put", "tests/test_sftp_big.py::TestBigSFTP::test_big_file_pipelined", "tests/test_sftp_big.py::TestBigSFTP::test_prefetch_seek", "tests/test_sftp_big.py::TestBigSFTP::test_readv_seek", "tests/test_sftp_big.py::TestBigSFTP::test_lots_of_prefetching", "tests/test_sftp_big.py::Test...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
9
9
1,400
0
0.6
1
0.75
1
0.263333
81.065
6,252
swe_smith::train::31685
swe_smith
train
31,685
benoitc__gunicorn.bacbf8aa.lm_rewrite__hq9ua3ps
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
### Describe the bug When attempting to create a socket using a byte string address, a `TypeError` is raised. The error message indicates that the socket type cannot be determined for the given address format. ### How to Reproduce 1. Create a mock configuration with a byte string address: ```python conf = mock...
diff --git a/gunicorn/sock.py b/gunicorn/sock.py index eb2b6fa..36eed17 100644 --- a/gunicorn/sock.py +++ b/gunicorn/sock.py @@ -127,17 +127,22 @@ class UnixSocket(BaseSocket): def _sock_type(addr): - if isinstance(addr, tuple): - if util.is_ipv6(addr[0]): - sock_type = TCP6Socket + """Retu...
["tests/test_sock.py::test_create_sockets_unix_bytes"]
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
23
1
1,120
0
0.6
1
0.75
1
0.263333
81.065
6,253
r2e_gym::train::5955
r2e_gym
train
5,955
tornado__91f3f0fe1f95bf032c1b258da21900988cb92153
tornado
tornadoweb/tornado
python
91f3f0fe1f95bf032c1b258da21900988cb92153
**Title:** TypeError When Using `quiet_exceptions` with `gen.Multi` and `gen.multi_future` **Description:** When attempting to use the `quiet_exceptions` argument with `gen.Multi` or `gen.multi_future`, a `TypeError` is raised because these functions do not recognize the `quiet_exceptions` parameter. **Example Code:*...
diff --git a/tornado/gen.py b/tornado/gen.py --- a/tornado/gen.py +++ b/tornado/gen.py @@ -556,11 +556,17 @@ Futures, in which case a parallel dictionary is returned mapping the same keys to their results. + It is not normally necessary to call this class directly, as it + will be created automaticall...
diff --git a/tornado/test/gen_test.py b/tornado/test/gen_test.py --- a/tornado/test/gen_test.py +++ b/tornado/test/gen_test.py @@ -403,11 +403,16 @@ self.async_exception(RuntimeError("error 2"))]) self.assertEqual(str(cm.exception), "error 1") - return # With...
null
null
namanjain12/tornado_final:91f3f0fe1f95bf032c1b258da21900988cb92153
true
null
1
44
null
1,412
0
0.75
1
0.6375
1
0.382
81.06475
6,254
swe_smith::train::42691
swe_smith
train
42,691
python-jsonschema__jsonschema.93e0caa5.func_pm_ctrl_invert_if__tpvgfwjj
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
Dependencies validation broken for array-type dependencies #### Description When validating JSON schemas with array-type dependencies, the validation logic appears to be inverted. Array dependencies that should check for required properties are instead being validated as schema dependencies, and schema dependencies a...
diff --git a/jsonschema/_legacy_keywords.py b/jsonschema/_legacy_keywords.py index c691589..54d2034 100644 --- a/jsonschema/_legacy_keywords.py +++ b/jsonschema/_legacy_keywords.py @@ -64,15 +64,14 @@ def dependencies_draft4_draft6_draft7( continue if validator.is_type(dependency, "array"): + ...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_bignum_float_comparison_with_high_precision_comparison_works_for_high_numbers", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_bignum_float_comparison_with_high_precision_on_negative_numbers_comparison_works_for_very_negative_numbers"...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
9
59
1,399
0
0.6
1
0.75
1
0.263167
81.0645
6,255
swe_smith::train::11704
swe_smith
train
11,704
andialbrecht__sqlparse.e57923b3.func_basic__8r5rd54u
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
Formatter options behaving unexpectedly after recent changes #### Description The SQL formatter is not working as expected. Several formatting options seem to have their behavior inverted or changed from what they should be. #### Steps/Code to Reproduce ```python import sqlparse # Basic reindent formatting fails s...
diff --git a/sqlparse/formatter.py b/sqlparse/formatter.py index 72f2c19..508cf19 100644 --- a/sqlparse/formatter.py +++ b/sqlparse/formatter.py @@ -38,7 +38,7 @@ def validate_options(options): # noqa: C901 raise SQLParseError('Invalid value for use_space_around_operators: ' '{!r}...
["tests/test_cli.py::test_stdout", "tests/test_cli.py::test_encoding_stdout[encoding_utf8.sql-utf-8]", "tests/test_cli.py::test_encoding_stdout[encoding_gbk.sql-gbk]", "tests/test_cli.py::test_encoding_output_file[encoding_utf8.sql-utf-8]", "tests/test_cli.py::test_encoding_output_file[encoding_gbk.sql-gbk]", "tests/te...
["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_valid_args", "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_outfi...
jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3
true
null
1
18
73
1,219
0
0.6
1
0.75
1
0.263167
81.0645
6,256
swe_smith::train::48239
swe_smith
train
48,239
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__mhbnt121
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
UnboundLocalError when processing lint results #### Description When running the linter, an `UnboundLocalError` is raised for the variable `lerr` in the rule processing logic. This appears to be related to the order of operations when creating and processing linting errors. #### Steps/Code to Reproduce The error oc...
diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py index 1f00fb3..acf94cc 100644 --- a/src/sqlfluff/core/rules/base.py +++ b/src/sqlfluff/core/rules/base.py @@ -620,24 +620,8 @@ class BaseRule(metaclass=RuleMetaclass): new_fixes: List[LintFix], root: BaseSegment, ) -> ...
["test/core/rules/docstring_test.py::test_backtick_replace", "test/core/rules/noqa_test.py::test__linter__raises_malformed_noqa", "test/core/rules/noqa_test.py::test_linter_noqa", "test/core/rules/noqa_test.py::test_linter_noqa_tmp", "test/core/rules/noqa_test.py::test_linter_noqa_disable", "test/core/rules/noqa_test.p...
["test/core/rules/docstring_test.py::test_content_count[\\\\*\\\\*Anti-pattern\\\\*\\\\*-1]", "test/core/rules/docstring_test.py::test_keyword_anti_before_best", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input0-True]", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
33
8
918
0
0.6
1
0.75
1
0.263
81.064
6,257
swe_smith::train::38386
swe_smith
train
38,386
dbader__schedule.82a43db1.func_basic__8yi3fug2
swesmith/dbader__schedule.82a43db1
dbader/schedule
python
null
Sunday scheduling broken - raises IntervalError for weekly jobs and sets wrong start day #### Description When scheduling jobs to run on Sunday using `.sunday()`, the method incorrectly raises an IntervalError for weekly jobs (interval=1) and sets the start day to "monday" instead of "sunday". #### Steps/Code to Rep...
diff --git a/schedule/__init__.py b/schedule/__init__.py index 8e12eeb..0e5aebe 100644 --- a/schedule/__init__.py +++ b/schedule/__init__.py @@ -445,14 +445,14 @@ class Job: @property def sunday(self): - if self.interval != 1: + if self.interval == 1: raise IntervalError( ...
["test_schedule.py::SchedulerTests::test_at_time", "test_schedule.py::SchedulerTests::test_next_run_time", "test_schedule.py::SchedulerTests::test_run_pending", "test_schedule.py::SchedulerTests::test_time_units", "test_schedule.py::SchedulerTests::test_tz_weekly_sunday_conversion"]
["test_schedule.py::SchedulerTests::test_align_utc_offset_after_fold_fixate", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_change", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold", "test_schedule.py::SchedulerT...
jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1
true
null
1
6
5
1,458
0
0.6
1
0.75
1
0.263
81.064
6,258
swe_smith::train::20655
swe_smith
train
20,655
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__kdfjlix5
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
GROUP_CONCAT parsing broken in MySQL dialect #### Description When parsing MySQL GROUP_CONCAT expressions, the parser encounters an UnboundLocalError due to incorrect variable scoping in the `_parse_group_concat` method. #### Steps/Code to Reproduce ```python import sqlglot # This should parse successfully but rai...
diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py index 927642a..33effce 100644 --- a/sqlglot/dialects/mysql.py +++ b/sqlglot/dialects/mysql.py @@ -652,18 +652,10 @@ class MySQL(Dialect): ) def _parse_group_concat(self) -> t.Optional[exp.Expression]: - def concat_expr...
["tests/dialects/test_mysql.py::TestMySQL::test_mysql"]
["tests/dialects/test_mysql.py::TestMySQL::test_analyze", "tests/dialects/test_mysql.py::TestMySQL::test_at_time_zone", "tests/dialects/test_mysql.py::TestMySQL::test_bits_literal", "tests/dialects/test_mysql.py::TestMySQL::test_canonical_functions", "tests/dialects/test_mysql.py::TestMySQL::test_convert", "tests/diale...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
33
1
918
0
0.6
1
0.75
1
0.263
81.064
6,259
swe_smith::train::7118
swe_smith
train
7,118
cantools__cantools.0c6a7871.combine_module__1i51wzrw
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Diagnostics database returns DIDs in wrong order #### Description When loading a CDD file, the diagnostics database returns DIDs in reverse order compared to expected. The `dids` property should return DIDs in their original order but currently returns them reversed. #### Steps/Code to Reproduce ```python import ca...
diff --git a/src/cantools/database/diagnostics/database.py b/src/cantools/database/diagnostics/database.py index de312e8..3fb882f 100644 --- a/src/cantools/database/diagnostics/database.py +++ b/src/cantools/database/diagnostics/database.py @@ -28,7 +28,7 @@ class Database: """ - return self._dids +...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_le_example_cdd", "tests/test_diagnostics_database.py::C...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
2
20
4
1,178
0
0.6
1
0.75
1
0.263
81.064
6,260
r2e_gym::train::5984
r2e_gym
train
5,984
tornado__9963e737aaa1ff158897ef9f92c361894005e669
tornado
tornadoweb/tornado
python
9963e737aaa1ff158897ef9f92c361894005e669
**Title:** WebSocketHandler Does Not Reject Connections with Invalid Origin Headers **Description:** When initiating a WebSocket connection with an invalid Origin header, the server is expected to reject the connection to prevent unauthorized cross-origin access. Currently, connections with invalid Origin headers are ...
diff --git a/tornado/websocket.py b/tornado/websocket.py --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -145,9 +145,34 @@ self.stream.close() return + # Handle WebSocket Origin naming convention differences # The difference between version 8 and 13 is that in 8 the ...
diff --git a/tornado/test/websocket_test.py b/tornado/test/websocket_test.py --- a/tornado/test/websocket_test.py +++ b/tornado/test/websocket_test.py @@ -189,22 +189,49 @@ yield self.close_future @gen_test - def test_check_origin_invalid(self): - '''Currently a failing test''' - port =...
null
null
namanjain12/tornado_final:9963e737aaa1ff158897ef9f92c361894005e669
true
null
1
68
null
930
0
0.75
1
0.6375
1
0.381667
81.06375
6,261
swe_smith::train::43973
swe_smith
train
43,973
pydata__patsy.a5d16484.func_basic__bsk4udta
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Matrix shape validation broken when passing explicit matrices When passing explicit matrices (numpy arrays, pandas DataFrames, etc.) to `dmatrix` or `dmatrices`, the shape validation logic is inverted, causing valid matrices to be rejected and invalid matrices to be accepted. #### Steps/Code to Reproduce ```python i...
diff --git a/patsy/highlevel.py b/patsy/highlevel.py index 1af6ce8..a91f568 100644 --- a/patsy/highlevel.py +++ b/patsy/highlevel.py @@ -167,7 +167,6 @@ def _do_highlevel_design(formula_like, data, eval_env, NA_action, return_type): design_infos, data, NA_action=NA_action, return_type=return_type ...
["patsy/test_highlevel.py::test_formula_likes"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
38
1
817
0
0.6
1
0.75
1
0.262833
81.0635
6,262
swe_smith::train::8994
swe_smith
train
8,994
pyupio__safety.7654596b.func_pm_remove_cond__v638ky3i
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
Scan command fails with AttributeError when accessing project attributes #### Description When running the scan command, the code attempts to access attributes on `ctx.obj.project` before the project object is properly initialized, causing an AttributeError. #### Steps/Code to Reproduce ```python from safety.cli im...
diff --git a/safety/scan/decorators.py b/safety/scan/decorators.py index 72d7e4e..07670ea 100644 --- a/safety/scan/decorators.py +++ b/safety/scan/decorators.py @@ -85,25 +85,9 @@ def scan_project_command_init(func): origin = None branch = None - if git_data: - origin = git_data.or...
["tests/test_cli.py::TestSafetyCLI::test_debug_flag"]
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
30
1
977
0
0.6
1
0.75
1
0.262833
81.0635
6,263
swe_smith::train::39602
swe_smith
train
39,602
pallets__jinja.ada0a9a6.lm_rewrite__k28bluu3
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
# replace filter doesn't work with count parameter I think I found a bug in the `replace` filter. When I try to use it with the `count` parameter, it fails with a TypeError. Here's a simple example to reproduce the issue: ```jinja2 {{ "hello hello hello" | replace("hello", "hi", 2) }} ``` This should replace only t...
diff --git a/src/jinja2/filters.py b/src/jinja2/filters.py index 1420877..7ebeebd 100644 --- a/src/jinja2/filters.py +++ b/src/jinja2/filters.py @@ -175,9 +175,9 @@ def do_urlencode( @pass_eval_context -def do_replace( - eval_ctx: "EvalContext", s: str, old: str, new: str, count: t.Optional[int] = None -) -> st...
["tests/test_filters.py::TestFilter::test_replace"]
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
28
1
1,017
0
0.6
1
0.75
1
0.262833
81.0635
6,264
swe_smith::train::22446
swe_smith
train
22,446
tweepy__tweepy.91a41c6e.func_pm_class_rm_funcs__j2q04zdl
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Cursor Pagination Issue It seems there's a problem with the cursor pagination after the recent changes. The `Cursor` class no longer initializes properly, leading to unexpected behavior when trying to iterate over items or pages. #### How to reproduce: 1. Attempt to use the `Cursor` class with any method that re...
diff --git a/tweepy/cursor.py b/tweepy/cursor.py index 1db73e1..a80b3f4 100644 --- a/tweepy/cursor.py +++ b/tweepy/cursor.py @@ -22,23 +22,6 @@ class Cursor: Keyword arguments to pass to ``method`` """ - def __init__(self, method, *args, **kwargs): - if hasattr(method, 'pagination_mode'): - ...
["tests/test_cursors.py::TweepyCursorTests::testcursorcursoritems", "tests/test_cursors.py::TweepyCursorTests::testcursorcursorpages", "tests/test_cursors.py::TweepyCursorTests::testcursornext", "tests/test_cursors.py::TweepyCursorTests::testcursorsetstartcursor", "tests/test_cursors.py::TweepyCursorTests::testidcursor...
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
35
6
877
0
0.6
1
0.75
1
0.262833
81.0635
6,265
swe_smith::train::2623
swe_smith
train
2,623
pdfminer__pdfminer.six.1a8bd2f7.lm_rewrite__lv1ja7kx
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
### TypeError when using unsupported input type with `open_filename` **Describe the bug & Reproduce** When using the `open_filename` context manager, passing an unsupported input type such as an integer results in an unexpected behavior. The function should raise a `TypeError` when the input is not a string, `pathlib...
diff --git a/pdfminer/utils.py b/pdfminer/utils.py index a5b5385..00537f4 100644 --- a/pdfminer/utils.py +++ b/pdfminer/utils.py @@ -47,17 +47,19 @@ class open_filename: """ def __init__(self, filename: FileOrName, *args: Any, **kwargs: Any) -> None: - if isinstance(filename, pathlib.PurePath): - ...
["tests/test_utils.py::TestOpenFilename::test_unsupported_input"]
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
20
1
1,176
0
0.6
1
0.75
1
0.262667
81.063
6,266
swe_smith::train::24511
swe_smith
train
24,511
sunpy__sunpy.f8edfd5c.combine_module__j13k1uk4
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Chaincode.subboundingbox() fails when using yedge parameter ## Description I found an issue with the `subboundingbox()` method in the `Chaincode` class. When trying to use the `yedge` parameter, the method raises a `ValueError` saying "Please input either `xedge` or `yedge`" even though I'm explicitly providing the...
diff --git a/sunpy/net/helio/chaincode.py b/sunpy/net/helio/chaincode.py index e4757ef..3e0d087 100644 --- a/sunpy/net/helio/chaincode.py +++ b/sunpy/net/helio/chaincode.py @@ -102,11 +102,11 @@ class Chaincode(np.ndarray): IndexMask = 0 IndexValue = 1 elif yedge is not None: + ...
["sunpy/net/helio/tests/test_chaincode.py::test_subboundingboxy", "sunpy/net/vso/tests/test_vso.py::test_from_zeep_response", "sunpy/net/vso/tests/test_vso.py::test_QueryResponse_build_table_with_extent_type", "sunpy/net/vso/tests/test_vso.py::test_QueryResponse_build_table_with_no_start_time", "sunpy/net/vso/tests/tes...
["sunpy/net/helio/tests/test_chaincode.py::test_ends", "sunpy/net/helio/tests/test_chaincode.py::test_endsfalse", "sunpy/net/helio/tests/test_chaincode.py::test_secondcoordinate", "sunpy/net/helio/tests/test_chaincode.py::test_secondcoordinatefails", "sunpy/net/helio/tests/test_chaincode.py::test_scalesecond", "sunpy/n...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
15
6
1,276
0
0.6
1
0.75
1
0.262667
81.063
6,267
swe_smith::train::20015
swe_smith
train
20,015
kurtmckee__feedparser.cad965a3.func_pm_ctrl_shuffle__1xu5p0s7
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
asctime date parser fails with UnboundLocalError #### Description The asctime date parser is throwing an `UnboundLocalError` when trying to parse certain date formats. This appears to be related to variable scope issues in the parsing logic. #### Steps/Code to Reproduce ```python import feedparser # This should wo...
diff --git a/feedparser/datetimes/asctime.py b/feedparser/datetimes/asctime.py index d7f8db0..516153a 100644 --- a/feedparser/datetimes/asctime.py +++ b/feedparser/datetimes/asctime.py @@ -44,6 +44,24 @@ _months = [ def _parse_date_asctime(dt): + + # Reassemble the parts in an RFC822-compatible order and parse ...
["tests/test_ill_formed.py::test_http_conditions[info0]"]
["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
1
38
1
816
0
0.6
1
0.75
1
0.262667
81.063
6,268
swe_smith::train::2182
swe_smith
train
2,182
pdfminer__pdfminer.six.1a8bd2f7.func_basic__hs3lxwu0
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFDevice begin_tag method causes AttributeError when processing documents #### Description When processing PDF documents, the PDFDevice class throws an AttributeError because the `begin_tag` method tries to access attributes that don't exist on the class instance. #### Steps/Code to Reproduce ```python from pdfmin...
diff --git a/pdfminer/pdfdevice.py b/pdfminer/pdfdevice.py index 2374601..c5f0bfa 100644 --- a/pdfminer/pdfdevice.py +++ b/pdfminer/pdfdevice.py @@ -52,7 +52,25 @@ class PDFDevice: self.ctm = ctm def begin_tag(self, tag: PSLiteral, props: Optional["PDFStackT"] = None) -> None: - pass + if ...
["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cid_range", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_791_non_unicode_cmap", "tests/test_highlevel_extracttext.py::TestExtractText::te...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
20
13
1,176
0
0.6
1
0.75
1
0.262667
81.063
6,269
swe_smith::train::49262
swe_smith
train
49,262
mozilla__bleach.73871d76.func_basic__7gzhyz9t
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML tree builder Element initialization broken with namespace handling #### Description When using bleach with HTML content that involves namespaces, the Element class in the etree tree builder is not properly handling name and namespace parameters during initialization. This causes various HTML processing operation...
diff --git a/bleach/_vendor/html5lib/treebuilders/etree.py b/bleach/_vendor/html5lib/treebuilders/etree.py index 5ccfc4d..b1e4341 100644 --- a/bleach/_vendor/html5lib/treebuilders/etree.py +++ b/bleach/_vendor/html5lib/treebuilders/etree.py @@ -22,17 +22,17 @@ def getETreeBuilder(ElementTreeImplementation, fullTree=Fal...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
18
183
1,215
0
0.6
1
0.75
1
0.2625
81.0625
6,270
swe_smith::train::20314
swe_smith
train
20,314
gruns__furl.da386f68.func_pm_class_rm_funcs__9c7p5dqi
swesmith/gruns__furl.da386f68
gruns/furl
python
null
Path equality comparison broken after removing __eq__ method #### Description Path objects no longer compare equal when they should. The equality comparison seems to be falling back to object identity instead of string comparison. #### Steps/Code to Reproduce ```python import furl # Create two Path objects with th...
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..3acfc5a 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -569,20 +569,6 @@ class Path(object): return self - def normalize(self): - """ - Normalize the path. Turn '//a/./b/../c//' into '/a/c/'. - - Returns: <self>. - """ ...
["tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_normalize", "tests/test_furl.py::TestPath::test_truediv", "tests/test_furl.py::TestFurl::test_scheme"]
["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_itruediv", "tests/test_furl.py::TestPath::test_le...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
18
4
1,215
0
0.6
1
0.75
1
0.2625
81.0625
6,271
swe_smith::train::31841
swe_smith
train
31,841
davidhalter__parso.338a5760.combine_module__rd9h53jw
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Diff parser crashes with AttributeError on NoneType When using the diff parser on certain code changes, it crashes with `AttributeError: 'NoneType' object has no attribute` errors. This seems to happen when the parser encounters specific indentation or structural changes in Python code. #### Steps/Code to Reproduce ...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..49e0eca 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -168,9 +168,9 @@ def _get_last_line(node_or_leaf): def _skip_dedent_error_leaves(leaf): - while leaf is not None and leaf.type == 'error_leaf' and leaf.token_type == 'D...
["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
2
18
89
1,215
0
0.6
1
0.75
1
0.2625
81.0625
6,272
swe_smith::train::23936
swe_smith
train
23,936
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__4giqg3bp
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
get_requirements function returns undefined variable #### Description The `get_requirements` function in `sunpy.util.sysinfo` is returning an undefined variable `requires_dict` before it's initialized, causing an `UnboundLocalError` when trying to access package requirements. #### Steps/Code to Reproduce ```python ...
diff --git a/sunpy/util/sysinfo.py b/sunpy/util/sysinfo.py index f5a780f..8427134 100644 --- a/sunpy/util/sysinfo.py +++ b/sunpy/util/sysinfo.py @@ -15,6 +15,19 @@ __all__ = ['system_info', 'find_dependencies', 'missing_dependencies_by_extra'] def get_requirements(package): + return requires_dict + for requi...
["sunpy/util/tests/test_sysinfo.py::test_find_dependencies", "sunpy/util/tests/test_sysinfo.py::test_missing_dependencies_by_extra", "sunpy/util/tests/test_sysinfo.py::test_system_info"]
["sunpy/util/tests/test_sysinfo.py::test_resolve_requirement_versions", "sunpy/util/tests/test_sysinfo.py::test_format_requirement_string"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
27
3
1,035
0
0.6
1
0.75
1
0.2625
81.0625
6,273
swe_smith::train::23847
swe_smith
train
23,847
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__c4prqbfc
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Factory registration fails when validation_function is None #### Description When registering a widget with the BasicRegistrationFactory without providing a validation_function parameter, the registration process incorrectly tries to check if None is callable, causing an AttributeError. #### Steps/Code to Reproduce ...
diff --git a/sunpy/util/datatype_factory_base.py b/sunpy/util/datatype_factory_base.py index 6c132c0..dabb502 100644 --- a/sunpy/util/datatype_factory_base.py +++ b/sunpy/util/datatype_factory_base.py @@ -116,10 +116,6 @@ class BasicRegistrationFactory: if is_default: self.default_widget_type = Wi...
["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", "sunpy/util/te...
["sunpy/util/tests/test_datatype_factory_base.py::test_validation_fun_not_callable"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
13
5
1,315
0
0.6
1
0.75
1
0.2625
81.0625
6,274
swe_smith::train::10075
swe_smith
train
10,075
paramiko__paramiko.23f92003.combine_file__8cik9yq0
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP operations failing with "OSError: ess" on file operations #### Description SFTP file operations are failing with cryptic "OSError: ess" messages. This affects basic file operations like creating, reading, writing, and listing files through the SFTP interface. #### Steps/Code to Reproduce ```python import param...
diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index cd3910d..8f3aff2 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -207,16 +207,16 @@ class SFTPServer(BaseSFTP, SubsystemHandler): name of the file to alter (should usually be an absolute path). :param .SFTPA...
["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_append", "tests/test_sftp.py::TestSFTP::test_rename", "tests/test_sftp.py::TestSFTP::testa_posix_rename", "tests/test...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
14
42
1,295
0
0.6
1
0.75
1
0.2625
81.0625
6,275
swe_smith::train::8980
swe_smith
train
8,980
pyupio__safety.7654596b.func_pm_remove_cond__d6zryo9y
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
Scan command fails with AttributeError when project is not initialized #### Description When running the scan command, the CLI crashes with an AttributeError because it tries to access `ctx.obj.project.upload_request_id` before the project object is properly initialized. #### Steps/Code to Reproduce ```python from ...
diff --git a/safety/scan/decorators.py b/safety/scan/decorators.py index 72d7e4e..962dfb3 100644 --- a/safety/scan/decorators.py +++ b/safety/scan/decorators.py @@ -85,19 +85,6 @@ def scan_project_command_init(func): origin = None branch = None - if git_data: - origin = git_data.or...
["tests/test_cli.py::TestSafetyCLI::test_debug_flag"]
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
31
1
955
0
0.6
1
0.75
1
0.2625
81.0625
6,276
swe_smith::train::38892
swe_smith
train
38,892
pallets__jinja.ada0a9a6.func_basic__7whhiqbe
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
NativeTemplate.render() returns generator instead of expected types #### Description When using NativeTemplate, the `render()` method is returning a generator object instead of the expected native Python types. This breaks the core functionality of native templates which should return actual Python objects like strin...
diff --git a/src/jinja2/nativetypes.py b/src/jinja2/nativetypes.py index 71db8cc..d906113 100644 --- a/src/jinja2/nativetypes.py +++ b/src/jinja2/nativetypes.py @@ -102,14 +102,15 @@ class NativeTemplate(Template): with :func:`ast.literal_eval`, the parsed value is returned. Otherwise, the string is r...
["tests/test_nativetypes.py::test_is_defined_native_return", "tests/test_nativetypes.py::test_undefined_native_return", "tests/test_nativetypes.py::test_adding_undefined_native_return", "tests/test_nativetypes.py::test_cast_int", "tests/test_nativetypes.py::test_list_add", "tests/test_nativetypes.py::test_multi_express...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
13
19
1,314
0
0.6
1
0.75
1
0.262333
81.062
6,277
swe_smith::train::24045
swe_smith
train
24,045
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__mxt7oqwq
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
TimeSeries plotting fails with UnboundLocalError when columns is None #### Description When trying to plot a TimeSeries with `columns=None` (or when columns defaults to None), the plotting functionality fails with an `UnboundLocalError` for the `plt` variable. This appears to be related to the `_setup_axes_columns` m...
diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py index 80e5d20..3189787 100644 --- a/sunpy/timeseries/timeseriesbase.py +++ b/sunpy/timeseries/timeseriesbase.py @@ -716,23 +716,22 @@ class GenericTimeSeries: return axes def _setup_axes_columns(self, axes, columns, *, ...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_empty_ts_invalid_peek"]
["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
17
1
1,234
0
0.6
1
0.75
1
0.262333
81.062
6,278
swe_smith::train::2493
swe_smith
train
2,493
pdfminer__pdfminer.six.1a8bd2f7.func_pm_remove_assign__704dr65h
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
LTChar initialization fails with NameError for undefined variables #### Description When creating LTChar objects, the initialization process fails with NameError exceptions for several undefined variables including `bbox_lower_left`, `a`, `d`, and others. This appears to be affecting character layout processing in PD...
diff --git a/pdfminer/layout.py b/pdfminer/layout.py index ee27b69..d2fad64 100644 --- a/pdfminer/layout.py +++ b/pdfminer/layout.py @@ -370,7 +370,6 @@ class LTChar(LTComponent, LTText): self.matrix = matrix self.fontname = font.fontname self.ncs = ncs - self.graphicstate = graphicsta...
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
13
52
1,314
0
0.6
1
0.75
1
0.262333
81.062
6,279
swe_smith::train::3509
swe_smith
train
3,509
pygments__pygments.27649ebb.combine_file__tao3bjaj
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
LassoLexer broken after recent changes - AttributeError on list object #### Description The LassoLexer is throwing AttributeError when trying to use the `update` method on what appears to be a list object instead of a set. This is affecting all Lasso-related lexers including LassoLexer, LassoCssLexer, LassoJavascript...
diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py index 891e48e..c9b6edf 100644 --- a/pygments/lexers/javascript.py +++ b/pygments/lexers/javascript.py @@ -751,32 +751,32 @@ class LassoLexer(RegexLexer): def __init__(self, **options): self.builtinshighlighting = get_bool_opt( - ...
["tests/test_basic_api.py::test_lexer_options[LassoHtmlLexer]", "tests/test_basic_api.py::test_lexer_options[LassoJavascriptLexer]", "tests/test_basic_api.py::test_random_input[LassoHtmlLexer]", "tests/test_basic_api.py::test_random_input[LassoCssLexer]", "tests/test_basic_api.py::test_random_input[LassoJavascriptLexer...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
33
15
914
0
0.6
1
0.75
1
0.262333
81.062
6,280
swe_smith::train::6987
swe_smith
train
6,987
cantools__cantools.0c6a7871.combine_file__e2ulmgdz
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
KCD format export fails with TypeError when dumping messages with comments #### Description When exporting a database to KCD format, the conversion fails with a TypeError if messages contain comments. The error occurs during the XML generation process. #### Steps/Code to Reproduce ```python import cantools # Load ...
diff --git a/src/cantools/database/can/formats/kcd.py b/src/cantools/database/can/formats/kcd.py index a54c86c..19878a9 100644 --- a/src/cantools/database/can/formats/kcd.py +++ b/src/cantools/database/can/formats/kcd.py @@ -249,24 +249,24 @@ def _indent_xml(element, indent, level=0): if len(element): i...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "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/tes...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
25
5
1,074
0
0.6
1
0.75
1
0.262333
81.062
6,281
swe_smith::train::52525
swe_smith
train
52,525
pydicom__pydicom.7d361b3d.func_pm_remove_assign__tq8sst77
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
RecordNode summary method raises NameError for undefined variables #### Description When calling methods that generate summary strings for RecordNode instances, several undefined variables are referenced causing NameError exceptions. #### Steps/Code to Reproduce ```python from pydicom.fileset import FileSet from py...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..71297b7 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -473,26 +473,10 @@ class RecordNode(Iterable["RecordNode"]): def leaf_summary(node: "RecordNode", indent_char: str) -> list[str]: """Summarize t...
["tests/test_fileset.py::TestFileSet::test_add_dataset", "tests/test_fileset.py::TestFileSet::test_remove", "tests/test_fileset.py::TestFileSet::test_str", "tests/test_fileset.py::TestFileSet::test_str_update_structure"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
22
4
1,134
0
0.6
1
0.75
1
0.262333
81.062
6,282
swe_smith::train::4906
swe_smith
train
4,906
bottlepy__bottle.a8dfef30.func_pm_class_rm_funcs__djl4d1a7
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
StplParser missing flush_text and write_code methods breaks template rendering When using bottle templates, I'm getting AttributeError exceptions saying that StplParser object has no attribute 'flush_text' or 'write_code'. This seems to affect all template rendering functionality. #### Steps/Code to Reproduce ```pyt...
diff --git a/bottle.py b/bottle.py index 286b5bc..10350a2 100755 --- a/bottle.py +++ b/bottle.py @@ -4424,38 +4424,11 @@ class StplParser(object): return offset - def flush_text(self): - text = ''.join(self.text_buffer) - del self.text_buffer[:] - if not text: return - parts,...
["test/test_auth.py::TestBasicAuth::test__header", "test/test_exc.py::TestAppException::test_noncatched_error", "test/test_exc.py::TestAppException::test_other_error", "test/test_mount.py::TestAppMounting::test_mount", "test/test_mount.py::TestAppMounting::test_no_slash_prefix", "test/test_outputfilter.py::TestOutputFi...
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module", "test/test_config.py::TestConfDict::test_meta", ...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
27
71
1,034
0
0.6
1
0.75
1
0.262333
81.062
6,283
swe_smith::train::29612
swe_smith
train
29,612
django__channels.a144b4b8.func_pm_class_rm_funcs__i9zx8pnh
swesmith/django__channels.a144b4b8
django/channels
python
null
WebsocketConsumer disconnect handling broken after removing websocket_disconnect method #### Description WebSocket connections are not properly handled when they disconnect. The consumer seems to be missing the automatic cleanup that should happen when a WebSocket connection closes. #### Steps/Code to Reproduce ```...
diff --git a/channels/generic/websocket.py b/channels/generic/websocket.py index b4d9911..f854b07 100644 --- a/channels/generic/websocket.py +++ b/channels/generic/websocket.py @@ -95,30 +95,12 @@ class WebsocketConsumer(SyncConsumer): message["reason"] = reason super().send(message) - def we...
["tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_generic_websocket.py::test_websocket_consumer_groups", "tests/test_generic_websocket.py::test_websocket_receive_with_none_text", "tests/test_testing.py::test_webso...
["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer_subprotocol", "tests/test_generic_websocket.py::test_json_websocket_consumer", "tests/test_generic_websocket.py::test_accept_headers[F...
jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8
true
null
1
18
9
1,214
0
0.6
1
0.75
1
0.262333
81.062
6,284
swe_smith::train::51722
swe_smith
train
51,722
pydicom__pydicom.7d361b3d.func_basic__2smpcos9
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
RecordNode._calculate_length returns incorrect values after recent changes #### Description The `_calculate_length` method in `RecordNode` is producing incorrect length calculations, causing KeyError exceptions when working with DICOM filesets. The method appears to be using wrong endianness settings and offset calcu...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..174c9f2 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -324,27 +324,23 @@ class RecordNode(Iterable["RecordNode"]): :meth:`~pydicom.fileset.RecordNode._update_record_offsets` """ fp = DicomBytesIO...
["tests/test_fileset.py::TestRecordNode::test_encoding", "tests/test_fileset.py::TestRecordNode::test_file_id_singleton", "tests/test_fileset.py::TestFileInstance::test_path", "tests/test_fileset.py::TestFileInstance::test_load", "tests/test_fileset.py::TestFileInstance::test_for_moving", "tests/test_fileset.py::TestFi...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
16
50
1,253
0
0.6
1
0.75
1
0.262167
81.0615
6,285
swe_smith::train::23934
swe_smith
train
23,934
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__45zpnfbj
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
LYRATimeSeries.plot() returns None instead of axes #### Description The `plot()` method in `LYRATimeSeries` is returning `None` instead of the expected axes object. This breaks code that expects to work with the returned axes. #### Steps/Code to Reproduce ```python import sunpy.timeseries as ts from sunpy.data.test...
diff --git a/sunpy/timeseries/sources/lyra.py b/sunpy/timeseries/sources/lyra.py index 1ca8fb9..e8771e7 100644 --- a/sunpy/timeseries/sources/lyra.py +++ b/sunpy/timeseries/sources/lyra.py @@ -56,6 +56,21 @@ class LYRATimeSeries(GenericTimeSeries): _url = "https://proba2.sidc.be/about/LYRA" def plot(self, a...
["sunpy/timeseries/sources/tests/test_lyra.py::test_lyra_plot_column"]
["sunpy/timeseries/sources/tests/test_lyra.py::test_implicit_lyra", "sunpy/timeseries/sources/tests/test_lyra.py::test_lyra"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
31
1
953
0
0.6
1
0.75
1
0.262167
81.0615
6,286
swe_smith::train::45116
swe_smith
train
45,116
modin-project__modin.8c7799fd.func_pm_ctrl_invert_if__cht3xick
swesmith/modin-project__modin.8c7799fd
modin-project/modin
python
null
Array broadcasting logic broken for same-dimension operations #### Description When performing binary operations between arrays of the same dimensions, the broadcasting logic incorrectly raises ValueError for valid operations that should work. #### Steps/Code to Reproduce ```python import modin.numpy as np # Creat...
diff --git a/modin/numpy/arr.py b/modin/numpy/arr.py index ab40eca..03e50a2 100644 --- a/modin/numpy/arr.py +++ b/modin/numpy/arr.py @@ -814,19 +814,6 @@ class array(object): ) broadcast = self._ndim != other._ndim if broadcast: - # In this case, we have a 1D object doing a bin...
["modin/tests/numpy/test_array.py::test_update_inplace", "modin/tests/numpy/test_array.py::test_out_broadcast[data_out0]", "modin/tests/numpy/test_array.py::test_out_broadcast_error", "modin/tests/numpy/test_array.py::test_array_ufunc[100]", "modin/tests/numpy/test_array.py::test_array_ufunc[size1]", "modin/tests/numpy...
["modin/tests/numpy/test_array.py::test_shape[100]", "modin/tests/numpy/test_array.py::test_shape[size1]", "modin/tests/numpy/test_array.py::test_shape[size2]", "modin/tests/numpy/test_array.py::test_shape[size3]", "modin/tests/numpy/test_array.py::test_shape[size4]", "modin/tests/numpy/test_array.py::test_dtype", "mod...
jyangballin/swesmith.x86_64.modin-project_1776_modin.8c7799fd
true
null
1
33
74
913
0
0.6
1
0.75
1
0.262167
81.0615
6,287
swe_smith::train::18383
swe_smith
train
18,383
msiemens__tinydb.10644a0e.pr_518
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
# Table creation with persist_empty=True fails after recent changes ## Description After a recent update, creating a table with the `persist_empty=True` parameter no longer works. This parameter was previously used to ensure that empty tables are stored in the database even when no operations have been performed on t...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..694d809 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -72,7 +72,6 @@ class Table: :param storage: The storage instance to use for this table :param name: The table name :param cache_size: Maximum capacity of query cache - :param per...
["tests/test_tables.py::test_persist_table[memory]", "tests/test_tables.py::test_persist_table[json]"]
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
12
2
1,332
0
0.6
1
0.75
1
0.262
81.061
6,288
swe_smith::train::43219
swe_smith
train
43,219
gawel__pyquery.811cd048.lm_rewrite__1uwgcbjb
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
# root() method returns element instead of ElementTree ## Description The `root()` method in PyQuery is returning the root element instead of the element tree. This causes issues when trying to access properties that are only available on the ElementTree object. ## Steps to reproduce Here's a simple example that de...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..107b998 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -389,10 +389,18 @@ class PyQuery(list): def root(self): """return the xml root element """ - if self._parent is not no_default: - return self._...
["tests/test_pyquery.py::TestSelector::test_get_root", "tests/test_pyquery.py::TestAjax::test_serialize_pairs_form_controls", "tests/test_pyquery.py::TestAjax::test_serialize_pairs_form_id"]
["README.rst::README.rst", "docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/manipulating.rst::manipulating.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselec...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
16
3
1,252
0
0.6
1
0.75
1
0.262
81.061
6,289
swe_smith::train::52576
swe_smith
train
52,576
pydicom__pydicom.7d361b3d.func_pm_remove_cond__fmszvrbr
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
FileSet.load() ignores raise_orphans and include_orphans parameters #### Description When loading a DICOMDIR with orphaned directory records, the `raise_orphans` and `include_orphans` parameters in `FileSet.load()` are not working as expected. The method should raise a ValueError when `raise_orphans=True` and orphane...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..5160032 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -1761,23 +1761,12 @@ class FileSet: if len(records) == len(list(iter(self._tree))): return - if raise_orphans: - raise ValueEr...
["tests/test_fileset.py::TestFileSet_Load::test_load_orphans_raise", "tests/test_fileset.py::TestFileSet_Load::test_load_orphans_exclude"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
12
2
1,332
0
0.6
1
0.75
1
0.262
81.061
6,290
swe_smith::train::45086
swe_smith
train
45,086
mahmoud__glom.fb3c4e76.lm_rewrite__sytoy90s
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
### Bug Report **Bug Summary** The `CheckError` message formatting seems to be incorrect when multiple errors are encountered during validation. The error message does not list the expected number of errors, leading to confusion when diagnosing issues. **Code for Reproduction** Here's a minimal example to reproduce...
diff --git a/glom/matching.py b/glom/matching.py index 798ac40..8bdffcc 100644 --- a/glom/matching.py +++ b/glom/matching.py @@ -1040,15 +1040,15 @@ class CheckError(GlomError): self.path = path def get_message(self): - msg = 'target at path %s failed check,' % self.path - if self.check_ob...
["glom/test/test_check.py::test_check_basic", "glom/test/test_check.py::test_check_multi"]
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
14
2
1,292
0
0.6
1
0.75
1
0.262
81.061
6,291
swe_smith::train::24856
swe_smith
train
24,856
marshmallow-code__marshmallow.9716fc62.func_pm_ctrl_shuffle__hx2lz48z
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Field validation not working after deserialization #### Description Field validation appears to be skipped during deserialization. When deserializing values that should trigger validation errors, the validation step is not executed, causing invalid data to pass through without raising ValidationError. #### Steps/Cod...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..8449085 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -351,6 +351,12 @@ class Field(FieldABC): data: typing.Mapping[str, typing.Any] | None = None, **kwargs, ): + if value is missi...
["tests/test_decorators.py::TestValidatesDecorator::test_precedence", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_skip_on_field_errors", "tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[String]", "tests/test_deserialization.py::TestDeserializingNone::te...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
17
154
1,232
0
0.6
1
0.75
1
0.262
81.061
6,292
swe_smith::train::50941
swe_smith
train
50,941
python-hyper__h11.bed0dd4a.lm_rewrite__h95g1zuz
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
# `bytesify` function now accepts integers instead of raising TypeError ## Description The `bytesify` function in h11 is now accepting integer values and converting them to bytes, which is a change in behavior from previous versions where it would raise a TypeError. ## Steps to reproduce ```python from h11._util imp...
diff --git a/h11/_util.py b/h11/_util.py index 6718445..17bca5a 100644 --- a/h11/_util.py +++ b/h11/_util.py @@ -124,12 +124,20 @@ class Sentinel(type): # Used for methods, request targets, HTTP versions, header names, and header # values. Accepts ascii-strings, or bytes/bytearray/memoryview/..., and always # return...
["h11/tests/test_util.py::test_bytesify"]
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_conn...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
24
1
1,092
0
0.6
1
0.75
1
0.262
81.061
6,293
r2e_gym::train::6578
r2e_gym
train
6,578
pillow__90077b397504c19d1aaf97a9081400130ad8ce46
pillow
python-pillow/pillow
python
90077b397504c19d1aaf97a9081400130ad8ce46
**Title:** `Image.rotate` method does not support `center` and `translate` parameters **Description:** When attempting to rotate an image with a specific center or apply a translation, the `Image.rotate` method raises a `TypeError` because it does not accept the `center` and `translate` keyword arguments. **Example C...
diff --git a/PIL/Image.py b/PIL/Image.py --- a/PIL/Image.py +++ b/PIL/Image.py @@ -1555,7 +1555,7 @@ return self._new(self.im.resize(size, resample)) - def rotate(self, angle, resample=NEAREST, expand=0): + def rotate(self, angle, resample=NEAREST, expand=0, center=None, translate=None): """...
diff --git a/Tests/test_image_rotate.py b/Tests/test_image_rotate.py --- a/Tests/test_image_rotate.py +++ b/Tests/test_image_rotate.py @@ -5,11 +5,11 @@ class TestImageRotate(PillowTestCase): def test_rotate(self): - def rotate(im, mode, angle): - out = im.rotate(angle) + def rotate(im,...
null
null
namanjain12/pillow_final:90077b397504c19d1aaf97a9081400130ad8ce46
true
null
1
61
null
1,064
0
0.75
1
0.6375
1
0.380667
81.06075
6,294
swe_smith::train::30120
swe_smith
train
30,120
getnikola__nikola.0f4c230e.func_pm_remove_wrapper__s2zjur6q
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
Configuration file loading broken - NameError on 'config' variable #### Description When running Nikola commands, I'm getting a `NameError: name 'config' is not defined` error. It seems like the configuration loading logic has been broken and the `config` variable is being referenced before it's defined. #### Steps/...
diff --git a/nikola/__main__.py b/nikola/__main__.py index 7ff5ce2..4bc9984 100644 --- a/nikola/__main__.py +++ b/nikola/__main__.py @@ -128,31 +128,13 @@ def main(args=None): req_missing(['freezegun'], 'perform invariant builds') sys.path.insert(0, os.path.dirname(conf_filename)) - try: - ...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o...
["tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org]", "tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org:1234/blog]", "tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org:3456/blog/]", "tests/integration/test_dev_server...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
21
144
1,151
0
0.6
1
0.75
1
0.261833
81.0605
6,295
swe_smith::train::4908
swe_smith
train
4,908
bottlepy__bottle.a8dfef30.func_pm_class_rm_funcs__pi3ooys2
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
Router.match method missing after recent changes #### Description The Router class is missing its `match` method, causing routing to fail completely. All HTTP requests result in 500 errors instead of proper routing. #### Steps/Code to Reproduce ```python import bottle app = bottle.Bottle() @app.route('/') def hel...
diff --git a/bottle.py b/bottle.py index 286b5bc..ed43d27 100755 --- a/bottle.py +++ b/bottle.py @@ -457,43 +457,6 @@ class Router(object): except KeyError as E: raise RouteBuildError('Missing URL argument: %r' % E.args[0]) - def match(self, environ): - """ Return a (target, url_args) ...
["test/test_auth.py::TestBasicAuth::test__header", "test/test_exc.py::TestAppException::test_memory_error", "test/test_exc.py::TestAppException::test_no_exc", "test/test_exc.py::TestAppException::test_noncatched_error", "test/test_exc.py::TestAppException::test_other_error", "test/test_exc.py::TestAppException::test_sy...
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module", "test/test_config.py::TestConfDict::test_meta", ...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
37
110
831
0
0.6
1
0.75
1
0.261833
81.0605
6,296
swe_smith::train::3423
swe_smith
train
3,423
pygments__pygments.27649ebb.combine_file__klh9xd4d
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
highlight() function arguments swapped causing unexpected behavior #### Description The `highlight()` function appears to have its arguments mixed up, causing it to pass the formatter as the lexer and vice versa. This results in various errors when trying to highlight code. #### Steps/Code to Reproduce ```python fr...
diff --git a/pygments/__init__.py b/pygments/__init__.py index e5a669c..8033a32 100644 --- a/pygments/__init__.py +++ b/pygments/__init__.py @@ -39,13 +39,12 @@ def lex(code, lexer): `lexer.get_tokens()`. """ try: - return lexer.get_tokens(code) + tokens = lexer.get_tokens(code) + re...
["tests/test_cmdline.py::test_outfile", "tests/test_cmdline.py::test_stream_opt", "tests/test_cmdline.py::test_O_opt", "tests/test_cmdline.py::test_P_opt", "tests/test_cmdline.py::test_F_opt", "tests/test_cmdline.py::test_normal", "tests/test_cmdline.py::test_load_from_file", "tests/test_cmdline.py::test_stdin", "tests...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
20
31
1,171
0
0.6
1
0.75
1
0.261833
81.0605
6,297
swe_smith::train::44478
swe_smith
train
44,478
pydata__patsy.a5d16484.func_pm_remove_loop__v6krt5ig
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
build_design_matrices fails with KeyError when factor_info_to_values is empty #### Description When calling `build_design_matrices`, the function fails with a KeyError because the factor evaluation loop has been replaced with a `pass` statement, leaving `factor_info_to_values` empty. This causes subsequent code that ...
diff --git a/patsy/build.py b/patsy/build.py index cbe2524..507b223 100644 --- a/patsy/build.py +++ b/patsy/build.py @@ -944,27 +944,7 @@ def build_design_matrices( index_checker.check(data.index, "data.index", None) rows_checker.check(data.shape[0], "data argument", None) for design_info in desi...
["patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths", "patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy_thoroughly", "patsy/test_build.py::test_data_...
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
23
32
1,111
0
0.6
1
0.75
1
0.261833
81.0605
6,298
swe_smith::train::4904
swe_smith
train
4,904
bottlepy__bottle.a8dfef30.func_pm_class_rm_funcs__5xw9rj9b
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
Multipart form parsing broken after recent changes #### Description Multipart form data parsing is completely broken. When trying to parse multipart requests, I get `AttributeError: '_MultipartPart' object has no attribute 'feed'`. #### Steps/Code to Reproduce ```python import bottle from io import BytesIO # Simpl...
diff --git a/bottle.py b/bottle.py index 286b5bc..3983554 100755 --- a/bottle.py +++ b/bottle.py @@ -3342,29 +3342,6 @@ class _MultipartPart(object): self.memfile_limit = memfile_limit self.buffer_size = buffer_size - def feed(self, line, nl=""): - if self.file: - return self.wr...
["test/test_environ.py::TestRequest::test_multipart", "test/test_multipart.py::TestMultipartParser::test_big_file", "test/test_multipart.py::TestMultipartParser::test_file_seek", "test/test_multipart.py::TestMultipartParser::test_multiline_header", "test/test_multipart.py::TestMultipartParser::test_unicode_value", "tes...
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
24
15
1,090
0
0.6
1
0.75
1
0.261667
81.06
6,299
swe_smith::train::14540
swe_smith
train
14,540
hukkin__tomli.443a0c1b.func_basic__vd1e03tw
swesmith/hukkin__tomli.443a0c1b
hukkin/tomli
python
null
Incorrect handling of multiline and basic string parsing in TOML parser I found an issue with the TOML parser where it's incorrectly handling string parsing. The parser seems to be mixing up the rules for multiline and basic strings. When trying to parse a TOML file with basic strings and multiline strings, I'm getti...
diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index 16c76cd..51dde11 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -623,11 +623,11 @@ def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str] def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos,...
["tests/test_data.py::TestData::test_invalid", "tests/test_data.py::TestData::test_valid"]
["tests/test_error.py::TestError::test_deprecated_tomldecodeerror", "tests/test_error.py::TestError::test_invalid_char_quotes", "tests/test_error.py::TestError::test_invalid_parse_float", "tests/test_error.py::TestError::test_line_and_col", "tests/test_error.py::TestError::test_missing_value", "tests/test_error.py::Tes...
jyangballin/swesmith.x86_64.hukkin_1776_tomli.443a0c1b
true
null
1
22
2
1,130
0
0.6
1
0.75
1
0.261667
81.06