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
8,300
swe_smith::train::31754
swe_smith
train
31,754
davidhalter__parso.338a5760.combine_file__1mmmtuy2
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Version comparison broken for tuples #### Description When comparing PythonVersionInfo objects to tuples, the comparison logic is inverted and returns incorrect results. #### Steps/Code to Reproduce ```python from parso.utils import _parse_version # This should work but fails version = _parse_version("3.6") print(...
diff --git a/parso/utils.py b/parso/utils.py index 6ad1ea2..4b366c7 100644 --- a/parso/utils.py +++ b/parso/utils.py @@ -42,14 +42,6 @@ def split_lines(string: str, keepends: bool = False) -> Sequence[str]: # We have to merge lines that were broken by form feed characters. merge = [] - for i,...
["test/test_diff_parser.py::test_random_unicode_characters", "test/test_diff_parser.py::test_all_sorts_of_indentation", "test/test_diff_parser.py::test_with_formfeed", "test/test_load_grammar.py::test_parse_version[2-result0]", "test/test_load_grammar.py::test_parse_version[3-result1]", "test/test_load_grammar.py::test...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
25
22
701
0
0.6
1
0.75
1
0.200167
80.8755
8,301
swe_smith::train::37892
swe_smith
train
37,892
kayak__pypika.1c9646f0.func_pm_class_rm_funcs__9116s80w
swesmith/kayak__pypika.1c9646f0
kayak/pypika
python
null
MySQLQueryBuilder missing initialization attributes after __init__ removal #### Description When using MySQLQuery for INSERT operations with ON DUPLICATE KEY UPDATE clauses, the query builder fails with AttributeError because required instance attributes are not being initialized. #### Steps/Code to Reproduce ```py...
diff --git a/pypika/dialects.py b/pypika/dialects.py index 57955d8..5ca47ca 100644 --- a/pypika/dialects.py +++ b/pypika/dialects.py @@ -87,16 +87,6 @@ class MySQLQueryBuilder(QueryBuilder): QUOTE_CHAR = "`" QUERY_CLS = MySQLQuery - def __init__(self, **kwargs: Any) -> None: - super().__init__(dia...
["pypika/tests/dialects/test_mysql.py::SelectTests::test_distinct_select", "pypika/tests/dialects/test_mysql.py::SelectTests::test_modifier_select", "pypika/tests/dialects/test_mysql.py::SelectTests::test_multiple_modifier_select", "pypika/tests/dialects/test_mysql.py::SelectTests::test_normal_select", "pypika/tests/di...
["pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_0__ridley_scott_jimi_hendrix_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_1__1_2_3_4_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_2__toInt64_1_toInt64_2_toInt64_3_toInt64_4_", "pypika/tests/clickhouse/test_array...
jyangballin/swesmith.x86_64.kayak_1776_pypika.1c9646f0
true
null
1
11
43
980
0
0.6
1
0.75
1
0.2
80.875
8,302
swe_smith::train::21485
swe_smith
train
21,485
rubik__radon.54b88e58.func_pm_ctrl_shuffle__sedv0t7h
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
#### Description When using `iter_filenames` with `exclude` parameter, a `TypeError: 'NoneType' object is not iterable` is raised because the `exclude` variable is referenced before being defined. #### Steps/Code to Reproduce ```python from radon.cli.tools import iter_filenames # This will raise TypeError list(iter...
diff --git a/radon/cli/tools.py b/radon/cli/tools.py index cc8d4fa..9fade29 100644 --- a/radon/cli/tools.py +++ b/radon/cli/tools.py @@ -242,6 +242,10 @@ def _is_python_file(filename): def iter_filenames(paths, exclude=None, ignore=None): + ignore = '.*,{0}'.format(ignore).split(',') if ignore else ['.*'] + ...
["radon/tests/test_cli_tools.py::test_iter_files", "radon/tests/test_ipynb.py::test_harvestor_yields_ipynb", "radon/tests/test_ipynb.py::test_raw_ipynb", "radon/tests/test_ipynb.py::test_raw_ipynb_cells"]
["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te...
jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58
true
null
1
11
4
980
0
0.6
1
0.75
1
0.2
80.875
8,303
swe_smith::train::42335
swe_smith
train
42,335
scanny__python-pptx.278b47b1.pr_995
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
# ZipFile creation fails with Python versions before 3.8 I'm trying to use python-pptx with Python 3.7 and I'm getting an error when saving presentations. ## Steps to reproduce ```python from pptx import Presentation prs = Presentation() slide = prs.slides.add_slide(prs.slide_layouts[0]) title = slide.shapes.title ...
diff --git a/src/pptx/__init__.py b/src/pptx/__init__.py index fb5c2d7..6192a7d 100644 --- a/src/pptx/__init__.py +++ b/src/pptx/__init__.py @@ -25,7 +25,7 @@ from pptx.parts.slide import ( if TYPE_CHECKING: from pptx.opc.package import Part -__version__ = "1.0.2" +__version__ = "0.6.23" sys.modules["pptx.ex...
["tests/opc/test_serialized.py::Describe_ZipPkgWriter::it_provides_access_to_the_open_zip_file_to_help"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
2
10
1
1,000
0
0.6
1
0.75
1
0.2
80.875
8,304
swe_smith::train::25606
swe_smith
train
25,606
pylint-dev__astroid.b114f6b5.func_basic__e7bl8xe8
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
While loop AST nodes return None instead of proper node structure #### Description When parsing while loops, the AST rebuilder is returning None instead of the expected While node object. This breaks inference and analysis of code containing while loops. #### Steps/Code to Reproduce ```python import astroid code =...
diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py index 4c77906..7b7d1ee 100644 --- a/astroid/rebuilder.py +++ b/astroid/rebuilder.py @@ -1643,17 +1643,17 @@ class TreeRebuilder: """Visit a While node by returning a fresh instance of it.""" newnode = nodes.While( lineno=node.lineno...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_mul...
["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest:...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
10
79
1,000
0
0.6
1
0.75
1
0.2
80.875
8,305
swe_smith::train::38485
swe_smith
train
38,485
amueller__word_cloud.ec24191c.func_basic__tcz41609
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
WordCloud.to_image() returns None instead of PIL Image #### Description The `to_image()` method is returning `None` instead of a PIL Image object, breaking existing functionality that depends on the returned image. #### Steps/Code to Reproduce ```python from wordcloud import WordCloud # Create a simple word cloud ...
diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py index 1622c03..1c598ee 100644 --- a/wordcloud/wordcloud.py +++ b/wordcloud/wordcloud.py @@ -650,10 +650,10 @@ class WordCloud(object): def to_image(self): self._check_generated() if self.mask is not None: - width = self.mask....
["test/test_wordcloud.py::test_default", "test/test_wordcloud.py::test_writing_to_file", "test/test_wordcloud.py::test_recolor", "test/test_wordcloud.py::test_mask", "test/test_wordcloud.py::test_mask_contour", "test/test_wordcloud_cli.py::test_cli_writes_to_imagefile", "test/test_wordcloud_cli.py::test_cli_writes_to_s...
["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
14
7
920
0
0.6
1
0.75
1
0.2
80.875
8,306
swe_smith::train::14157
swe_smith
train
14,157
python-openxml__python-docx.0cf6d71f.func_pm_class_rm_funcs__mqtz5uu7
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Table cell grid_span property cannot be set after removal of setter #### Description When trying to set the grid_span property on table cells, the operation fails because the setter method has been removed. This breaks functionality for merging table cells that need to span multiple columns. #### Steps/Code to Repro...
diff --git a/src/docx/oxml/table.py b/src/docx/oxml/table.py index e38d585..5c8dd48 100644 --- a/src/docx/oxml/table.py +++ b/src/docx/oxml/table.py @@ -835,12 +835,6 @@ class CT_TcPr(BaseOxmlElement): gridSpan = self.gridSpan return 1 if gridSpan is None else gridSpan.val - @grid_span.setter - ...
["tests/oxml/test_table.py::DescribeCT_Tc::it_can_swallow_the_next_tc_help_merge[w:tr/(w:tc/w:p,w:tc/w:p)-0-2-w:tr/(w:tc/(w:tcPr/w:gridSpan{w:val=2},w:p))]", "tests/oxml/test_table.py::DescribeCT_Tc::it_can_swallow_the_next_tc_help_merge[w:tr/(w:tc/w:p,w:tc/w:p,w:tc/w:p)-1-2-w:tr/(w:tc/w:p,w:tc/(w:tcPr/w:gridSpan{w:val...
["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
9
1,060
0
0.6
1
0.75
1
0.2
80.875
8,307
swe_smith::train::20682
swe_smith
train
20,682
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__o2s3h5vh
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnboundLocalError in merge_subqueries optimizer #### Description The merge_subqueries optimizer is throwing an UnboundLocalError when trying to access the `new_subquery` variable. This appears to be happening because the variable is being used before it's defined in the `_merge_from` function. #### Steps/Code to Rep...
diff --git a/sqlglot/optimizer/merge_subqueries.py b/sqlglot/optimizer/merge_subqueries.py index 14ecde6..bf45ff5 100644 --- a/sqlglot/optimizer/merge_subqueries.py +++ b/sqlglot/optimizer/merge_subqueries.py @@ -256,10 +256,7 @@ def _merge_from( node_to_replace: t.Union[exp.Subquery, exp.Table], alias: str, ...
["tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", "tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch"]
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
11
4
979
0
0.6
1
0.75
1
0.199833
80.8745
8,308
swe_smith::train::50910
swe_smith
train
50,910
python-hyper__h11.bed0dd4a.func_pm_remove_assign__ka7lznxg
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
NameError: name 'joint_state' is not defined in ConnectionState._fire_state_triggered_transitions #### Description When using h11 connections, a `NameError` is raised because the variable `joint_state` is referenced but not defined in the `_fire_state_triggered_transitions` method. #### Steps/Code to Reproduce ```p...
diff --git a/h11/_state.py b/h11/_state.py index 3ad444b..3bd5715 100644 --- a/h11/_state.py +++ b/h11/_state.py @@ -337,22 +337,18 @@ class ConnectionState: if not self.pending_switch_proposals: if self.states[CLIENT] is MIGHT_SWITCH_PROTOCOL: - self.states[CLIENT] = ...
["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_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_conne...
["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_idle_receive_nothing", "h11/tests/test_events.py::test_events", "h11/tests/test_events.py::test_intenum_status_code", "h11/tests/test_events.py::test_header_casing", "h11/tests/test...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
6
38
1,079
0
0.6
1
0.75
1
0.199833
80.8745
8,309
swe_smith::train::36688
swe_smith
train
36,688
lincolnloop__python-qrcode.456b01d4.func_pm_ctrl_shuffle__re4p2f6l
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
UnboundLocalError in Polynomial.__mod__ method #### Description When generating QR codes, the library throws an `UnboundLocalError: local variable 'difference' referenced before assignment` error. This happens during the polynomial modulo operation in the Reed-Solomon error correction calculation. #### Steps/Code to...
diff --git a/qrcode/base.py b/qrcode/base.py index 20f81f6..5f6252c 100644 --- a/qrcode/base.py +++ b/qrcode/base.py @@ -272,22 +272,21 @@ class Polynomial: return Polynomial(num, 0) def __mod__(self, other): - difference = len(self) - len(other) if difference < 0: return se...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_add_qrdata", "qrcode/tests/test_qrcode.py::test_fit", "qrcode/tests/test_qrcode.py::test_mode_number", "qrcode/tests/test_qrcode.py::test_mode_alpha", "...
["qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_make_image_with_wrong_pattern", "qrcode/tests/test_qrcode.py::test_mask_pattern_setter", "qrcode/tests/test_qrcode.py::test_qrcode_ba...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
9
57
1,019
0
0.6
1
0.75
1
0.199833
80.8745
8,310
swe_smith::train::20059
swe_smith
train
20,059
kurtmckee__feedparser.cad965a3.func_pm_ctrl_shuffle__z33kbg3p
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
Character reference parsing fails with UnboundLocalError #### Description When parsing feeds containing character references, feedparser raises an UnboundLocalError for the variable `value`. This appears to happen when the HTML processor encounters character references in the feed content. #### Steps/Code to Reprodu...
diff --git a/feedparser/html.py b/feedparser/html.py index 2fbec36..e6ffaf3 100644 --- a/feedparser/html.py +++ b/feedparser/html.py @@ -222,16 +222,15 @@ class BaseHTMLProcessor(sgmllib.SGMLParser): # Called for each character reference, e.g. '&#160;' will extract '160' # Reconstruct the original cha...
["tests/test_well_formed.py::test_loose_parser[info1238]", "tests/test_well_formed.py::test_strict_parser[info1199]", "tests/test_well_formed.py::test_strict_parser[info1213]", "tests/test_well_formed.py::test_loose_parser[info1200]", "tests/test_well_formed.py::test_loose_parser[info1171]", "tests/test_well_formed.py:...
["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
9
79
1,019
0
0.6
1
0.75
1
0.199833
80.8745
8,311
swe_smith::train::20565
swe_smith
train
20,565
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__4661qmbl
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
PRQL parser fails with UnboundLocalError when parsing equality expressions #### Description The PRQL dialect parser throws an `UnboundLocalError` when trying to parse PRQL queries containing equality expressions. This appears to be related to the `_parse_equality` method in the PRQL parser. #### Steps/Code to Reprod...
diff --git a/sqlglot/dialects/prql.py b/sqlglot/dialects/prql.py index 2fc2594..2267550 100644 --- a/sqlglot/dialects/prql.py +++ b/sqlglot/dialects/prql.py @@ -70,19 +70,18 @@ class PRQL(Dialect): } def _parse_equality(self) -> t.Optional[exp.Expression]: - eq = self._parse_tokens(self._...
["tests/dialects/test_prql.py::TestPRQL::test_prql"]
["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
9
1
1,019
0
0.6
1
0.75
1
0.199833
80.8745
8,312
swe_smith::train::13778
swe_smith
train
13,778
python-openxml__python-docx.0cf6d71f.func_basic__nkpiogvj
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
RequiredAttribute getter returns wrong value when attribute is empty string #### Description When a required XML attribute has an empty string value (`""`), the RequiredAttribute getter incorrectly processes it using `to_xml()` instead of `from_xml()`, and also fails to raise the expected InvalidXmlError for missing ...
diff --git a/src/docx/oxml/xmlchemy.py b/src/docx/oxml/xmlchemy.py index 077bcd5..0ccc7b6 100644 --- a/src/docx/oxml/xmlchemy.py +++ b/src/docx/oxml/xmlchemy.py @@ -251,13 +251,13 @@ class RequiredAttribute(BaseAttribute): def get_attr_value(obj: BaseOxmlElement) -> Any | None: attr_str_value = ...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture3]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_RGB_value[rgb_get_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_kno...
["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_fixture4]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
6
58
1,079
0
0.6
1
0.75
1
0.199833
80.8745
8,313
swe_smith::train::3388
swe_smith
train
3,388
pygments__pygments.27649ebb.combine_file__g5gkaqeu
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
CsoundOrchestraLexer broken after inheritance removal #### Description The CsoundOrchestraLexer class is no longer working properly. When trying to use it, I get AttributeError exceptions indicating that the lexer object doesn't have expected attributes. #### Steps/Code to Reproduce ```python from pygments.lexers i...
diff --git a/pygments/lexers/csound.py b/pygments/lexers/csound.py index 415fac3..9854880 100644 --- a/pygments/lexers/csound.py +++ b/pygments/lexers/csound.py @@ -198,7 +198,7 @@ class CsoundScoreLexer(CsoundLexer): } -class CsoundOrchestraLexer(CsoundLexer): +class CsoundOrchestraLexer(): """ For ...
["tests/test_cmdline.py::test_C_opt", "tests/test_cmdline.py::test_stdin", "tests/test_basic_api.py::test_random_input[CsoundOrchestraLexer]", "tests/test_basic_api.py::test_lexer_options[CsoundOrchestraLexer]", "tests/test_basic_api.py::test_lexer_classes[CsoundOrchestraLexer]", "tests/test_basic_api.py::test_get_lexe...
["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
14
43
919
0
0.6
1
0.75
1
0.199833
80.8745
8,314
swe_smith::train::42711
swe_smith
train
42,711
python-jsonschema__jsonschema.93e0caa5.func_pm_ctrl_shuffle__e601h5ww
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
best_match function returns undefined variable #### Description The `best_match` function in `jsonschema.exceptions` is returning an undefined variable `best` before it's assigned, causing a `NameError` when called. #### Steps/Code to Reproduce ```python from jsonschema import ValidationError from jsonschema.except...
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 3dcd296..31eef14 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -432,6 +432,16 @@ Example: def best_match(errors, key=relevance): + return best + best = max(errors, key=key, default=None) + + while best.context...
["jsonschema/tests/test_exceptions.py::TestBestMatch::test_anyOf_traversal_for_non_type_matching_sibling_errors", "jsonschema/tests/test_exceptions.py::TestBestMatch::test_anyOf_traversal_for_single_equally_relevant_error", "jsonschema/tests/test_exceptions.py::TestBestMatch::test_anyOf_traversal_for_single_sibling_err...
["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
22
28
759
0
0.6
1
0.75
1
0.199833
80.8745
8,315
swe_smith::train::14357
swe_smith
train
14,357
python-openxml__python-docx.0cf6d71f.func_pm_ctrl_shuffle__yyflryko
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Font.size property returns undefined variable when rPr is None #### Description The Font.size property is broken and raises a NameError when trying to access the size of a font that doesn't have run properties defined. #### Steps/Code to Reproduce ```python from docx import Document from docx.text.font import Font ...
diff --git a/src/docx/text/font.py b/src/docx/text/font.py index acd6079..110537e 100644 --- a/src/docx/text/font.py +++ b/src/docx/text/font.py @@ -253,6 +253,9 @@ class Font(ElementProxy): @property def size(self) -> Length | None: + return rPr.sz_val + if rPr is None: + return No...
["tests/text/test_font.py::DescribeFont::it_knows_its_size[w:r-None]", "tests/text/test_font.py::DescribeFont::it_knows_its_size[w:r/w:rPr-None]", "tests/text/test_font.py::DescribeFont::it_knows_its_size[w:r/w:rPr/w:sz{w:val=28}-177800]"]
["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
3
1,058
0
0.6
1
0.75
1
0.199667
80.874
8,316
swe_smith::train::19225
swe_smith
train
19,225
seperman__deepdiff.ed252022.func_pm_remove_assign__cb0t5vb5
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
UnboundLocalError in distance calculation when processing type changes #### Description When calculating distances for diffs containing type changes, an `UnboundLocalError` is raised for the variable `item_id`. This happens during the `_get_item_length` function execution. #### Steps/Code to Reproduce ```python fro...
diff --git a/deepdiff/distance.py b/deepdiff/distance.py index d2dc2fe..0183480 100644 --- a/deepdiff/distance.py +++ b/deepdiff/distance.py @@ -147,10 +147,8 @@ def _get_item_length(item, parents_ids=frozenset([])): for key, subitem in item.items(): # dedupe the repetition report so the number of...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.csv-t2.csv-args4-0]", "tests/test_delta.py::TestBasicsOfDelta::test_raise_error", "tests/test_delta.py::TestIgnoreOrd...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
7
70
1,058
0
0.6
1
0.75
1
0.199667
80.874
8,317
swe_smith::train::20661
swe_smith
train
20,661
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__l9vtnz6k
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnixToTime conversion fails with UnboundLocalError in BigQuery dialect When using the `TO_TIMESTAMP` function with unix timestamps in BigQuery dialect, the code raises an `UnboundLocalError` due to variables being referenced before assignment. #### Steps to Reproduce ```python import sqlglot # This will raise Unbou...
diff --git a/sqlglot/dialects/bigquery.py b/sqlglot/dialects/bigquery.py index 6d39231..cdd115d 100644 --- a/sqlglot/dialects/bigquery.py +++ b/sqlglot/dialects/bigquery.py @@ -193,21 +193,20 @@ def _ts_or_ds_diff_sql(self: BigQuery.Generator, expression: exp.TsOrDsDiff) -> def _unix_to_time_sql(self: BigQuery.Gen...
["tests/dialects/test_bigquery.py::TestBigQuery::test_bigquery", "tests/dialects/test_duckdb.py::TestDuckDB::test_time", "tests/dialects/test_snowflake.py::TestSnowflake::test_snowflake"]
["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
13
3
938
0
0.6
1
0.75
1
0.199667
80.874
8,318
swe_smith::train::39308
swe_smith
train
39,308
pallets__jinja.ada0a9a6.func_basic__ymuu1w2z
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
TokenStream.look() returns wrong token after recent changes #### Description The `TokenStream.look()` method is returning the wrong token, causing template parsing to fail. When looking ahead at the next token, it should return the next token but maintain the current position in the stream. #### Steps/Code to Reprod...
diff --git a/src/jinja2/lexer.py b/src/jinja2/lexer.py index 6dc94b6..f8e2656 100644 --- a/src/jinja2/lexer.py +++ b/src/jinja2/lexer.py @@ -355,9 +355,9 @@ class TokenStream: """Look at the next token.""" old_token = next(self) result = self.current - self.push(result) - self.c...
["tests/test_api.py::TestExtendedAPI::test_sandbox_max_range", "tests/test_api.py::TestMeta::test_find_undeclared_variables", "tests/test_api.py::TestUndefined::test_strict_undefined", "tests/test_api.py::TestLowLevel::test_custom_code_generator", "tests/test_async.py::TestAsyncImports::test_context_imports", "tests/te...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
6
142
1,078
0
0.6
1
0.75
1
0.199667
80.874
8,319
swe_smith::train::40242
swe_smith
train
40,242
scanny__python-pptx.278b47b1.combine_file__wdbihhbz
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Slide creation returns wrong tuple order and slide master access broken #### Description When adding a new slide to a presentation, the returned tuple has the wrong order - it returns `(slide, rId)` instead of `(rId, slide)`. Additionally, accessing related slide masters fails due to an incorrect attribute reference....
diff --git a/src/pptx/parts/presentation.py b/src/pptx/parts/presentation.py index 1413de4..5227b29 100644 --- a/src/pptx/parts/presentation.py +++ b/src/pptx/parts/presentation.py @@ -31,7 +31,7 @@ class PresentationPart(XmlPart): slide_layout_part = slide_layout.part slide_part = SlidePart.new(partn...
["tests/parts/test_presentation.py::DescribePresentationPart::it_provides_access_to_a_related_master", "tests/parts/test_presentation.py::DescribePresentationPart::it_can_add_a_new_slide", "tests/parts/test_presentation.py::DescribePresentationPart::it_knows_the_next_slide_partname_to_help"]
["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
6
3
1,078
0
0.6
1
0.75
1
0.199667
80.874
8,320
swe_smith::train::24838
swe_smith
train
24,838
marshmallow-code__marshmallow.9716fc62.func_pm_ctrl_invert_if__h8kttvrr
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Class registry returns first class when multiple classes exist instead of raising error #### Description When multiple classes with the same name are registered in the class registry, `get_class()` incorrectly returns the first class instead of raising a `RegistryError` as expected. #### Steps/Code to Reproduce ```...
diff --git a/src/marshmallow/class_registry.py b/src/marshmallow/class_registry.py index d41b112..bbaeba0 100644 --- a/src/marshmallow/class_registry.py +++ b/src/marshmallow/class_registry.py @@ -83,12 +83,12 @@ def get_class(classname: str, all: bool = False) -> list[SchemaType] | SchemaTyp "to import th...
["tests/test_registry.py::test_two_way_nesting", "tests/test_registry.py::test_nesting_with_class_name_many", "tests/test_registry.py::test_multiple_classes_with_same_name_raises_error", "tests/test_registry.py::test_multiple_classes_with_all", "tests/test_registry.py::test_can_use_full_module_path_to_class", "tests/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
6
7
1,078
0
0.6
1
0.75
1
0.199667
80.874
8,321
swe_smith::train::4251
swe_smith
train
4,251
pygments__pygments.27649ebb.func_pm_class_rm_funcs__9d95kjxb
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
IRCFormatter crashes with AttributeError when formatting code #### Description The IRCFormatter is throwing an AttributeError when trying to format code. It seems like there's a missing method that's being called during the formatting process. #### Steps/Code to Reproduce ```python from pygments.formatters import I...
diff --git a/pygments/formatters/irc.py b/pygments/formatters/irc.py index a1e3979..9ed57be 100644 --- a/pygments/formatters/irc.py +++ b/pygments/formatters/irc.py @@ -127,11 +127,6 @@ class IRCFormatter(Formatter): self.linenos = options.get('linenos', False) self._lineno = 0 - def _write_linen...
["tests/test_basic_api.py::test_formatter_unicode_handling[IRCFormatter]", "tests/test_basic_api.py::test_formatter_public_api[IRCFormatter]", "tests/test_irc_formatter.py::test_correct_output", "tests/test_irc_formatter.py::test_linecount_output"]
["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
7
4
1,058
0
0.6
1
0.75
1
0.199667
80.874
8,322
r2e_gym::train::395
r2e_gym
train
395
orange3__627803ed9f66bc4e593fbeaaf0ef17e92295a439
orange3
biolab/orange3
python
627803ed9f66bc4e593fbeaaf0ef17e92295a439
**Title:** TypeError when passing `attributes` and `ids` to `Table.from_numpy` **Description:** When attempting to create a table using `Table.from_numpy` with additional parameters `attributes` and `ids`, a `TypeError` is raised. This prevents setting all desired attributes during table construction. **Example Code:...
diff --git a/Orange/data/table.py b/Orange/data/table.py --- a/Orange/data/table.py +++ b/Orange/data/table.py @@ -495,7 +495,8 @@ return self @classmethod - def from_numpy(cls, domain, X, Y=None, metas=None, W=None): + def from_numpy(cls, domain, X, Y=None, metas=None, W=None, + ...
diff --git a/Orange/data/tests/test_table.py b/Orange/data/tests/test_table.py --- a/Orange/data/tests/test_table.py +++ b/Orange/data/tests/test_table.py @@ -30,6 +30,59 @@ self.assertRaises(TypeError, Table, Y=[]) self.assertRaises(TypeError, Table, "iris", 42) self.assertRaises(TypeError, ...
null
null
namanjain12/orange3_final:627803ed9f66bc4e593fbeaaf0ef17e92295a439
true
null
1
18
null
1,550
0
0.75
1
0.6375
1
0.318333
80.87375
8,323
swe_smith::train::26873
swe_smith
train
26,873
tkrajina__gpxpy.09fc46b3.func_basic__7mdcu08a
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX reduce_points method broken after recent changes I'm getting a `NameError: name 'max_distance' is not defined` when trying to use the `reduce_points` method on GPX objects. This seems to have broken basic track simplification functionality. #### Steps to Reproduce ```python import gpxpy # Load any GPX file with...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..2eb5778 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -2035,27 +2035,27 @@ class GPX: if max_points_no is None and min_distance is None: raise ValueError("Either max_point_no or min_distance must be supplied") - if max_points_no is...
["test.py::GPXTests::test_clone_and_smooth", "test.py::GPXTests::test_moving_stopped_times", "test.py::GPXTests::test_reduce_by_min_distance", "test.py::GPXTests::test_reduce_gpx_file"]
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
14
4
917
0
0.6
1
0.75
1
0.1995
80.8735
8,324
swe_smith::train::2246
swe_smith
train
2,246
pdfminer__pdfminer.six.1a8bd2f7.func_basic__okjmjisc
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
Dictionary end token parsing broken after recent changes #### Description PDF parsing fails when encountering dictionary end tokens (`>>`). The parser incorrectly handles the closing sequence, causing widespread failures across PDF processing operations. #### Steps/Code to Reproduce ```python from pdfminer.high_lev...
diff --git a/pdfminer/psparser.py b/pdfminer/psparser.py index b486956..9237735 100755 --- a/pdfminer/psparser.py +++ b/pdfminer/psparser.py @@ -480,10 +480,10 @@ class PSBaseParser: def _parse_wclose(self, s: bytes, i: int) -> int: c = s[i : i + 1] - if c == b">": + if c == b"<": ...
["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
6
77
1,077
0
0.6
1
0.75
1
0.1995
80.8735
8,325
swe_smith::train::1923
swe_smith
train
1,923
agronholm__typeguard.b6a7e438.func_pm_remove_loop__62p246wi
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
TypedDict validation broken - type hints not processed When using `check_type` with TypedDict classes, the type validation for dictionary values is completely broken. The checker appears to skip processing the type annotations entirely. #### Steps/Code to Reproduce ```python from typeguard import check_type from typ...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..db6259f 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -260,15 +260,6 @@ def check_typed_dict( # Detect NotRequired fields which are hidden by get_type_hints() type_hints: dict[str, type] = {} - ...
["tests/test_checkers.py::TestTypedDict::test_typed_dict[typing-wrong_y]", "tests/test_checkers.py::TestTypedDict::test_typed_dict[typing-wrong_x]", "tests/test_checkers.py::TestTypedDict::test_typed_dict[typing_extensions-wrong_y]", "tests/test_checkers.py::TestTypedDict::test_typed_dict[typing_extensions-wrong_x]", "...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
10
6
997
0
0.6
1
0.75
1
0.1995
80.8735
8,326
swe_smith::train::29625
swe_smith
train
29,625
django__channels.a144b4b8.func_pm_ctrl_shuffle__l28yxr24
swesmith/django__channels.a144b4b8
django/channels
python
null
get_handler_name function broken due to variable reference before assignment #### Description The `get_handler_name` function in `channels/consumer.py` is causing `UnboundLocalError` when processing messages. The function tries to use `handler_name` variable before it's defined, causing the consumer to fail when hand...
diff --git a/channels/consumer.py b/channels/consumer.py index fc06543..e2aba15 100644 --- a/channels/consumer.py +++ b/channels/consumer.py @@ -10,19 +10,18 @@ from .utils import await_many_dispatch def get_handler_name(message): + if handler_name.startswith("_"): + raise ValueError("Malformed type in m...
["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_generic_websocket.py::test_websocket...
["tests/security/test_auth.py::test_login_no_session_in_scope", "tests/security/test_auth.py::test_login_no_user_in_scope", "tests/security/test_auth.py::test_login_user_as_argument", "tests/security/test_auth.py::test_login_user_on_scope", "tests/security/test_auth.py::test_login_change_user", "tests/security/test_aut...
jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8
true
null
1
11
39
977
0
0.6
1
0.75
1
0.1995
80.8735
8,327
swe_smith::train::20136
swe_smith
train
20,136
kurtmckee__feedparser.cad965a3.lm_rewrite__2rftc67r
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
### KeyError when Parsing Feeds with 'name' Element I've encountered an issue with the feedparser library where parsing certain feeds results in a `KeyError` for the 'name' element. This seems to occur when the feed contains specific structures involving author or contributor information. #### Steps to Reproduce 1. ...
diff --git a/feedparser/namespaces/_base.py b/feedparser/namespaces/_base.py index 6299b02..92ba14d 100644 --- a/feedparser/namespaces/_base.py +++ b/feedparser/namespaces/_base.py @@ -168,16 +168,10 @@ class Namespace: def _end_name(self): value = self.pop("name") - if self.inpublisher: - ...
["tests/test_well_formed.py::test_loose_parser[info1467]", "tests/test_well_formed.py::test_strict_parser[info34]", "tests/test_well_formed.py::test_loose_parser[info34]", "tests/test_well_formed.py::test_strict_parser[info1467]"]
["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
8
4
1,037
0
0.6
1
0.75
1
0.1995
80.8735
8,328
swe_smith::train::44765
swe_smith
train
44,765
mahmoud__glom.fb3c4e76.func_basic__kbvc1rn4
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
Spec.glom() fails when scope contains glom function #### Description When using `Spec.glom()` with a scope that contains the `glom` function, the method fails with a `TypeError: 'NoneType' object is not callable`. #### Steps/Code to Reproduce ```python from glom import glom, Spec, S, T # This works fine scope_spec...
diff --git a/glom/core.py b/glom/core.py index cee71a3..cfb21a0 100644 --- a/glom/core.py +++ b/glom/core.py @@ -807,9 +807,9 @@ class Spec: def glom(self, target, **kw): scope = dict(self.scope) - scope.update(kw.get('scope', {})) - kw['scope'] = ChainMap(scope) - glom_ = scope.get...
["glom/test/test_spec.py::test_spec", "glom/test/test_spec.py::test_scope_spec", "glom/test/test_streaming.py::test_first"]
["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
6
3
1,077
0
0.6
1
0.75
1
0.1995
80.8735
8,329
swe_smith::train::23501
swe_smith
train
23,501
pyparsing__pyparsing.533adf47.func_basic__a0vggfqb
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
Config flag setting returns string instead of raising ValueError for invalid names #### Description When trying to set an invalid diagnostic flag name, the method returns a string error message instead of raising a ValueError as expected. #### Steps/Code to Reproduce ```python import pyparsing as pp # This should ...
diff --git a/pyparsing/util.py b/pyparsing/util.py index 1487019..302d608 100644 --- a/pyparsing/util.py +++ b/pyparsing/util.py @@ -20,17 +20,17 @@ class __config_flags: @classmethod def _set(cls, dname, value): - if dname in cls._fixed_names: + if dname in cls._all_names: warnin...
["tests/test_unit.py::Test01b_PyparsingUnitTestUtilitiesTests::runTest", "tests/test_unit.py::Test02_WithoutPackrat::testAutonameElements", "tests/test_unit.py::Test02_WithoutPackrat::testEnableDebugOnNamedExpressions", "tests/test_unit.py::Test02_WithoutPackrat::testEnableWarnDiags", "tests/test_unit.py::Test02_Withou...
["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse...
jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47
true
null
1
6
73
1,076
0
0.6
1
0.75
1
0.199333
80.873
8,330
swe_smith::train::21071
swe_smith
train
21,071
tobymao__sqlglot.036601ba.func_pm_remove_wrapper__hgqorg5l
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Dialect string parsing with parameters broken When trying to use dialect strings with parameters (e.g., `"postgres,setting=value"`), the dialect parsing fails with a `NameError`. #### Steps/Code to Reproduce ```python import sqlglot # This should work but raises NameError dialect = sqlglot.Dialect.get_or_raise("pos...
diff --git a/sqlglot/dialects/dialect.py b/sqlglot/dialects/dialect.py index 019833f..88e9f36 100644 --- a/sqlglot/dialects/dialect.py +++ b/sqlglot/dialects/dialect.py @@ -814,27 +814,6 @@ class Dialect(metaclass=_Dialect): if isinstance(dialect, Dialect): return dialect if isinstance(di...
["tests/dialects/test_dialect.py::TestDialect::test_alias", "tests/dialects/test_dialect.py::TestDialect::test_array", "tests/dialects/test_dialect.py::TestDialect::test_array_any", "tests/dialects/test_dialect.py::TestDialect::test_cast", "tests/dialects/test_dialect.py::TestDialect::test_cast_to_user_defined_type", "...
["tests/dialects/test_dialect.py::TestDialect::test_compare_dialects", "tests/dialects/test_dialect.py::TestDialect::test_create_sequence", "tests/dialects/test_dialect.py::TestDialect::test_lateral_subquery", "tests/dialects/test_dialect.py::TestDialect::test_lazy_load", "tests/dialects/test_dialect.py::TestDialect::t...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
22
48
756
0
0.6
1
0.75
1
0.199333
80.873
8,331
swe_smith::train::1743
swe_smith
train
1,743
agronholm__typeguard.b6a7e438.func_basic__2ccm2li6
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
TypeguardTransformer.visit_Module returns wrong object type #### Description The `visit_Module` method in `TypeguardTransformer` is returning a `TransformMemo` object instead of the expected `Module` AST node. This causes issues when the transformer is used as part of AST processing pipelines. #### Steps/Code to Rep...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..d2c8a35 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -595,11 +595,11 @@ class TypeguardTransformer(NodeTransformer): def visit_Module(self, node: Module) -> Module: self._module...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_pytest_plugin.py::test_config_options", "tests/test_pytest_plugin.py::test_commandline_options", "tests/test_transformer.py::test_arguments_only", "tests/test_transformer.py::test_return_only", "tests/t...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
6
49
1,076
0
0.6
1
0.75
1
0.199333
80.873
8,332
swe_smith::train::12866
swe_smith
train
12,866
python-openxml__python-docx.0cf6d71f.combine_file__j6f65dy5
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
BaseXmlEnum string representation format changed unexpectedly #### Description The string representation of BaseXmlEnum members has changed from showing name first to value first, breaking existing code that depends on the format. #### Steps/Code to Reproduce ```python from docx.enum.base import BaseXmlEnum class ...
diff --git a/src/docx/enum/base.py b/src/docx/enum/base.py index bc96ab6..42af97c 100644 --- a/src/docx/enum/base.py +++ b/src/docx/enum/base.py @@ -48,7 +48,7 @@ class BaseXmlEnum(int, enum.Enum): def __str__(self): """The symbolic name and string value of this member, e.g. 'MIDDLE (3)'.""" - re...
["tests/test_enum.py::DescribeBaseXmlEnum::and_it_can_find_the_member_from_None_when_a_member_maps_that", "tests/test_enum.py::DescribeBaseXmlEnum::but_it_raises_when_there_is_no_such_mapped_XML_value", "tests/test_enum.py::DescribeBaseXmlEnumMembers::but_its_str_value_is_customized", "tests/text/test_parfmt.py::Descri...
["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
6
5
1,076
0
0.6
1
0.75
1
0.199333
80.873
8,333
swe_smith::train::1513
swe_smith
train
1,513
Cog-Creators__Red-DiscordBot.33e0eac7.func_basic__nz2ohqx9
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
ProcessFormatter.get_value() arguments swapped causing KeyError #### Description The ProcessFormatter class in the downloader module has incorrect argument order in the get_value method call, causing a KeyError when formatting command strings. #### Steps/Code to Reproduce ```python from redbot.cogs.downloader.repo_...
diff --git a/redbot/cogs/downloader/repo_manager.py b/redbot/cogs/downloader/repo_manager.py index 8d9b3fa..7f2f0a5 100644 --- a/redbot/cogs/downloader/repo_manager.py +++ b/redbot/cogs/downloader/repo_manager.py @@ -87,10 +87,10 @@ class ProcessFormatter(Formatter): return shlex.split(super().vformat(format_s...
["tests/cogs/downloader/test_downloader.py::test_is_ancestor[c950fc05a540dd76b944719c2a3302da2e2f3090-fb99eb7d2d5bed514efc98fe6686b368f8425745-0-True]", "tests/cogs/downloader/test_downloader.py::test_is_ancestor[fb99eb7d2d5bed514efc98fe6686b368f8425745-c950fc05a540dd76b944719c2a3302da2e2f3090-1-False]", "tests/cogs/do...
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
1
6
48
1,076
0
0.6
1
0.75
1
0.199333
80.873
8,334
swe_smith::train::27803
swe_smith
train
27,803
arrow-py__arrow.1d70d009.lm_rewrite__d242fn5f
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
# Arrow.now() doesn't work with timezone strings I found a bug in the `now()` method of the Arrow library. When trying to use a string timezone identifier, it fails with a TypeError. ## Reproduction ```python import arrow # This fails with TypeError arrow.now('EST') ``` ## Error message ``` TypeError: tzinfo argu...
diff --git a/arrow/factory.py b/arrow/factory.py index 53eb8d1..f64e313 100644 --- a/arrow/factory.py +++ b/arrow/factory.py @@ -314,7 +314,7 @@ class ArrowFactory: return self.type.utcnow() - def now(self, tz: Optional[TZ_EXPR] = None) -> Arrow: + def now(self, tz: Optional[TZ_EXPR]=None) ->Arrow: ...
["tests/test_factory.py::TestNow::test_tz_str"]
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
10
1
996
0
0.6
1
0.75
1
0.199333
80.873
8,335
swe_smith::train::28283
swe_smith
train
28,283
encode__starlette.db5063c2.combine_file__17o76mta
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
AwaitableOrContextManagerWrapper not storing awaitable properly When using `AwaitableOrContextManagerWrapper`, the awaitable passed to the constructor is not being stored correctly, causing AttributeError when trying to access `self.aw`. #### Steps/Code to Reproduce ```python import asyncio from starlette._utils imp...
diff --git a/starlette/_utils.py b/starlette/_utils.py index 74c9f24..6e813ed 100644 --- a/starlette/_utils.py +++ b/starlette/_utils.py @@ -56,7 +56,7 @@ class AwaitableOrContextManagerWrapper(typing.Generic[SupportsAsyncCloseType]): __slots__ = ("aw", "entered") def __init__(self, aw: typing.Awaitable[Sup...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_custom_middleware[trio]", "tests/middleware/test_session.py::test_session_cookie_subpath[asyncio]", "tests/middleware/test_session.py::test_session_cookie_subpath[trio]", "tests/middleware/test_wsgi.py::test_wsgi_exc...
["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/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTT...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
21
111
776
0
0.6
1
0.75
1
0.199333
80.873
8,336
swe_smith::train::27209
swe_smith
train
27,209
tkrajina__gpxpy.09fc46b3.func_pm_ctrl_shuffle__pp9pvlm2
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX get_moving_data returns early with uninitialized variables #### Description The `get_moving_data()` method in the GPX class returns early before initializing all required variables, causing `UnboundLocalError` when trying to access moving_distance and max_speed. #### Steps/Code to Reproduce ```python import gpx...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..4acb0ad 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -2224,13 +2224,11 @@ class GPX: Max speed is in m/s. """ - moving_time = 0. - stopped_time = 0. - - moving_distance = 0. stopped_distance = 0. + moving...
["test.py::GPXTests::test_ignore_maximums_for_max_speed", "test.py::GPXTests::test_moving_stopped_times", "test.py::GPXTests::test_named_tuples_values_moving_data", "test.py::GPXTests::test_raw_max_speed", "test.py::GPXTests::test_speed_ignore_top_speed_percentiles"]
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
11
5
975
0
0.6
1
0.75
1
0.199167
80.8725
8,337
swe_smith::train::52524
swe_smith
train
52,524
pydicom__pydicom.7d361b3d.func_pm_remove_assign__tm22qhnx
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
NameError in FileSet string representation after removing variables #### Description When calling `str()` on a FileSet object, a NameError is raised due to undefined variables `nr`, `rm`, and `plural` in the string formatting logic. #### Steps/Code to Reproduce ```python from pydicom.fileset import FileSet from pyd...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..66d3f12 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -483,8 +483,6 @@ class RecordNode(Iterable["RecordNode"]): # Split into record types rtypes = {ii.record_type for ii in sibs} ...
["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
7
4
1,055
0
0.6
1
0.75
1
0.199167
80.8725
8,338
swe_smith::train::1922
swe_smith
train
1,922
agronholm__typeguard.b6a7e438.func_pm_remove_cond__yyjvai2c
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
#### Description The `get_type_name` function is broken and returns undefined variables when processing type annotations with arguments. #### Steps/Code to Reproduce ```python from typing import Union, Literal from typeguard._utils import get_type_name # This should work but raises NameError annotation = Union[str,...
diff --git a/src/typeguard/_utils.py b/src/typeguard/_utils.py index e8f9b03..362b2d4 100644 --- a/src/typeguard/_utils.py +++ b/src/typeguard/_utils.py @@ -71,17 +71,8 @@ def get_type_name(type_: Any) -> str: if candidate is None: candidate = type_.__class__.__name__.strip("_") - if isin...
["tests/test_checkers.py::TestLiteral::test_literal_union", "tests/test_checkers.py::TestTypevar::test_collection_constraints_fail", "tests/test_checkers.py::TestRecursiveType::test_valid", "tests/test_checkers.py::TestRecursiveType::test_fail", "tests/test_instrumentation.py::test_pep_604_union_args[typechecked]", "te...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
10
6
995
0
0.6
1
0.75
1
0.199167
80.8725
8,339
swe_smith::train::29885
swe_smith
train
29,885
getnikola__nikola.0f4c230e.func_pm_ctrl_shuffle__gvnz4ll8
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
NameError in PageCompiler.split_metadata when extractor variable is undefined #### Description When calling `split_metadata` method on a PageCompiler instance, a NameError occurs because the `extractor` variable is referenced before it's defined. #### Steps/Code to Reproduce ```python from nikola.plugin_categories ...
diff --git a/nikola/plugin_categories.py b/nikola/plugin_categories.py index 140f127..43195ac 100644 --- a/nikola/plugin_categories.py +++ b/nikola/plugin_categories.py @@ -339,18 +339,17 @@ class PageCompiler(BasePlugin): return {} def split_metadata(self, data: str, post=None, lang=None) -> Tuple[str,...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[overall]", "tests/integration/test_archive_full.py::test_full_archive[year]", "tests/integration/test_archive_full.py::te...
["tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_per_day.py::test_check_files", "tests/integration/test_archive_per_day.py::test_check_links", "tests/integration/test_archive_per_month.py::test_check_files", "tests/i...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
9
100
1,015
0
0.6
1
0.75
1
0.199167
80.8725
8,340
swe_smith::train::7690
swe_smith
train
7,690
cantools__cantools.0c6a7871.func_basic__p55c3o46
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Log reader pattern matching broken for all formats #### Description The log reader is failing to parse any CAN log format. When trying to parse candump logs, PCAN traces, or any other supported format, the parser returns None or throws AttributeError about missing 'group' method. #### Steps/Code to Reproduce ```pyt...
diff --git a/src/cantools/logreader.py b/src/cantools/logreader.py index 67943e0..76eb1ab 100644 --- a/src/cantools/logreader.py +++ b/src/cantools/logreader.py @@ -40,9 +40,9 @@ class DataFrame: class BasePattern: @classmethod def match(clz, line): - mo = clz.pattern.match(line) - if mo: - ...
["tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_log_format", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_muxed_data", "tests/test_comman...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
6
33
1,075
0
0.6
1
0.75
1
0.199167
80.8725
8,341
swe_smith::train::32782
swe_smith
train
32,782
pydantic__pydantic.acb0f10f.lm_rewrite__drfp3ok9
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
`typing.Self` validation silently accepts invalid usage instead of raising error #### Description When using `typing.Self` in contexts where it should be invalid (like standalone functions with `@validate_call`), the validation now silently accepts it instead of raising a `PydanticUserError` as expected. #### Steps/...
diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py index 9ec8a61..a28301b 100644 --- a/pydantic/_internal/_generate_schema.py +++ b/pydantic/_internal/_generate_schema.py @@ -826,11 +826,18 @@ class GenerateSchema: return self.defs.create_definition_reference_s...
["tests/test_types_self.py::test_invalid_validate_call[Self]", "tests/test_types_self.py::test_invalid_validate_call_of_method[Self]"]
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
17
2
855
0
0.6
1
0.75
1
0.199167
80.8725
8,342
swe_smith::train::13768
swe_smith
train
13,768
python-openxml__python-docx.0cf6d71f.func_basic__n2g1smez
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
TabStops deletion removes wrong tab and doesn't raise IndexError properly #### Description When deleting tab stops using `del tab_stops[idx]`, the wrong tab is being removed and invalid indices don't raise IndexError as expected. #### Steps/Code to Reproduce ```python from docx import Document from docx.shared impo...
diff --git a/src/docx/text/tabstops.py b/src/docx/text/tabstops.py index 824085d..b3b763a 100644 --- a/src/docx/text/tabstops.py +++ b/src/docx/text/tabstops.py @@ -21,11 +21,11 @@ class TabStops(ElementProxy): """Remove the tab at offset `idx` in this sequence.""" tabs = self._pPr.tabs try: ...
["tests/text/test_tabstops.py::DescribeTabStops::it_can_delete_a_tab_stop[del_fixture1]", "tests/text/test_tabstops.py::DescribeTabStops::it_can_delete_a_tab_stop[del_fixture2]", "tests/text/test_tabstops.py::DescribeTabStops::it_raises_on_del_idx_invalid[del_raises_fixture0]", "tests/text/test_tabstops.py::DescribeTab...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
6
4
1,074
0
0.6
1
0.75
1
0.199
80.872
8,343
swe_smith::train::10007
swe_smith
train
10,007
google__textfsm.c31b6007.func_pm_class_rm_funcs__r361mwc2
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
TextFSMRule missing __str__ method breaks string representation #### Description When trying to get string representation of TextFSMRule objects, an AttributeError is raised because the `__str__` method is missing from the TextFSMRule class. #### Steps/Code to Reproduce ```python import textfsm template = """ Valu...
diff --git a/textfsm/parser.py b/textfsm/parser.py index c00c976..2a80f43 100755 --- a/textfsm/parser.py +++ b/textfsm/parser.py @@ -525,28 +525,6 @@ class TextFSMRule(object): % (self.line_num) ) - def __str__(self): - """Prints out the FSM Rule, mimic the input file.""" - - operation = ...
["tests/textfsm_test.py::UnitTestFSM::testImplicitDefaultRules", "tests/textfsm_test.py::UnitTestFSM::testInvalidStates", "tests/textfsm_test.py::UnitTestFSM::testParseFSMState", "tests/textfsm_test.py::UnitTestFSM::testSpacesAroundAction", "tests/textfsm_test.py::UnitTestFSM::testTextFSM", "tests/textfsm_test.py::Unit...
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.p...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
22
6
754
0
0.6
1
0.75
1
0.199
80.872
8,344
swe_smith::train::8125
swe_smith
train
8,125
cantools__cantools.0c6a7871.func_pm_remove_cond__ccb0skt2
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
NameError in signal_tree_string function when processing signals #### Description When using cantools dump or list commands, a `NameError: name 'signal_name_line' is not defined` error occurs. This affects the signal tree string formatting functionality. #### Steps/Code to Reproduce ```python import cantools # Loa...
diff --git a/src/cantools/subparsers/dump/formatting.py b/src/cantools/subparsers/dump/formatting.py index 96e603a..6ea05b0 100644 --- a/src/cantools/subparsers/dump/formatting.py +++ b/src/cantools/subparsers/dump/formatting.py @@ -75,13 +75,6 @@ def signal_tree_string(message, console_width=80, with_comments=False): ...
["tests/test_command_line.py::CanToolsCommandLineTest::test_dump", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_j1939", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_no_sender", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_signal_choices", "tests/test_command_line...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
8
28
1,034
0
0.6
1
0.75
1
0.199
80.872
8,345
swe_smith::train::38929
swe_smith
train
38,929
pallets__jinja.ada0a9a6.func_basic__a3uf5vt4
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Variable tracking broken in conditional branches #### Description Template compilation fails with `ValueError: dictionary update sequence element #0 has length 1; 2 is required` when using variables in conditional branches like if/elif/else statements and for loops. #### Steps/Code to Reproduce ```python from jinja...
diff --git a/src/jinja2/idtracking.py b/src/jinja2/idtracking.py index d6cb635..940b554 100644 --- a/src/jinja2/idtracking.py +++ b/src/jinja2/idtracking.py @@ -122,22 +122,23 @@ class Symbols: for branch in branch_symbols: for target in branch.stores: if target in self.stores: + ...
["tests/test_async.py::TestAsyncForLoop::test_recursive", "tests/test_async.py::TestAsyncForLoop::test_recursive_lookaround", "tests/test_async.py::TestAsyncForLoop::test_recursive_depth0", "tests/test_async.py::TestAsyncForLoop::test_recursive_depth", "tests/test_async.py::TestAsyncForLoop::test_reversed_bug", "tests/...
["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
11
48
974
0
0.6
1
0.75
1
0.199
80.872
8,346
swe_smith::train::24319
swe_smith
train
24,319
sunpy__sunpy.f8edfd5c.func_pm_remove_cond__j6k15rw6
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Coordinate transformation fails when source observer is None #### Description When attempting coordinate transformations with a source frame that has `observer=None`, the transformation fails with an `AttributeError: 'NoneType' object has no attribute 'lat'` instead of the expected `ConvertError`. #### Steps/Code to...
diff --git a/sunpy/coordinates/_transformations.py b/sunpy/coordinates/_transformations.py index 5b18d02..6f5f577 100644 --- a/sunpy/coordinates/_transformations.py +++ b/sunpy/coordinates/_transformations.py @@ -274,19 +274,11 @@ def _observers_are_equal(obs_1, obs_2): # Note that this also lets pass the situatio...
["sunpy/coordinates/tests/test_transformations.py::test_hgc_loopback_self_observer", "sunpy/coordinates/tests/test_transformations.py::test_no_observer"]
["sunpy/coordinates/tests/test_transformations.py::test_hcc_to_hgs", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc_sc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc_null", "sunpy/coordinates/tests/test_transformations.py...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
9
2
1,014
0
0.6
1
0.75
1
0.199
80.872
8,347
swe_smith::train::39766
swe_smith
train
39,766
tornadoweb__tornado.d5ac65c1.func_pm_ctrl_invert_if__mokc9sh9
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
linkify function breaks when extra_params is a string #### Description The `linkify` function in `tornado.escape` fails with a TypeError when `extra_params` is passed as a string instead of a callable function. #### Steps/Code to Reproduce ```python import tornado.escape # This works fine text = "Visit http://exam...
diff --git a/tornado/escape.py b/tornado/escape.py index 8515bf5..878350d 100644 --- a/tornado/escape.py +++ b/tornado/escape.py @@ -349,18 +349,18 @@ def linkify( href = "http://" + href # no proto specified, use http if callable(extra_params): - params = " " + extra_params(href).st...
["test_linkify (tornado.test.escape_test.EscapeTestCase)", "test_uimodule_unescaped (tornado.test.web_test.WSGISafeWebTest)"]
["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header...
jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1
true
null
1
13
2
934
0
0.6
1
0.75
1
0.199
80.872
8,348
swe_smith::train::10418
swe_smith
train
10,418
paramiko__paramiko.23f92003.func_basic__d0im4tfs
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Agent connection fails when get_agent_connection() returns falsy non-None value #### Description When `get_agent_connection()` returns a falsy value that is not `None` (like an empty string, 0, False, etc.), the Agent initialization fails with an AttributeError because it tries to call `_connect()` with the falsy val...
diff --git a/paramiko/agent.py b/paramiko/agent.py index b29a0d1..06f991a 100644 --- a/paramiko/agent.py +++ b/paramiko/agent.py @@ -410,9 +410,9 @@ class Agent(AgentSSH): AgentSSH.__init__(self) conn = get_agent_connection() - if not conn: - return - self._connect(conn) + ...
["tests/test_client.py::SSHClientTest::test_auth_timeout", "tests/test_client.py::SSHClientTest::test_auth_trickledown", "tests/test_client.py::SSHClientTest::test_auto_add_policy", "tests/test_client.py::SSHClientTest::test_channel_timeout", "tests/test_client.py::SSHClientTest::test_cleanup", "tests/test_client.py::S...
["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
6
16
1,074
0
0.6
1
0.75
1
0.199
80.872
8,349
swe_smith::train::51620
swe_smith
train
51,620
pydicom__pydicom.7d361b3d.combine_module__kbb7idod
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Data directory creation fails when cache directory already exists #### Description The data manager fails to create the cache directory when it already exists, causing multiple functions to break when trying to access test data files. #### Steps/Code to Reproduce ```python import pydicom from pydicom.data import fe...
diff --git a/src/pydicom/data/data_manager.py b/src/pydicom/data/data_manager.py index 91f2e23..13eb539 100644 --- a/src/pydicom/data/data_manager.py +++ b/src/pydicom/data/data_manager.py @@ -162,15 +162,15 @@ def online_test_file_dummy_paths() -> dict[str, str]: def fetch_data_files() -> None: """Download missi...
["tests/pixels/test_common.py::TestRunnerBase::test_set_options_ds", "tests/pixels/test_decoder_base.py::TestDecoder::test_buffer", "tests/pixels/test_encoder_pydicom.py::TestEncodeSegment::test_cycle", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jls_ilv0", "tests/pixels/test_utils.py::TestGetJpgParameters:...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
2
10
60
994
0
0.6
1
0.75
1
0.199
80.872
8,350
swe_smith::train::39081
swe_smith
train
39,081
pallets__jinja.ada0a9a6.func_basic__jaznj20q
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
#### Description The `compile_expression` method in Jinja2's Environment class is not working correctly. When trying to compile and execute simple expressions, it raises a `KeyError: 'result'` error. #### Steps/Code to Reproduce ```python from jinja2 import Environment env = Environment() expr = env.compile_express...
diff --git a/src/jinja2/environment.py b/src/jinja2/environment.py index 0b303d5..0ace8bd 100644 --- a/src/jinja2/environment.py +++ b/src/jinja2/environment.py @@ -799,20 +799,20 @@ class Environment: .. versionadded:: 2.1 """ - parser = Parser(self, source, state="variable") + parser...
["tests/test_api.py::TestExtendedAPI::test_expressions"]
["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
14
1
914
0
0.6
1
0.75
1
0.199
80.872
8,351
swe_smith::train::23963
swe_smith
train
23,963
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__9bjb9fr2
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
endpoint_parser function returns empty list instead of None when link_test fails #### Description The `endpoint_parser` function in `sunpy.net.helio.parser` is not working correctly when the `link_test` function returns `None`. Instead of returning `None` as expected, it's causing an `UnboundLocalError` because the c...
diff --git a/sunpy/net/helio/parser.py b/sunpy/net/helio/parser.py index 7af0dfa..961935a 100644 --- a/sunpy/net/helio/parser.py +++ b/sunpy/net/helio/parser.py @@ -105,17 +105,16 @@ def endpoint_parser(link): 'http://helio.mssl.ucl.ac.uk/helio-hec/HelioTavernaService?wsdl'] """ - endpoint_page = link_te...
["sunpy/net/helio/tests/test_helio.py::test_endpoint_parser_no_content", "sunpy/net/helio/tests/test_helio.py::test_endpoint_parser_get_links"]
["sunpy/net/helio/tests/test_helio.py::test_webservice_parser_no_content", "sunpy/net/helio/tests/test_helio.py::test_webservice_parser_get_links", "sunpy/net/helio/tests/test_helio.py::test_taverna_parser_no_content", "sunpy/net/helio/tests/test_helio.py::test_taverna_parser_no_taverna_links", "sunpy/net/helio/tests/t...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
9
2
1,013
0
0.6
1
0.75
1
0.198833
80.8715
8,352
swe_smith::train::7906
swe_smith
train
7,906
cantools__cantools.0c6a7871.func_pm_ctrl_invert_if__iij7pby6
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML ECU extract loader fails on RECEIVE direction messages #### Description When loading ARXML files with ECU extract format, messages with direction "RECEIVE" cause a NotImplementedError to be raised, preventing the database from loading properly. #### Steps/Code to Reproduce ```python import cantools # This wi...
diff --git a/src/cantools/database/can/formats/arxml/ecu_extract_loader.py b/src/cantools/database/can/formats/arxml/ecu_extract_loader.py index 67935ab..0764a06 100644 --- a/src/cantools/database/can/formats/arxml/ecu_extract_loader.py +++ b/src/cantools/database/can/formats/arxml/ecu_extract_loader.py @@ -126,11 +126...
["tests/test_database.py::CanToolsDatabaseTest::test_ecu_extract_arxml"]
["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
7
1
1,053
0
0.6
1
0.75
1
0.198833
80.8715
8,353
swe_smith::train::20614
swe_smith
train
20,614
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__c5lval0j
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Hive parameter SQL generation broken with UnboundLocalError #### Description When generating SQL for Hive parameters, an UnboundLocalError is raised due to a variable being referenced before assignment. #### Steps/Code to Reproduce ```python import sqlglot # This will raise UnboundLocalError: cannot access local v...
diff --git a/sqlglot/dialects/hive.py b/sqlglot/dialects/hive.py index 6084d44..b83f108 100644 --- a/sqlglot/dialects/hive.py +++ b/sqlglot/dialects/hive.py @@ -636,18 +636,17 @@ class Hive(Dialect): return super()._jsonpathkey_sql(expression) def parameter_sql(self, expression: exp.Parameter) -...
["tests/dialects/test_hive.py::TestHive::test_hive"]
["tests/dialects/test_hive.py::TestHive::test_bits", "tests/dialects/test_hive.py::TestHive::test_cast", "tests/dialects/test_hive.py::TestHive::test_data_type", "tests/dialects/test_hive.py::TestHive::test_ddl", "tests/dialects/test_hive.py::TestHive::test_escapes", "tests/dialects/test_hive.py::TestHive::test_lateral...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
9
1
1,013
0
0.6
1
0.75
1
0.198833
80.8715
8,354
swe_smith::train::48123
swe_smith
train
48,123
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_invert_if__4lg3hxu9
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
nested_combine function raises ValueError when merging compatible dictionaries #### Description The `nested_combine` function in `src/sqlfluff/core/helpers/dict.py` is incorrectly raising a ValueError when trying to merge dictionaries that should be compatible. The logic for checking dictionary compatibility appears ...
diff --git a/src/sqlfluff/core/helpers/dict.py b/src/sqlfluff/core/helpers/dict.py index ae76dcd..b0a149a 100644 --- a/src/sqlfluff/core/helpers/dict.py +++ b/src/sqlfluff/core/helpers/dict.py @@ -64,17 +64,17 @@ def nested_combine(*dicts: NestedStringDict[T]) -> NestedStringDict[T]: for d in dicts: for k...
["test/core/helpers/dict_test.py::test__helpers_dict__nested_combine", "test/core/helpers/dict_test.py::test__helpers_dict__nested_combine_copy_effect"]
["test/core/helpers/dict_test.py::test_helpers_dict_doctests", "test/core/helpers/dict_test.py::test__helpers_dict__dict_diff", "test/core/helpers/dict_test.py::test__config__iter_records_from_nested_dict"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
13
2
933
0
0.6
1
0.75
1
0.198833
80.8715
8,355
r2e_gym::train::5008
r2e_gym
train
5,008
datalad__c30dd60ec134dbf7142f263cd885ea97003ebfea
datalad
datalad/datalad
python
c30dd60ec134dbf7142f263cd885ea97003ebfea
**Title:** AttributeError when invoking `call_from_parser`: Missing `_get_result_filter` Method **Description:** When using the `call_from_parser` method from the `Interface` class, an `AttributeError` is encountered because the `_get_result_filter` method does not exist. This prevents the method from processing argum...
diff --git a/datalad/cmdline/main.py b/datalad/cmdline/main.py --- a/datalad/cmdline/main.py +++ b/datalad/cmdline/main.py @@ -113,7 +113,7 @@ '-f', '--output-format', dest='common_output_format', default='default', type=assure_unicode, - metavar="{default,json,json_pp,tailored,'<templ...
diff --git a/datalad/interface/tests/test_base.py b/datalad/interface/tests/test_base.py --- a/datalad/interface/tests/test_base.py +++ b/datalad/interface/tests/test_base.py @@ -0,0 +1,112 @@ +# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- +# ex: set sts=4 ts=4 sw=4 noet: +# ##...
null
null
namanjain12/datalad_final:c30dd60ec134dbf7142f263cd885ea97003ebfea
true
null
2
48
null
945
0
0.75
1
0.6375
1
0.3175
80.87125
8,356
swe_smith::train::47064
swe_smith
train
47,064
python-trio__trio.cfbbe2c1.func_pm_class_rm_funcs__se2g6p7z
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SocketType can be instantiated directly #### Description The SocketType class can now be instantiated directly, which should not be allowed since it's meant to be an abstract base class. #### Steps/Code to Reproduce ```python import trio.socket as tsocket # This should raise TypeError but doesn't sock_type = tsock...
diff --git a/src/trio/_socket.py b/src/trio/_socket.py index 259992b..ae4a82a 100644 --- a/src/trio/_socket.py +++ b/src/trio/_socket.py @@ -544,22 +544,10 @@ async def _resolve_address_nocp( class SocketType: - def __init__(self) -> None: - # make sure this __init__ works with multiple inheritance - ...
["src/trio/_tests/test_socket.py::test_SocketType_is_abstract"]
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
25
1
692
0
0.6
1
0.75
1
0.198667
80.871
8,357
swe_smith::train::36469
swe_smith
train
36,469
lincolnloop__python-qrcode.456b01d4.combine_file__gjetp0l3
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
QRCode generation fails with UnboundLocalError in Polynomial.__mod__ #### Description When generating QR codes, the library throws an `UnboundLocalError: local variable 'difference' referenced before assignment` error. This happens during the Reed-Solomon error correction calculation in the polynomial modulo operatio...
diff --git a/qrcode/base.py b/qrcode/base.py index 20f81f6..2c76c37 100644 --- a/qrcode/base.py +++ b/qrcode/base.py @@ -232,9 +232,9 @@ RS_BLOCK_TABLE = ( def glog(n): - if n < 1: # pragma: no cover + if n <= 1: raise ValueError(f"glog({n})") - return LOG_TABLE[n] + return LOG_TABLE[n - 1] ...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_add_qrdata", "qrcode/tests/test_qrcode.py::test_fit", "qrcode/tests/test_qrcode.py::test_mode_number", "qrcode/tests/test_qrcode.py::test_mode_alpha", "...
["qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_make_image_with_wrong_pattern", "qrcode/tests/test_qrcode.py::test_mask_pattern_setter", "qrcode/tests/test_qrcode.py::test_qrcode_ba...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
15
57
892
0
0.6
1
0.75
1
0.198667
80.871
8,358
swe_smith::train::17943
swe_smith
train
17,943
pyasn1__pyasn1.0f07d724.func_pm_remove_assign__2ubyzqyd
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
Real decoder produces incorrect results for binary encoded values #### Description The BER decoder for Real values is not correctly decoding binary encoded real numbers. When decoding binary format real values, the decoder produces incorrect results or raises UnboundLocalError exceptions. #### Steps/Code to Reproduc...
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index 7e69ca1..30eaf61 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -534,18 +534,14 @@ class RealPayloadDecoder(AbstractSimplePayloadDecoder): n = (fo & 0x03) + 1 if n == 4: - ...
["tests/codec/ber/test_decoder.py::RealDecoderTestCase::testBin1", "tests/codec/ber/test_decoder.py::RealDecoderTestCase::testBin2", "tests/codec/ber/test_decoder.py::RealDecoderTestCase::testBin3", "tests/codec/ber/test_decoder.py::RealDecoderTestCase::testBin4", "tests/codec/ber/test_decoder.py::RealDecoderTestCase::...
["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
13
6
932
0
0.6
1
0.75
1
0.198667
80.871
8,359
swe_bench::test::1672
swe_bench
test
1,672
scikit-learn__scikit-learn-15512
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
b8a4da8baa1137f173e7035f104067c7d2ffde22
Return values of non converged affinity propagation clustering The affinity propagation Documentation states: "When the algorithm does not converge, it returns an empty array as cluster_center_indices and -1 as label for each training sample." Example: ```python from sklearn.cluster import AffinityPropagation import p...
@JenniferHemmerich this affinity propagation code is not often updated. If you have time to improve its documentation and fix corner cases like the one you report please send us PR. I'll try to find the time to review the changes. thanks Working on this for the wmlds scikit learn sprint (pair programming with @akeshava...
diff --git a/sklearn/cluster/_affinity_propagation.py b/sklearn/cluster/_affinity_propagation.py --- a/sklearn/cluster/_affinity_propagation.py +++ b/sklearn/cluster/_affinity_propagation.py @@ -194,17 +194,19 @@ def affinity_propagation(S, preference=None, convergence_iter=15, max_iter=200, unconverged = ...
diff --git a/sklearn/cluster/tests/test_affinity_propagation.py b/sklearn/cluster/tests/test_affinity_propagation.py --- a/sklearn/cluster/tests/test_affinity_propagation.py +++ b/sklearn/cluster/tests/test_affinity_propagation.py @@ -152,6 +152,14 @@ def test_affinity_propagation_predict_non_convergence(): assert...
["sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_non_convergence_regressiontest"]
["sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation", "sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_predict", "sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_predict_error", "sklearn/cluster/tests/test_affinity_propagation.py::t...
null
true
2019-11-02T22:28:57Z
1
5
1
1,841
0
0.8
1
0.7
0.8
0.3235
80.8705
8,360
swe_smith::train::10396
swe_smith
train
10,396
paramiko__paramiko.23f92003.func_basic__b2m7hi1u
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP server status response arguments swapped causing operation failures When using SFTP operations, all file operations are failing with `OSError: ess` messages. The error messages are truncated and operations that should work normally are throwing exceptions. #### Steps to Reproduce ```python import paramiko # Se...
diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index cd3910d..2fed5bb 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -257,11 +257,9 @@ class SFTPServer(BaseSFTP, SubsystemHandler): if desc is None: try: desc = SFTP_DESC[code] - exc...
["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
8
42
1,031
0
0.6
1
0.75
1
0.1985
80.8705
8,361
swe_smith::train::43627
swe_smith
train
43,627
cloudpipe__cloudpickle.6220b0ce.func_pm_ctrl_invert_if__6lelorsy
swesmith/cloudpipe__cloudpickle.6220b0ce
cloudpipe/cloudpickle
python
null
TypeError when pickling modules after recent changes #### Description After a recent change, cloudpickle now raises a `TypeError` when attempting to pickle module objects. The error message indicates that it "cannot check importability of module instances". #### Steps/Code to Reproduce ```python import cloudpickle ...
diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py index 8c50ba1..0d18483 100644 --- a/cloudpickle/cloudpickle.py +++ b/cloudpickle/cloudpickle.py @@ -248,6 +248,10 @@ def _should_pickle_by_reference(obj, name=None): return not _is_registered_pickle_by_value(module) elif isinstance(obj...
["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_test.py::CloudPickleTest::test_abc", "tests/cloudpickle_test.py::CloudPickleTest::test_abstracts", "tests/cloudpickle_test.py::CloudPickleTest::test_dataclass", "tests/cloudpickle_test.py::CloudPickleTest::te...
["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_r_mode", "tests/cloudpickle_file_test.py...
jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce
true
null
1
9
53
1,011
0
0.6
1
0.75
1
0.1985
80.8705
8,362
swe_smith::train::1721
swe_smith
train
1,721
agronholm__typeguard.b6a7e438.combine_module__osxi4v91
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
@typechecked decorator returns None instead of wrapped function #### Description The `@typechecked` decorator is returning `None` instead of the properly wrapped function, causing decorated functions to become unusable. #### Steps/Code to Reproduce ```python from typeguard import typechecked @typechecked def foo(x...
diff --git a/src/typeguard/_decorators.py b/src/typeguard/_decorators.py index a6c20cb..6f6eba8 100644 --- a/src/typeguard/_decorators.py +++ b/src/typeguard/_decorators.py @@ -228,6 +228,6 @@ def typechecked( return target if wrapper_class is None: - return retval - else: return wrap...
["tests/test_checkers.py::TestLiteral::test_literal_union", "tests/test_checkers.py::TestUnion::test_typing_type_fail", "tests/test_checkers.py::TestTypevar::test_collection_constraints_fail", "tests/test_checkers.py::TestRecursiveType::test_fail", "tests/test_instrumentation.py::test_pep_604_union_args[importhook]", "...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
2
14
55
911
0
0.6
1
0.75
1
0.1985
80.8705
8,363
swe_smith::train::4532
swe_smith
train
4,532
pygments__pygments.27649ebb.func_pm_remove_wrapper__nt8vnqqw
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
HtmlFormatter breaks with NameError: name 'cspan' is not defined #### Description The HtmlFormatter is throwing a NameError when trying to format code. It seems like the `cspan` variable is being referenced but not defined in the current scope. #### Steps/Code to Reproduce ```python from pygments import highlight f...
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index 3330c1d..2d88d55 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -838,24 +838,6 @@ class HtmlFormatter(Formatter): lspan = '' line = [] for ttype, value in tokensource: - try:...
["tests/test_html_formatter.py::test_lineanchors_with_startnum", "tests/test_html_formatter.py::test_external_css", "tests/test_html_formatter.py::test_valid_output", "tests/test_html_formatter.py::test_all_options", "tests/test_html_formatter.py::test_lineanchors", "tests/test_html_formatter.py::test_debug_token_types...
["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
19
150
811
0
0.6
1
0.75
1
0.1985
80.8705
8,364
swe_smith::train::32123
swe_smith
train
32,123
davidhalter__parso.338a5760.func_pm_class_rm_funcs__7z01av3s
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Param object missing star_count property after recent changes #### Description After some recent changes, the `Param` class is missing the `star_count` property which causes `AttributeError` when trying to access it. #### Steps/Code to Reproduce ```python import parso # Parse a function with parameters code = "def...
diff --git a/parso/python/tree.py b/parso/python/tree.py index 0624e67..a23ed98 100644 --- a/parso/python/tree.py +++ b/parso/python/tree.py @@ -1094,17 +1094,6 @@ class Param(PythonBaseNode): super().__init__(children) self.parent = parent - @property - def star_count(self): - """ - ...
["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
16
44
871
0
0.6
1
0.75
1
0.1985
80.8705
8,365
swe_smith::train::11776
swe_smith
train
11,776
andialbrecht__sqlparse.e57923b3.func_basic__p1se3c0u
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
CASE statement formatting broken with reindent When using `sqlparse.format()` with `reindent=True` on CASE statements, the formatting produces incorrect output and raises AttributeError. #### Steps/Code to Reproduce ```python import sqlparse # Simple CASE statement sql1 = 'case when foo = 1 then 2 when foo = 3 then...
diff --git a/sqlparse/filters/reindent.py b/sqlparse/filters/reindent.py index 7dc2b82..3642691 100644 --- a/sqlparse/filters/reindent.py +++ b/sqlparse/filters/reindent.py @@ -199,18 +199,18 @@ class ReindentFilter: for cond, value in iterable: str_cond = ''.join(str(x) for x in c...
["tests/test_format.py::TestFormatReindent::test_case", "tests/test_format.py::TestFormatReindent::test_case2"]
["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
16
2
871
0
0.6
1
0.75
1
0.1985
80.8705
8,366
swe_smith::train::20182
swe_smith
train
20,182
kurtmckee__feedparser.cad965a3.lm_rewrite__ugst3j56
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
KeyError in XMLParserMixin when parsing certain attributes Description In the recent update to the XMLParserMixin class, there seems to be an issue with the `_map_to_standard_prefix` method. When parsing certain XML attributes, a `KeyError` is raised. This occurs when the attribute name contains a colon, and the pref...
diff --git a/feedparser/mixin.py b/feedparser/mixin.py index 0e8380d..0175e8c 100644 --- a/feedparser/mixin.py +++ b/feedparser/mixin.py @@ -710,14 +710,13 @@ class XMLParserMixin( return True def _map_to_standard_prefix(self, name): - colonpos = name.find(":") - if colonpos != -1: - ...
["tests/test_well_formed.py::test_loose_parser[info1644]", "tests/test_well_formed.py::test_strict_parser[info1290]", "tests/test_well_formed.py::test_strict_parser[info1644]", "tests/test_well_formed.py::test_loose_parser[info1290]"]
["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
11
4
971
0
0.6
1
0.75
1
0.1985
80.8705
8,367
r2e_gym::train::6242
r2e_gym
train
6,242
pillow__d0394d44c2c54c49aa722da7667dd70ce3c1b432
pillow
python-pillow/pillow
python
d0394d44c2c54c49aa722da7667dd70ce3c1b432
**Title:** Saving DDS Images Raises KeyError: 'DDS' **Description:** When attempting to save an image in DDS format using the Pillow library, a `KeyError` is raised indicating that the 'DDS' format is not recognized. **Example Code:** ```python from PIL import Image # Open an existing image with Image.open("example....
diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst --- a/docs/handbook/image-file-formats.rst +++ b/docs/handbook/image-file-formats.rst @@ -38,6 +38,13 @@ **compression** Set to ``bmp_rle`` if the file is run-length encoded. + +DDS +^^^ + +DDS is a popular container textur...
diff --git a/Tests/test_file_dds.py b/Tests/test_file_dds.py --- a/Tests/test_file_dds.py +++ b/Tests/test_file_dds.py @@ -5,7 +5,7 @@ from PIL import DdsImagePlugin, Image -from .helper import assert_image_equal, assert_image_equal_tofile +from .helper import assert_image_equal, assert_image_equal_tofile, hopper ...
null
null
namanjain12/pillow_final:d0394d44c2c54c49aa722da7667dd70ce3c1b432
true
null
2
60
null
703
0
0.75
1
0.6375
1
0.317167
80.87025
8,368
swe_smith::train::52499
swe_smith
train
52,499
pydicom__pydicom.7d361b3d.func_pm_remove_assign__gotgf4y3
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
generate_fragmented_frames fails with bytes input due to missing BytesIO conversion #### Description When calling `generate_fragmented_frames()` with a `bytes` or `bytearray` input, the function fails because it tries to call methods like `seek()` and `read()` directly on the bytes object instead of converting it to ...
diff --git a/src/pydicom/encaps.py b/src/pydicom/encaps.py index 3493808..c56e7ef 100644 --- a/src/pydicom/encaps.py +++ b/src/pydicom/encaps.py @@ -242,7 +242,7 @@ def generate_fragmented_frames( frame's fragmented encoded data. """ if isinstance(buffer, bytes | bytearray): - buffer = BytesIO...
["tests/pixels/test_decoder_base.py::TestDecoder::test_buffer", "tests/test_encaps.py::TestGeneratePixelDataFrames::test_empty_bot_single_fragment", "tests/test_encaps.py::TestGeneratePixelDataFrames::test_bot_single_fragment", "tests/test_encaps.py::TestGeneratePixelDataFrames::test_bot_triple_fragment_single_frame", ...
["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
17
46
850
0
0.6
1
0.75
1
0.198333
80.87
8,369
swe_smith::train::44997
swe_smith
train
44,997
mahmoud__glom.fb3c4e76.func_pm_remove_assign__fw38o7q2
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
T formatting broken with undefined variable error #### Description When using T objects in glom specs, the string representation is broken and raises a `NameError: name 'i' is not defined` error. This affects debugging and error messages that try to display T-based specs. #### Steps/Code to Reproduce ```python from...
diff --git a/glom/core.py b/glom/core.py index cee71a3..225119c 100644 --- a/glom/core.py +++ b/glom/core.py @@ -1723,14 +1723,12 @@ def _format_slice(x): def _format_t(path, root=T): prepr = [{T: 'T', S: 'S', A: 'A'}[root]] - i = 0 while i < len(path): - op, arg = path[i], path[i + 1] i...
["glom/test/test_basic.py::test_call_and_target", "glom/test/test_basic.py::test_invoke", "glom/test/test_basic.py::test_ref", "glom/test/test_check.py::test_check_basic", "glom/test/test_error.py::test_line_trace", "glom/test/test_error.py::test_branching_stack", "glom/test/test_error.py::test_midway_branch", "glom/te...
["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
9
30
1,010
0
0.6
1
0.75
1
0.198333
80.87
8,370
swe_smith::train::9800
swe_smith
train
9,800
keleshev__schema.24a30457.func_basic__a9owlt1d
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
SchemaError constructor breaks when passing string arguments #### Description When creating a SchemaError with string arguments for `autos` or `errors`, the constructor fails with a TypeError about concatenating lists with strings. #### Steps/Code to Reproduce ```python from schema import Schema, SchemaError # Thi...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..7c36837 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -62,9 +62,9 @@ class SchemaError(Exception): autos: Union[Sequence[Union[str, None]], None], errors: Union[List, str, None] = None, ): - self.autos = auto...
["test_schema.py::test_validate_file", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_or_only_one", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema.py::test_dict", "test_schema.py::test_dict_optional_keys", "...
["test_schema.py::test_schema", "test_schema.py::test_test", "test_schema.py::test_strictly", "test_schema.py::test_dict_keys", "test_schema.py::test_ignore_extra_keys", "test_schema.py::test_ignore_extra_keys_validation_and_return_keys", "test_schema.py::test_dict_forbidden_keys", "test_schema.py::test_dict_hook", "te...
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
6
24
1,069
0
0.6
1
0.75
1
0.198167
80.8695
8,371
swe_smith::train::26381
swe_smith
train
26,381
pylint-dev__astroid.b114f6b5.func_pm_remove_assign__sopvbi7h
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
BoundMethod type inference broken for type() calls #### Description When using `type()` to create classes dynamically, the inference fails with `NameError: name 'mcs' is not defined`. This affects various typing-related functionality and dynamic class creation patterns. #### Steps/Code to Reproduce ```python import...
diff --git a/astroid/bases.py b/astroid/bases.py index d91a4c9..142e13f 100644 --- a/astroid/bases.py +++ b/astroid/bases.py @@ -559,7 +559,7 @@ class BoundMethod(UnboundMethod): # Verify the metaclass try: - mcs = next(caller.args[0].infer(context=context)) + pass exc...
["tests/brain/test_attr.py::AttrsTest::test_attr_transform", "tests/brain/test_attr.py::AttrsTest::test_attr_with_only_annotation_fails", "tests/brain/test_brain.py::TypingBrain::test_callable_type", "tests/brain/test_brain.py::TypingBrain::test_namedtuple_few_args", "tests/brain/test_brain.py::TypingBrain::test_namedt...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
8
36
1,029
0
0.6
1
0.75
1
0.198167
80.8695
8,372
swe_smith::train::29891
swe_smith
train
29,891
getnikola__nikola.0f4c230e.func_pm_ctrl_shuffle__k105txdm
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
Shortcode rendering broken after recent changes #### Description Shortcodes are not rendering properly and causing build failures. When using templated shortcodes, the site build process fails with `UnboundLocalError` and shortcode content is not being processed correctly. #### Steps/Code to Reproduce Create a simp...
diff --git a/nikola/nikola.py b/nikola/nikola.py index 6f80377..fd89d60 100644 --- a/nikola/nikola.py +++ b/nikola/nikola.py @@ -1681,20 +1681,19 @@ class Nikola(object): """ def render_shortcode(*args, **kw): - context = self.GLOBAL_CONTEXT.copy() - context.update(kw) - ...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "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[overall]", "tests/integration/test_archive_full.py::test_full...
["tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_per_day.py::test_archive_exists", "tests/integration/test_archive_per_day.py::test_check_files", "tests/integration/test_archive_per_month.py::test_archive_exists", "tests/integration/test_archive_per_month.py::test_check_files...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
11
42
969
0
0.6
1
0.75
1
0.198167
80.8695
8,373
swe_smith::train::46611
swe_smith
train
46,611
python-trio__trio.cfbbe2c1.combine_file__emv02stl
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Instrument methods calling undefined attributes #### Description When using the Instrument class, some hook methods are trying to access undefined attributes, causing AttributeError when called. #### Steps/Code to Reproduce ```python import trio from trio._abc import Instrument class MyInstrument(Instrument): ...
diff --git a/src/trio/_abc.py b/src/trio/_abc.py index 306ee22..bc56587 100644 --- a/src/trio/_abc.py +++ b/src/trio/_abc.py @@ -91,7 +91,9 @@ class Instrument(ABC): # noqa: B024 # conceptually is ABC task (trio.lowlevel.Task): The new task. """ - return + if task.priority >= 5: ...
["src/trio/_tests/test_abc.py::test_instrument_implements_hook_methods"]
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
6
1
1,069
0
0.6
1
0.75
1
0.198167
80.8695
8,374
swe_smith::train::51704
swe_smith
train
51,704
pydicom__pydicom.7d361b3d.func_basic__1uk01k7w
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
DicomIO.is_implicit_VR returns incorrect value when _implicit_vr not set #### Description When accessing `is_implicit_VR` property on a DicomIO instance before the `_implicit_vr` attribute has been explicitly set, the property now returns `True` instead of raising an AttributeError. Additionally, when `_implicit_vr` ...
diff --git a/src/pydicom/filebase.py b/src/pydicom/filebase.py index 817bc09..f949ee7 100644 --- a/src/pydicom/filebase.py +++ b/src/pydicom/filebase.py @@ -138,11 +138,11 @@ class DicomIO: and ``False`` for explicit VR. """ if not hasattr(self, "_implicit_vr"): - raise AttributeEr...
["tests/test_dataelem.py::TestDataElement::test_empty_binary_values", "tests/test_dataelem.py::TestRawDataElement::test_read_known_private_tag_implicit", "tests/test_dataelem.py::TestRawDataElement::test_read_known_private_tag_explicit_no_lookup", "tests/test_dataset.py::TestDatasetSaveAs::test_priority_syntax", "tests...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
8
133
1,028
0
0.6
1
0.75
1
0.198
80.869
8,375
swe_smith::train::31880
swe_smith
train
31,880
davidhalter__parso.338a5760.func_basic__49bjy0dl
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Diff parser returns None instead of leaf node #### Description The `_get_next_leaf_if_indentation` function in the diff parser is returning `None` instead of the expected leaf node, causing AttributeError exceptions when trying to access attributes on the returned value. #### Steps/Code to Reproduce ```python impor...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..3f75758 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -59,9 +59,9 @@ def _get_previous_leaf_if_indentation(leaf): def _get_next_leaf_if_indentation(leaf): - while leaf and _is_indentation_error_leaf(leaf): - leaf = ...
["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
6
80
1,068
0
0.6
1
0.75
1
0.198
80.869
8,376
swe_smith::train::3418
swe_smith
train
3,418
pygments__pygments.27649ebb.combine_file__jptix049
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
SnowballLexer constructor fails with TypeError when passing keyword arguments #### Description The SnowballLexer class raises a TypeError when instantiated with keyword arguments. This affects basic lexer functionality and prevents the lexer from being used with standard options. #### Steps/Code to Reproduce ```pyt...
diff --git a/pygments/lexers/dsls.py b/pygments/lexers/dsls.py index 35dfda9..af932fe 100644 --- a/pygments/lexers/dsls.py +++ b/pygments/lexers/dsls.py @@ -875,7 +875,7 @@ class SnowballLexer(ExtendedRegexLexer): def __init__(self, **options): self._reset_stringescapes() - ExtendedRegexLexer.__i...
["tests/test_basic_api.py::test_lexer_options[SnowballLexer]", "tests/test_basic_api.py::test_lexer_classes[SnowballLexer]", "tests/examplefiles/snowball/example.sbl::"]
["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
10
3
988
0
0.6
1
0.75
1
0.198
80.869
8,377
swe_smith::train::46595
swe_smith
train
46,595
python-trio__trio.cfbbe2c1.combine_file__aack9bdl
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
current_default_thread_limiter returns None instead of CapacityLimiter #### Description The `current_default_thread_limiter()` function is returning `None` instead of a `CapacityLimiter` instance, causing AttributeError when trying to use thread limiting functionality. #### Steps/Code to Reproduce ```python import ...
diff --git a/src/trio/_threads.py b/src/trio/_threads.py index 7afd7b6..5dbc375 100644 --- a/src/trio/_threads.py +++ b/src/trio/_threads.py @@ -67,15 +67,15 @@ def _track_active_thread() -> Generator[None, None, None]: try: active_threads_local = _active_threads_local.get() except LookupError: - ...
["src/trio/_core/_tests/test_run.py::test_cancel_scope_repr", "src/trio/_tests/test_file_io.py::test_async_methods_wrap", "src/trio/_tests/test_file_io.py::test_open", "src/trio/_tests/test_file_io.py::test_open_context_manager", "src/trio/_tests/test_file_io.py::test_async_iter", "src/trio/_tests/test_file_io.py::test...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
12
98
947
0
0.6
1
0.75
1
0.197833
80.8685
8,378
swe_smith::train::7612
swe_smith
train
7,612
cantools__cantools.0c6a7871.func_basic__kbhs4z55
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
DBC parser fails with "invalid literal for int()" when parsing BO_TX_BU_ entries #### Description When loading DBC files that contain `BO_TX_BU_` (message sender) entries, the parser crashes with a `ValueError: invalid literal for int() with base 10: 'BO_TX_BU_'` error. This affects any DBC file that includes message...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..e261ad4 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -1291,9 +1291,9 @@ def _load_message_senders(tokens, attributes): message_senders = default...
["tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_convert.py::CanToolsConvertFullTest::test_sym_to_dbc__compare_databases", "tests/test_database.py::CanToolsDatabaseTest::test_foobar", "tests/test_database.py::CanToolsDatabaseTest::test_foobar_decode_masked_frame_id", "tests/test_d...
["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
6
12
1,067
0
0.6
1
0.75
1
0.197833
80.8685
8,379
swe_smith::train::27305
swe_smith
train
27,305
tkrajina__gpxpy.09fc46b3.func_pm_op_swap__l6qcngrd
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
reduce_points method fails with TypeError when max_points_no is None #### Description The `reduce_points` method in GPX class raises a TypeError when `max_points_no` parameter is `None` and only `min_distance` is provided. #### Steps/Code to Reproduce ```python import gpxpy # Load a GPX file with open('test_files/...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..48c2fe3 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -2035,19 +2035,19 @@ class GPX: if max_points_no is None and min_distance is None: raise ValueError("Either max_point_no or min_distance must be supplied") - if max_points_no is...
["test.py::GPXTests::test_reduce_by_min_distance", "test.py::GPXTests::test_reduce_gpx_file"]
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
9
2
1,007
0
0.6
1
0.75
1
0.197833
80.8685
8,380
swe_smith::train::26034
swe_smith
train
26,034
pylint-dev__astroid.b114f6b5.func_basic__v66sorqj
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Node repr() method fails with AttributeError for certain node types #### Description When calling `repr()` on certain AST node types, an `AttributeError` is raised instead of returning a proper string representation. This affects nodes like `Arguments`, `AsyncFunctionDef`, `FunctionDef`, and `MatchCase`. #### Steps/...
diff --git a/astroid/nodes/node_ng.py b/astroid/nodes/node_ng.py index c6a044f..338b967 100644 --- a/astroid/nodes/node_ng.py +++ b/astroid/nodes/node_ng.py @@ -215,15 +215,14 @@ class NodeNG: def __repr__(self) -> str: rname = self.repr_name() - # The dependencies used to calculate fromlineno (i...
["tests/test_nodes.py::test_str_repr_no_warnings[Arguments]", "tests/test_nodes.py::test_str_repr_no_warnings[AsyncFunctionDef]", "tests/test_nodes.py::test_str_repr_no_warnings[FunctionDef]", "tests/test_nodes.py::test_str_repr_no_warnings[MatchCase]"]
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
7
4
1,047
0
0.6
1
0.75
1
0.197833
80.8685
8,381
swe_smith::train::26594
swe_smith
train
26,594
pylint-dev__astroid.b114f6b5.lm_rewrite__kxxx3vrz
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
# RecursionError when copying Const objects ## Description I've encountered an issue when trying to copy a `Const` object using Python's `copy` module. The operation results in infinite recursion and eventually crashes with a `RecursionError`. ## Expected behavior Copying a `Const` object should create a new instan...
diff --git a/astroid/bases.py b/astroid/bases.py index d91a4c9..077bfc8 100644 --- a/astroid/bases.py +++ b/astroid/bases.py @@ -131,12 +131,10 @@ class Proxy: self._proxied = proxied def __getattr__(self, name: str) -> Any: - if name == "_proxied": - return self.__class__._proxied...
["tests/test_nodes.py::ConstNodeTest::test_copy"]
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
10
1
987
0
0.6
1
0.75
1
0.197833
80.8685
8,382
swe_smith::train::975
swe_smith
train
975
pytest-dev__iniconfig.16793ead.combine_file__8p3bls4q
swesmith/pytest-dev__iniconfig.16793ead
pytest-dev/iniconfig
python
null
SectionWrapper constructor arguments swapped causing AttributeError When accessing sections from IniConfig, the SectionWrapper constructor receives arguments in wrong order, causing various methods to fail with AttributeError. #### Steps/Code to Reproduce ```python from iniconfig import IniConfig config = IniConfig...
diff --git a/src/iniconfig/__init__.py b/src/iniconfig/__init__.py index 3c40bc9..9dba7ac 100644 --- a/src/iniconfig/__init__.py +++ b/src/iniconfig/__init__.py @@ -84,7 +84,7 @@ class SectionWrapper: default: _D | None = None, convert: Callable[[str], _T] | None = None, ) -> _D | _T | str | None...
["testing/test_iniconfig.py::test_iniconfig_lineof", "testing/test_iniconfig.py::test_iniconfig_get_convert", "testing/test_iniconfig.py::test_section_get", "testing/test_iniconfig.py::test_section_getitem", "testing/test_iniconfig.py::test_section_iter", "testing/test_iniconfig.py::test_iter_file_order"]
["testing/test_iniconfig.py::test_tokenize[comment]", "testing/test_iniconfig.py::test_tokenize[comment2]", "testing/test_iniconfig.py::test_tokenize[section]", "testing/test_iniconfig.py::test_tokenize[value]", "testing/test_iniconfig.py::test_parse_empty", "testing/test_iniconfig.py::test_ParseError", "testing/test_i...
jyangballin/swesmith.x86_64.pytest-dev_1776_iniconfig.16793ead
true
null
1
15
6
886
0
0.6
1
0.75
1
0.197667
80.868
8,383
swe_smith::train::54238
swe_smith
train
54,238
caarlos0__env.56a09d29.func_pm_remove_loop__hzrtby07
swesmith/caarlos0__env.56a09d29
caarlos0/env
go
null
Slice parsing causes nil pointer dereference when counter logic is removed #### Description When parsing environment variables into slices, the library crashes with a nil pointer dereference. This happens when trying to parse slice fields from environment variables. #### Steps/Code to Reproduce ```go package main ...
diff --git a/env.go b/env.go index c928b66..51f3d3f 100644 --- a/env.go +++ b/env.go @@ -451,17 +451,7 @@ func doParseSlice(ref reflect.Value, processField processFieldFn, opts Options) if len(environments) > 0 { counter := 0 - for finished := false; !finished; { - finished = true - prefix := fmt.Sprintf("%...
["TestIssue298"]
["TestIssue245", "TestParsesEnv", "TestParsesEnv_Map", "TestParsesEnvInvalidMap", "TestParseCustomMapType", "TestParseMapCustomKeyType", "TestParseMapCustomKeyNoParser", "TestParseMapCustomValueNoParser", "TestParseMapCustomKeyTypeError", "TestParseMapCustomValueTypeError", "TestSetenvAndTagOptsChain", "TestJSONTag", "...
jyangballin/swesmith.x86_64.caarlos0_1776_env.56a09d29
true
null
1
12
1
946
0
0.6
1
0.75
1
0.197667
80.868
8,384
swe_smith::train::21869
swe_smith
train
21,869
life4__textdistance.c3aca916.func_basic__8c8b0jd6
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
Union operation returns empty Counter for all inputs #### Description When using algorithms that rely on the `_union_counters` method, the union operation is returning an empty Counter instead of the actual union of the input counters. This affects distance calculations and causes division by zero errors. #### Steps...
diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py index 5ce8cc7..9ef3104 100644 --- a/textdistance/algorithms/base.py +++ b/textdistance/algorithms/base.py @@ -145,9 +145,9 @@ class Base: return intersection def _union_counters(self, *sequences: Counter[T]) -> Counter[T]: - ...
["tests/test_common.py::test_normalization_range[alg10]", "tests/test_common.py::test_normalization_by_one[alg10]", "tests/test_common.py::test_normalization_monotonic[alg10]", "tests/test_common.py::test_no_common_chars[alg10]", "tests/test_token/test_jaccard.py::test_distance[test-text-0.6]", "tests/test_token/test_j...
["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati...
jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916
true
null
1
6
9
1,066
0
0.6
1
0.75
1
0.197667
80.868
8,385
swe_smith::train::10157
swe_smith
train
10,157
paramiko__paramiko.23f92003.combine_file__oap7hk1t
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Ed25519Key.sign_ssh_data returns None instead of Message #### Description When using Ed25519 keys for SSH authentication, the signing process fails because `sign_ssh_data` method returns `None` instead of the expected `Message` object. #### Steps/Code to Reproduce ```python import paramiko from paramiko import Ed25...
diff --git a/paramiko/ed25519key.py b/paramiko/ed25519key.py index e5e81ac..4c15cfb 100644 --- a/paramiko/ed25519key.py +++ b/paramiko/ed25519key.py @@ -189,16 +189,16 @@ class Ed25519Key(PKey): return self.name def get_bits(self): - return 256 + return 255 def can_sign(self): ...
["tests/auth.py::AuthSource_::InMemoryPrivateKey_::repr_shows_pkey_repr", "tests/auth.py::AuthSource_::InMemoryPrivateKey_::repr_appends_agent_flag_when_AgentKey", "tests/test_client.py::SSHClientTest::test_certs_allowed_as_key_filename_values", "tests/test_client.py::SSHClientTest::test_certs_implicitly_loaded_alongsi...
["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
6
5
1,066
0
0.6
1
0.75
1
0.197667
80.868
8,386
swe_smith::train::48481
swe_smith
train
48,481
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_cond__pu2csimg
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
FluffConfig initialization fails with KeyError when overrides provided #### Description When creating a FluffConfig instance with overrides, the initialization fails with a KeyError. The config expects overrides to be wrapped in a "core" key but tries to access `overrides["core"]` before this wrapping occurs. #### S...
diff --git a/src/sqlfluff/core/config/fluffconfig.py b/src/sqlfluff/core/config/fluffconfig.py index d6e142d..5e88586 100644 --- a/src/sqlfluff/core/config/fluffconfig.py +++ b/src/sqlfluff/core/config/fluffconfig.py @@ -116,10 +116,6 @@ class FluffConfig: self._ignore_local_config = ( ignore_loca...
["test/core/config/fluffconfig_test.py::test__config__nested_config_tests", "test/core/config/fluffconfig_test.py::test__config__templater_selection[raw-RawTemplater-False]", "test/core/config/fluffconfig_test.py::test__config__templater_selection[jinja-JinjaTemplater-False]", "test/core/config/fluffconfig_test.py::tes...
["test/core/config/fluffconfig_test.py::test__config__from_strings", "test/core/config/fluffconfig_test.py::test__config__glob_exclude_config_tests", "test/core/config/fluffconfig_test.py::test__config__glob_include_config_tests", "test/core/config/fluffconfig_test.py::test__config__rules_set_to_none", "test/core/confi...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
8
9
1,026
0
0.6
1
0.75
1
0.197667
80.868
8,387
swe_smith::train::23867
swe_smith
train
23,867
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__mpja6ta0
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
TimeSeries factory error handling logic inverted for allow_errors parameter #### Description When creating a TimeSeries with invalid data and `allow_errors=True`, the factory raises an exception instead of issuing a warning and continuing. The error handling logic appears to be inverted - it raises exceptions when `a...
diff --git a/sunpy/timeseries/timeseries_factory.py b/sunpy/timeseries/timeseries_factory.py index e5f59d1..273216a 100644 --- a/sunpy/timeseries/timeseries_factory.py +++ b/sunpy/timeseries/timeseries_factory.py @@ -341,16 +341,15 @@ class TimeSeriesFactory(BasicRegistrationFactory): except (NoMatchError,...
["sunpy/timeseries/tests/test_timeseries_factory.py::test_invalid_manual_data", "sunpy/timeseries/tests/test_timeseries_factory.py::test_invalid_file", "sunpy/timeseries/tests/test_timeseries_factory.py::test_get_matching_widget"]
["sunpy/timeseries/metadata.py::sunpy.timeseries.metadata.TimeSeriesMetaData", "sunpy/timeseries/sources/eve.py::sunpy.timeseries.sources.eve.EVESpWxTimeSeries", "sunpy/timeseries/sources/fermi_gbm.py::sunpy.timeseries.sources.fermi_gbm.GBMSummaryTimeSeries", "sunpy/timeseries/sources/goes.py::sunpy.timeseries.sources....
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
7
3
1,046
0
0.6
1
0.75
1
0.197667
80.868
8,388
swe_smith::train::46547
swe_smith
train
46,547
python-trio__trio.cfbbe2c1.combine_file__0nx3uhgl
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
ThreadCache initialization fails with AttributeError #### Description The ThreadCache class fails to initialize properly, causing widespread test failures across the codebase. When attempting to create a ThreadCache instance, an AttributeError is raised because the `_idle_workers` attribute is being set to `None` ins...
diff --git a/src/trio/_core/_thread_cache.py b/src/trio/_core/_thread_cache.py index 189d5a5..0be2f04 100644 --- a/src/trio/_core/_thread_cache.py +++ b/src/trio/_core/_thread_cache.py @@ -18,8 +18,7 @@ RetT = TypeVar("RetT") def _to_os_thread_name(name: str) -> bytes: - # ctypes handles the trailing \00 - r...
["src/trio/_core/_tests/test_guest_mode.py::test_host_can_directly_wake_trio_task", "src/trio/_core/_tests/test_guest_mode.py::test_host_altering_deadlines_wakes_trio_up", "src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_sniffio_integration", "src/trio/_core/_tests/test_guest_mode.py::test_host_wakeup_doesnt_...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
12
141
946
0
0.6
1
0.75
1
0.197667
80.868
8,389
r2e_gym::train::5119
r2e_gym
train
5,119
pyramid__91f322214abe03b24cdecaea367f2df8713fd9e6
pyramid
pylons/pyramid
python
91f322214abe03b24cdecaea367f2df8713fd9e6
**Title:** Scaffold Command Sets Incorrect Documentation Branch for Development Versions **Description:** When using the scaffold command with a development version of Pyramid (e.g., `0.12dev` or `0.10.1dev`), the `pyramid_docs_branch` is incorrectly set to `'latest'` instead of the expected major version branch (e.g....
diff --git a/pyramid/scripts/pcreate.py b/pyramid/scripts/pcreate.py --- a/pyramid/scripts/pcreate.py +++ b/pyramid/scripts/pcreate.py @@ -89,18 +89,12 @@ pyramid_version = self.pyramid_dist.version # map pyramid package version of the documentation branch - # if version ends with 'dev' then ...
diff --git a/pyramid/tests/test_scripts/test_pcreate.py b/pyramid/tests/test_scripts/test_pcreate.py --- a/pyramid/tests/test_scripts/test_pcreate.py +++ b/pyramid/tests/test_scripts/test_pcreate.py @@ -176,25 +176,27 @@ cmd = self._makeOne('-s', 'dummy', 'Distro') scaffold = DummyScaffold('dummy') ...
null
null
namanjain12/pyramid_final:91f322214abe03b24cdecaea367f2df8713fd9e6
true
null
1
16
null
1,578
0
0.75
1
0.6375
1
0.316333
80.86775
8,390
swe_smith::train::39361
swe_smith
train
39,361
pallets__jinja.ada0a9a6.func_pm_class_rm_funcs__ves1hdpe
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
FileSystemLoader missing __init__ method #### Description The FileSystemLoader class is missing its `__init__` method, causing a TypeError when trying to instantiate it. #### Steps/Code to Reproduce ```python from jinja2 import Environment from jinja2.loaders import FileSystemLoader # This should work but raises T...
diff --git a/src/jinja2/loaders.py b/src/jinja2/loaders.py index 8ca32cb..20d0902 100644 --- a/src/jinja2/loaders.py +++ b/src/jinja2/loaders.py @@ -176,21 +176,6 @@ class FileSystemLoader(BaseLoader): Added the ``followlinks`` parameter. """ - def __init__( - self, - searchpath: t.Unio...
["tests/test_loader.py::TestFileSystemLoader::test_searchpath_as_str", "tests/test_loader.py::TestFileSystemLoader::test_searchpath_as_pathlib", "tests/test_loader.py::TestFileSystemLoader::test_searchpath_as_list_including_pathlib", "tests/test_loader.py::TestFileSystemLoader::test_caches_template_based_on_mtime", "te...
["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
16
7
865
0
0.6
1
0.75
1
0.1975
80.8675
8,391
swe_smith::train::21964
swe_smith
train
21,964
life4__textdistance.c3aca916.func_pm_class_rm_funcs__el77p64b
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
LCSStr algorithm raises NotImplementedError when called directly #### Description The LCSStr (Longest Common Substring) algorithm is missing its `__call__` method, causing it to raise a NotImplementedError when used directly. This breaks the expected interface for text distance algorithms. #### Steps/Code to Reprodu...
diff --git a/textdistance/algorithms/sequence_based.py b/textdistance/algorithms/sequence_based.py index b1fd7af..51687a4 100644 --- a/textdistance/algorithms/sequence_based.py +++ b/textdistance/algorithms/sequence_based.py @@ -124,24 +124,9 @@ class LCSStr(_BaseSimilarity): return joined ...
["tests/test_common.py::test_normalization_range[alg8]", "tests/test_common.py::test_normalization_range[alg9]", "tests/test_common.py::test_normalization_by_one[alg8]", "tests/test_common.py::test_normalization_by_one[alg9]", "tests/test_common.py::test_normalization_same[alg8]", "tests/test_common.py::test_normalizat...
["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati...
jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916
true
null
1
15
21
885
0
0.6
1
0.75
1
0.1975
80.8675
8,392
swe_smith::train::4917
swe_smith
train
4,917
bottlepy__bottle.a8dfef30.func_pm_ctrl_invert_if__9afg7vxs
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
path_shift function raises AssertionError for valid negative shift values #### Description The `path_shift` function incorrectly raises an AssertionError when attempting to shift with valid negative values that should be allowed. The function appears to have a logic error in its boundary checking condition. #### Ste...
diff --git a/bottle.py b/bottle.py index 286b5bc..cf14e4b 100755 --- a/bottle.py +++ b/bottle.py @@ -3132,18 +3132,17 @@ def path_shift(script_name, path_info, shift=1): scriptlist = scriptlist + moved pathlist = pathlist[shift:] elif 0 > shift >= -len(scriptlist): + empty = 'SCRIPT_NAME' ...
["test/test_environ.py::TestRequest::test_pathshift", "test/test_mount.py::TestAppMounting::test_mount_wsgi", "test/test_mount.py::TestAppMounting::test_mount_wsgi_ctype_bug", "test/test_mount.py::TestAppMounting::test_no_slash_prefix"]
["test/test_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
7
4
1,045
0
0.6
1
0.75
1
0.1975
80.8675
8,393
swe_smith::train::29884
swe_smith
train
29,884
getnikola__nikola.0f4c230e.func_pm_ctrl_shuffle__f1588fng
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
Markdown compilation fails with UnboundLocalError #### Description When compiling markdown content, the markdown compiler throws an `UnboundLocalError` for variables that are referenced before assignment. This affects basic markdown compilation functionality. #### Steps/Code to Reproduce ```python from nikola.plugi...
diff --git a/nikola/plugins/compile/markdown/__init__.py b/nikola/plugins/compile/markdown/__init__.py index d6f137e..71367fc 100644 --- a/nikola/plugins/compile/markdown/__init__.py +++ b/nikola/plugins/compile/markdown/__init__.py @@ -106,18 +106,17 @@ class CompileMarkdown(PageCompiler): self.supports_metad...
["tests/test_compile_markdown.py::test_compiling_markdown[empty]", "tests/test_compile_markdown.py::test_compiling_markdown[strikethrough]", "tests/test_compile_markdown.py::test_compiling_markdown[hilite]"]
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
7
3
1,045
0
0.6
1
0.75
1
0.1975
80.8675
8,394
swe_smith::train::9695
swe_smith
train
9,695
marshmallow-code__webargs.dbde72fe.func_basic__u1ka3rfi
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
Parser error handling broken when error_callback is None #### Description When a Parser instance has `error_callback` set to `None`, validation errors cause an AttributeError instead of being handled properly. The error handling logic incorrectly tries to call `None` as a function. #### Steps/Code to Reproduce ```p...
diff --git a/src/webargs/core.py b/src/webargs/core.py index 44294e9..b29a53e 100644 --- a/src/webargs/core.py +++ b/src/webargs/core.py @@ -257,13 +257,9 @@ class Parser(typing.Generic[Request]): error_status_code: int | None, error_headers: typing.Mapping[str, str] | None, ) -> typing.NoReturn:...
["tests/test_bottleparser.py::TestBottleParser::test_parse_json_error_unexpected_int", "tests/test_bottleparser.py::TestBottleParser::test_parse_json_error_unexpected_list", "tests/test_bottleparser.py::TestBottleParser::test_parse_json_many_schema_invalid_input", "tests/test_bottleparser.py::TestBottleParser::test_par...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
8
88
1,024
0
0.6
1
0.75
1
0.197333
80.867
8,395
swe_smith::train::43746
swe_smith
train
43,746
pydata__patsy.a5d16484.combine_file__1fwrobza
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Term equality comparison broken When comparing Term objects, the equality check is inverted. Terms that should be equal are returning False, and terms that should be different are returning True. #### Steps/Code to Reproduce ```python from patsy.desc import Term # These should be equal but return False term1 = Term...
diff --git a/patsy/desc.py b/patsy/desc.py index 210350d..1c5527a 100644 --- a/patsy/desc.py +++ b/patsy/desc.py @@ -43,7 +43,7 @@ class Term(object): self.factors = tuple(uniqueify_list(factors)) def __eq__(self, other): - return isinstance(other, Term) and frozenset(other.factors) == frozenset(...
["patsy/desc.py::test_Term", "patsy/desc.py::test_ModelDesc", "patsy/desc.py::test_ModelDesc_from_formula", "patsy/desc.py::test_eval_formula", "patsy/desc.py::test_eval_formula_error_reporting", "patsy/desc.py::test_formula_factor_origin", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_c...
["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
21
26
764
0
0.6
1
0.75
1
0.197333
80.867
8,396
swe_smith::train::48386
swe_smith
train
48,386
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__mndzrcfe
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
CLI lint command crashes with UnboundLocalError on exit_code #### Description The `sqlfluff lint` command is crashing with an `UnboundLocalError` when trying to access the `exit_code` variable. This appears to happen in various scenarios when running the lint command. #### Steps/Code to Reproduce ```bash sqlfluff l...
diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py index 14e3c3e..fad05d5 100644 --- a/src/sqlfluff/cli/commands.py +++ b/src/sqlfluff/cli/commands.py @@ -621,12 +621,10 @@ def lint( extra_config_path, ignore_local_config, require_dialect=False, **kwargs ) non_human_output = (fo...
["test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_lint_stdin[command0]", "test/cli/commands_test.py::test__cli__command_lint_stdin[command1]", "test/cli/commands_test.py::test__cli__command_lint_stdin[command2]", "test/cli/commands_test.py::test__cli__command_lint...
["test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_no_dialect[command0]", "test/cli/commands_test.py::test__cli__command_no_dialect[command1]", "test/cli/commands_test.py::test__cli__command_no_dialect[command2]", "test/cli/commands_test.py::test__cli__command_no_di...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
9
68
1,004
0
0.6
1
0.75
1
0.197333
80.867
8,397
swe_smith::train::4454
swe_smith
train
4,454
pygments__pygments.27649ebb.func_pm_remove_assign__xkp98n1z
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
HtmlFormatter table line numbers broken with undefined variables #### Description When using the HtmlFormatter with `linenos='table'`, the formatter crashes with `NameError` due to undefined variables in the `_wrap_tablelinenos` method. #### Steps/Code to Reproduce ```python from pygments import highlight from pygm...
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index 3330c1d..7222d07 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -653,7 +653,6 @@ class HtmlFormatter(Formatter): yield 0, DOC_FOOTER def _wrap_tablelinenos(self, inner): - dummyoutfile = St...
["tests/test_html_formatter.py::test_valid_output", "tests/test_html_formatter.py::test_all_options", "tests/test_cmdline.py::test_O_opt", "tests/test_html_formatter_linenos_elements.py::test_linenos_elements[testfilename-True-0-8-2-True-table]", "tests/test_html_formatter_linenos_elements.py::test_linenos_elements[-Fa...
["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
15
67
884
0
0.6
1
0.75
1
0.197333
80.867
8,398
swe_smith::train::41007
swe_smith
train
41,007
scanny__python-pptx.278b47b1.func_basic__edgdh8b6
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
RequiredAttribute getter returns None instead of raising InvalidXmlError when attribute is missing #### Description When a required XML attribute is missing from an element, the getter should raise an `InvalidXmlError` but instead returns `None`. #### Steps/Code to Reproduce ```python from pptx.oxml.xmlchemy import...
diff --git a/src/pptx/oxml/xmlchemy.py b/src/pptx/oxml/xmlchemy.py index 41fb2e1..7108fcd 100644 --- a/src/pptx/oxml/xmlchemy.py +++ b/src/pptx/oxml/xmlchemy.py @@ -243,11 +243,11 @@ class RequiredAttribute(BaseAttribute): def get_attr_value(obj: BaseOxmlElement) -> Any: attr_str_value = obj.get...
["tests/oxml/test_xmlchemy.py::DescribeRequiredAttribute::it_raises_on_get_when_attribute_not_present"]
["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
6
1
1,064
0
0.6
1
0.75
1
0.197333
80.867
8,399
swe_smith::train::24120
swe_smith
train
24,120
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__zyv3hjt3
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
get_keywords function returns undefined variable when called with single function #### Description The `get_keywords` function in `sunpy.util.util` raises an `UnboundLocalError` when called with a single function instead of a list of functions. #### Steps/Code to Reproduce ```python from sunpy.util import util def...
diff --git a/sunpy/util/util.py b/sunpy/util/util.py index d469453..bd1049e 100644 --- a/sunpy/util/util.py +++ b/sunpy/util/util.py @@ -224,6 +224,15 @@ def get_width(): def get_keywords(func): + sig = inspect.signature(func) + return keywords + keywords = {param.name for param in sig.parameters.values()...
["sunpy/util/tests/test_util.py::test_get_keywords"]
["sunpy/util/tests/test_util.py::test_unique", "sunpy/util/tests/test_util.py::test_unique_key", "sunpy/util/tests/test_util.py::test_replacement_filename", "sunpy/util/tests/test_util.py::test_replacement_filename_path_not_exists", "sunpy/util/tests/test_util.py::test_expand_list", "sunpy/util/tests/test_util.py::test...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
19
1
804
0
0.6
1
0.75
1
0.197333
80.867