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,100
swe_smith::train::22956
swe_smith
train
22,956
graphql-python__graphene.82903263.func_pm_ctrl_shuffle__t7uaebtw
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
# Int scalar coercion fails with UnboundLocalError #### Minimal example ```python from graphene import Int # This fails Int.coerce_int(42) ``` #### Problem description When trying to coerce a value to an Int scalar, the code raises an UnboundLocalError. This happens because the variable `num` is referenced before i...
diff --git a/graphene/types/scalars.py b/graphene/types/scalars.py index 8546bc8..a8b09dd 100644 --- a/graphene/types/scalars.py +++ b/graphene/types/scalars.py @@ -62,6 +62,9 @@ class Int(Scalar): @staticmethod def coerce_int(value): + if MIN_INT <= num <= MAX_INT: + return num + r...
["graphene/types/tests/test_scalar.py::test_ints", "graphene/types/tests/test_scalars_serialization.py::test_serializes_output_int"]
["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i...
jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263
true
null
1
7
2
1,093
0
0.6
1
0.75
1
0.2055
80.8915
8,101
swe_smith::train::8072
swe_smith
train
8,072
cantools__cantools.0c6a7871.func_pm_remove_assign__l7hwxzk2
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
NameError in plot subcommand after recent changes #### Description The plot subcommand is broken and throws `NameError: name 'dbase' is not defined` when trying to use it. This appears to affect all plotting functionality. #### Steps/Code to Reproduce ```bash cantools plot database.dbc signal_pattern ``` Or any ot...
diff --git a/src/cantools/subparsers/plot.py b/src/cantools/subparsers/plot.py index c3d5890..52d5676 100644 --- a/src/cantools/subparsers/plot.py +++ b/src/cantools/subparsers/plot.py @@ -323,23 +323,14 @@ def _do_decode(args): if args.show_errors: args.show_invalid_syntax = True - args.show_unk...
["tests/test_plot.py::CanToolsPlotTest::test_autocolor", "tests/test_plot.py::CanToolsPlotTest::test_break_time", "tests/test_plot.py::CanToolsPlotTest::test_break_time_none", "tests/test_plot.py::CanToolsPlotTest::test_case_sensitive", "tests/test_plot.py::CanToolsPlotTest::test_choices_stem", "tests/test_plot.py::Can...
["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
14
48
953
0
0.6
1
0.75
1
0.2055
80.8915
8,102
swe_smith::train::51227
swe_smith
train
51,227
marshmallow-code__apispec.8b421526.func_pm_class_rm_funcs__9z4l7um1
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
# Missing tag method in APISpec class I was trying to add tags to my API specification but encountered an error. It seems the `tag` method is missing from the `APISpec` class. ## Description When trying to add tags to my API specification using the `tag` method, I get an AttributeError. The method seems to be comple...
diff --git a/src/apispec/core.py b/src/apispec/core.py index e9ccb40..e9df78e 100644 --- a/src/apispec/core.py +++ b/src/apispec/core.py @@ -481,14 +481,6 @@ class APISpec: return dict_to_yaml(self.to_dict(), yaml_dump_kwargs) - def tag(self, tag: dict) -> APISpec: - """Store information about a ...
["tests/test_core.py::TestTags::test_tag[2.0]", "tests/test_core.py::TestTags::test_tag[3.0.0]", "tests/test_core.py::TestTags::test_tag_is_chainable[2.0]", "tests/test_core.py::TestTags::test_tag_is_chainable[3.0.0]"]
["tests/test_core.py::TestAPISpecInit::test_raises_wrong_apispec_version", "tests/test_core.py::TestMetadata::test_openapi_metadata[2.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata[3.0.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestComponents::tes...
jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526
true
null
1
10
4
1,032
0
0.6
1
0.75
1
0.205333
80.891
8,103
swe_smith::train::38310
swe_smith
train
38,310
burnash__gspread.a8be3b96.func_pm_ctrl_shuffle__scbl0uku
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
worksheet() method fails with UnboundLocalError when accessing sheet metadata #### Description When calling the `worksheet()` method on a Spreadsheet object, an `UnboundLocalError` is raised because the `sheet_data` variable is referenced before it's defined. #### Steps/Code to Reproduce ```python import gspread #...
diff --git a/gspread/spreadsheet.py b/gspread/spreadsheet.py index 2363472..3364481 100644 --- a/gspread/spreadsheet.py +++ b/gspread/spreadsheet.py @@ -305,6 +305,15 @@ class Spreadsheet: return worksheets def worksheet(self, title: str) -> Worksheet: + try: + item = finditem( + ...
["tests/spreadsheet_test.py::SpreadsheetTest::test_worksheet"]
["tests/cell_test.py::CellTest::test_a1_value", "tests/cell_test.py::CellTest::test_define_named_range", "tests/cell_test.py::CellTest::test_delete_named_range", "tests/cell_test.py::CellTest::test_equality", "tests/cell_test.py::CellTest::test_merge_cells", "tests/cell_test.py::CellTest::test_numeric_value", "tests/ce...
jyangballin/swesmith.x86_64.burnash_1776_gspread.a8be3b96
true
null
1
19
1
852
0
0.6
1
0.75
1
0.205333
80.891
8,104
swe_smith::train::10346
swe_smith
train
10,346
paramiko__paramiko.23f92003.func_basic__7g97jfti
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP remove() method fails with TypeError when path doesn't end with '/' #### Description The SFTP client's `remove()` method is throwing a `TypeError: endswith first arg must be bytes or a tuple of bytes, not str` when trying to delete files. This appears to be related to how the method checks if a path is a directo...
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 066cd83..0cb3ffe 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -394,8 +394,11 @@ class SFTPClient(BaseSFTP, ClosingContextManager): :raises: ``IOError`` -- if the path refers to a folder (directory) """ ...
["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_folder", "tests/test_sftp.py::TestSFTP::test_listdir", "tests/test_sftp....
["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
7
34
1,092
0
0.6
1
0.75
1
0.205333
80.891
8,105
swe_smith::train::23828
swe_smith
train
23,828
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__5aq65xjs
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
TimeFrameAttributeSunPy fails to parse string time inputs #### Description When passing string time inputs to coordinate frames, the TimeFrameAttributeSunPy attribute fails to parse common time string formats and the special 'now' keyword. #### Steps/Code to Reproduce ```python from sunpy.coordinates import Heliopr...
diff --git a/sunpy/coordinates/frameattributes.py b/sunpy/coordinates/frameattributes.py index 06871fc..f621a29 100644 --- a/sunpy/coordinates/frameattributes.py +++ b/sunpy/coordinates/frameattributes.py @@ -58,24 +58,23 @@ class TimeFrameAttributeSunPy(TimeAttribute): converted = False elif is...
["sunpy/coordinates/tests/test_frameattributes.py::test_now", "sunpy/coordinates/tests/test_frameattributes.py::test_convert[2012/01/01T00:00:00]", "sunpy/coordinates/tests/test_frameattributes.py::test_convert[20120101000000]", "sunpy/coordinates/tests/test_frameattributes.py::test_on_frame[2012/01/01T00:00:00]", "sun...
["sunpy/coordinates/tests/test_frameattributes.py::test_none", "sunpy/coordinates/tests/test_frameattributes.py::test_convert[input0]", "sunpy/coordinates/tests/test_frameattributes.py::test_on_frame[input0]", "sunpy/coordinates/tests/test_frameattributes.py::test_non_string", "sunpy/coordinates/tests/test_frameattribu...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
11
5
1,012
0
0.6
1
0.75
1
0.205333
80.891
8,106
swe_smith::train::4409
swe_smith
train
4,409
pygments__pygments.27649ebb.func_pm_remove_assign__4d9inaf8
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
JsonLexer throws UnboundLocalError when processing input #### Description The JsonLexer is throwing an `UnboundLocalError: local variable 'start' referenced before assignment` when trying to tokenize JSON content. This affects all JSON-related lexers including JsonLexer, JsonLdLexer, and JsonBareObjectLexer. #### St...
diff --git a/pygments/lexers/data.py b/pygments/lexers/data.py index 8f384bc..ae5e55e 100644 --- a/pygments/lexers/data.py +++ b/pygments/lexers/data.py @@ -474,16 +474,12 @@ class JsonLexer(Lexer): in_unicode_escape = 0 in_whitespace = False in_constant = False - in_number = False ...
["tests/test_basic_api.py::test_random_input[JsonLexer]", "tests/test_basic_api.py::test_lexer_options[JsonBareObjectLexer]", "tests/test_basic_api.py::test_random_input[JsonLdLexer]", "tests/test_basic_api.py::test_lexer_options[JsonLexer]", "tests/test_basic_api.py::test_random_input[JsonBareObjectLexer]", "tests/tes...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
13
26
972
0
0.6
1
0.75
1
0.205333
80.891
8,107
swe_smith::train::27613
swe_smith
train
27,613
arrow-py__arrow.1d70d009.func_basic__onlfkkic
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
Arrow object attributes broken after recent changes #### Description Arrow objects are throwing `AttributeError` when trying to access basic datetime attributes like `year`, `month`, etc. This seems to affect most Arrow functionality that relies on these fundamental attributes. #### Steps/Code to Reproduce ```pytho...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..cab7041 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -801,18 +801,18 @@ class Arrow: def __getattr__(self, name: str) -> Any: if name == "week": - return self.isocalendar()[1] + return self.isocalendar()[0] ...
["tests/test_arrow.py::TestArrowAttribute::test_getattr_week", "tests/test_arrow.py::TestArrowAttribute::test_getattr_quarter", "tests/test_arrow.py::TestArrowAttribute::test_getattr_dt_value", "tests/test_arrow.py::TestArrowFalsePositiveDst::test_dst", "tests/test_arrow.py::TestArrowPickling::test_pickle_and_unpickle"...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
10
60
1,032
0
0.6
1
0.75
1
0.205333
80.891
8,108
swe_smith::train::10562
swe_smith
train
10,562
paramiko__paramiko.23f92003.func_basic__oulhkcqm
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP get method opens remote file in write mode instead of read mode #### Description When using the SFTP client's `get` method to download files from a remote server, the method incorrectly opens the remote file in write mode ("wb") instead of read mode ("rb"). This causes the download to fail with an "OSError: File...
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 066cd83..6a2ec9c 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -793,11 +793,11 @@ class SFTPClient(BaseSFTP, ClosingContextManager): Added ``max_concurrent_prefetch_requests``. """ file_size = sel...
["tests/test_sftp.py::TestSFTP::test_get_put", "tests/test_sftp.py::TestSFTP::test_get_without_prefetch"]
["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
2
1,072
0
0.6
1
0.75
1
0.205333
80.891
8,109
swe_smith::train::18951
swe_smith
train
18,951
seperman__deepdiff.ed252022.func_basic__xumo9ynk
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
json_dumps silently ignores sort_keys parameter when using orjson #### Description When using orjson as the JSON backend, the `sort_keys` parameter is now silently ignored instead of raising a helpful error message. This breaks the expected behavior where users should be informed that orjson doesn't support `sort_key...
diff --git a/deepdiff/serialization.py b/deepdiff/serialization.py index aa56399..785ddbc 100644 --- a/deepdiff/serialization.py +++ b/deepdiff/serialization.py @@ -656,10 +656,7 @@ def json_dumps(item, default_mapping=None, force_use_builtin_json: bool=False, * if indent: kwargs['option'] = orjso...
["tests/test_serialization.py::TestSerialization::test_serialization_text_force_builtin_json"]
["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
8
1
1,072
0
0.6
1
0.75
1
0.205333
80.891
8,110
swe_smith::train::4034
swe_smith
train
4,034
pygments__pygments.27649ebb.func_basic__q37af3wi
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Robot Framework lexer fails with TypeError when tokenizing keywords #### Description The Robot Framework lexer in Pygments is throwing a TypeError when processing Robot Framework files. This appears to be related to incorrect parameter passing in the keyword tokenization logic. #### Steps/Code to Reproduce ```pytho...
diff --git a/pygments/lexers/robotframework.py b/pygments/lexers/robotframework.py index 5449441..dbb499e 100644 --- a/pygments/lexers/robotframework.py +++ b/pygments/lexers/robotframework.py @@ -275,13 +275,13 @@ class KeywordCall(Tokenizer): self._assigns = 0 def _tokenize(self, value, index): - ...
["tests/examplefiles/robotframework/robotframework_test.robot::"]
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
14
1
952
0
0.6
1
0.75
1
0.205333
80.891
8,111
swe_smith::train::7687
swe_smith
train
7,687
cantools__cantools.0c6a7871.func_basic__p0lpb69d
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Signal name corruption when processing DBC files with long names #### Description When processing DBC files that contain signals with long names, the signal names get corrupted and reversed. Additionally, the code incorrectly handles the `signal.dbc` attribute assignment, causing `NoneType` errors when trying to acce...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..583384d 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -1881,16 +1881,16 @@ def make_signal_names_unique(database, shorten_long_names): na...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals2", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_sort_signals_b...
["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
36
1,112
0
0.6
1
0.75
1
0.205333
80.891
8,112
swe_smith::train::44325
swe_smith
train
44,325
pydata__patsy.a5d16484.func_pm_ctrl_shuffle__7moi2k4n
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
`_get_level` function fails with UnboundLocalError when pytest import is moved #### Description The `_get_level` function in `patsy/contrasts.py` raises an `UnboundLocalError` when trying to access the `pytest` variable. This happens because the import statement was moved after some of the assertions that use `pytest...
diff --git a/patsy/contrasts.py b/patsy/contrasts.py index 0ac9ac7..d8feb2e 100644 --- a/patsy/contrasts.py +++ b/patsy/contrasts.py @@ -129,16 +129,15 @@ def _get_level(levels, level_ref): def test__get_level(): assert _get_level(["a", "b", "c"], 0) == 0 - assert _get_level(["a", "b", "c"], -1) == 2 - as...
["patsy/contrasts.py::test__get_level"]
["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
11
1
1,012
0
0.6
1
0.75
1
0.205333
80.891
8,113
swe_smith::train::4375
swe_smith
train
4,375
pygments__pygments.27649ebb.func_pm_op_change__00uw5ey2
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
HtmlFormatter line number generation broken with TypeError #### Description The HTML formatter is throwing TypeError exceptions when generating line numbers. This affects all line numbering functionality including inline and table line numbers. #### Steps/Code to Reproduce ```python from pygments import highlight f...
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index 3330c1d..e1bb265 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -732,13 +732,13 @@ class HtmlFormatter(Formatter): nocls = self.noclasses for _, inner_line in inner_lines: - print_l...
["tests/test_html_formatter.py::test_all_options", "tests/test_html_formatter.py::test_linespans", "tests/test_html_formatter_linenos_elements.py::test_linenos_elements[testfilename-False-3-8-1-False-inline]", "tests/test_html_formatter_linenos_elements.py::test_linenos_elements[-True-0-8-1-True-inline]", "tests/test_h...
["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
9
66
1,052
0
0.6
1
0.75
1
0.205333
80.891
8,114
swe_smith::train::23865
swe_smith
train
23,865
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__kykiecul
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Scraper initialization fails with AttributeError when pattern doesn't contain milliseconds #### Description When creating a Scraper instance with a pattern that doesn't contain the `%e` millisecond placeholder, the initialization fails with `AttributeError: 'NoneType' object has no attribute 'start'`. #### Steps/Cod...
diff --git a/sunpy/net/scraper.py b/sunpy/net/scraper.py index 202638e..c08a1dc 100644 --- a/sunpy/net/scraper.py +++ b/sunpy/net/scraper.py @@ -126,11 +126,11 @@ class Scraper: self.domain = f"{urlsplit(self.pattern).scheme}://{urlsplit(self.pattern).netloc}/" milliseconds = re.search(r'\%e',...
["sunpy/net/tests/test_scraper.py::test_directory_date_pattern", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_new_format", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_false", "sunpy/net/tests/test_scraper.py::test_directory_date_patternFalse_new_format", "sunpy/net/tests/test_scraper....
["sunpy/net/tests/test_scraper.py::test_url_pattern_new_format[fd_{{year:4d}}{{month:2d}}{{day:2d}}_{{hour:2d}}{{minute:2d}}{{second:2d}}_{{millisecond:3d}}.fts-fd_20130410_231211_119.fts-metadict1]", "sunpy/net/tests/test_scraper.py::test_url_pattern_milliseconds_generic", "sunpy/net/tests/test_scraper.py::test_regex[...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
9
37
1,052
0
0.6
1
0.75
1
0.205333
80.891
8,115
swe_smith::train::33072
swe_smith
train
33,072
django-money__django-money.835c1ab8.combine_file__wpqzkx48
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
QuerySet operations broken after recent changes #### Description After some recent changes, basic QuerySet operations like `create()`, `filter()`, and `get()` are failing with `AttributeError: 'tuple' object has no attribute 'model'` errors. This affects all model operations that use the money field functionality. #...
diff --git a/djmoney/models/managers.py b/djmoney/models/managers.py index d76f0c5..4115d5f 100644 --- a/djmoney/models/managers.py +++ b/djmoney/models/managers.py @@ -12,12 +12,11 @@ from .fields import CurrencyField, MoneyField def _get_clean_name(model, name): - # Get rid of __lt, __gt etc for the currency ...
["tests/test_form.py::test_save", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs0-expected0]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs1-expected1]", "tests/test_models.py::TestVanillaMoneyField::test_creat...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
1
9
152
1,051
0
0.6
1
0.75
1
0.205167
80.8905
8,116
swe_smith::train::25718
swe_smith
train
25,718
pylint-dev__astroid.b114f6b5.func_basic__ir1bxsbk
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Dict node initialization causes AttributeError when accessing items #### Description When creating Dict nodes, accessing the `items` attribute raises an AttributeError because it's initialized to `None` instead of an empty list. #### Steps/Code to Reproduce ```python import astroid # Create a simple dictionary nod...
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index fde3239..000a225 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -2342,14 +2342,14 @@ class Dict(NodeNG, Instance): end_lineno: int | None, end_col_offset: int | None, ) -> None: - ...
["tests/brain/test_dataclasses.py::test_inference_method[dataclasses]", "tests/brain/test_dataclasses.py::test_inference_method[pydantic.dataclasses]", "tests/brain/test_dataclasses.py::test_inference_method[marshmallow_dataclass]", "tests/test_inference.py::InferenceTest::test_conversion_of_dict_methods", "tests/test_...
["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
11
1,031
0
0.6
1
0.75
1
0.205167
80.8905
8,117
swe_smith::train::29857
swe_smith
train
29,857
getnikola__nikola.0f4c230e.func_pm_ctrl_shuffle__0fga49oc
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
NameError when reading metadata from .meta files #### Description When trying to read metadata from .meta files, Nikola crashes with a `NameError: name 'meta_path' is not defined` error. This happens because the code tries to use the `meta_path` variable before it's defined. #### Steps/Code to Reproduce Create a si...
diff --git a/nikola/post.py b/nikola/post.py index d7c1b9e..aa53393 100644 --- a/nikola/post.py +++ b/nikola/post.py @@ -1155,12 +1155,6 @@ def get_metadata_from_file(source_path, post, config, lang, metadata_extractors_ def get_metadata_from_meta_file(path, post, config, lang, metadata_extractors_by=None): - "...
["tests/test_metadata_extractors.py::test_builtin_extractors_rest[nikola-Nikola-1-onefile-twofile]", "tests/test_metadata_extractors.py::test_builtin_extractors_rest[nikola-Nikola-2-twofile-onefile]", "tests/test_metadata_extractors.py::test_builtin_extractors_rest[toml-TOML-1-onefile-twofile]", "tests/test_metadata_ex...
["tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org]", "tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org:1234/blog]", "tests/integration/test_dev_server_auto.py::test_serves_root_dir[https://example.org:3456/blog/]", "tests/integration/test_dev_server...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
13
16
971
0
0.6
1
0.75
1
0.205167
80.8905
8,118
swe_smith::train::29566
swe_smith
train
29,566
django__channels.a144b4b8.func_basic__4a41h2al
swesmith/django__channels.a144b4b8
django/channels
python
null
Handler name generation broken for message types with underscores #### Description The `get_handler_name` function in `channels/consumer.py` is incorrectly processing message types that contain underscores. Instead of replacing dots with underscores (as expected), it's now replacing underscores with dots, which break...
diff --git a/channels/consumer.py b/channels/consumer.py index fc06543..f61cc33 100644 --- a/channels/consumer.py +++ b/channels/consumer.py @@ -14,14 +14,13 @@ def get_handler_name(message): Looks at a message, checks it has a sensible type, and returns the handler name for that type. """ - # Check 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
1,011
0
0.6
1
0.75
1
0.205167
80.8905
8,119
swe_smith::train::52412
swe_smith
train
52,412
pydicom__pydicom.7d361b3d.func_pm_ctrl_shuffle__8fjdroda
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
private_creators method returns UnboundLocalError when called #### Description The `private_creators` method in the Dataset class is raising an `UnboundLocalError` when trying to access private creator names from a DICOM dataset. #### Steps/Code to Reproduce ```python from pydicom import Dataset ds = Dataset() ds....
diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py index e7abffd..3fb37d1 100644 --- a/src/pydicom/dataset.py +++ b/src/pydicom/dataset.py @@ -1160,6 +1160,11 @@ class Dataset: return new_block(first_free_el) def private_creators(self, group: int) -> list[str]: + return [x.value for x i...
["tests/test_dataset.py::TestDataset::test_private_creator_from_raw_ds", "tests/test_dataset.py::TestDataset::test_private_creators", "tests/test_dataset.py::TestDataset::test_non_contiguous_private_creators"]
["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
11
3
1,011
0
0.6
1
0.75
1
0.205167
80.8905
8,120
swe_smith::train::4047
swe_smith
train
4,047
pygments__pygments.27649ebb.func_basic__qve3ugfr
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
RobotFramework lexer tokenization broken with continuation lines #### Description The RobotFramework lexer is failing to tokenize content properly when processing continuation lines (lines with `...`). The lexer appears to be yielding incorrect token types and values, causing AttributeError exceptions during tokeniza...
diff --git a/pygments/lexers/robotframework.py b/pygments/lexers/robotframework.py index 5449441..136176f 100644 --- a/pygments/lexers/robotframework.py +++ b/pygments/lexers/robotframework.py @@ -321,12 +321,12 @@ class _Table: self._prev_values_on_row = [] def tokenize(self, value, index): - if...
["tests/test_basic_api.py::test_lexer_options[RobotFrameworkLexer]", "tests/test_basic_api.py::test_random_input[RobotFrameworkLexer]", "tests/snippets/robotframework/test_basic.txt::", "tests/examplefiles/robotframework/robotframework_test.robot::"]
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
8
4
1,071
0
0.6
1
0.75
1
0.205167
80.8905
8,121
swe_smith::train::24075
swe_smith
train
24,075
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__s0h6rtco
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Map contour methods fail with AttributeError when levels argument is scalar #### Description When calling `find_contours()` or `contour()` methods on a Map with a scalar level value, the methods fail with `AttributeError: 'float' object has no attribute 'size'`. #### Steps/Code to Reproduce ```python import sunpy i...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..8bb1f56 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -2521,10 +2521,6 @@ class GenericMap(NDData): return quad def _process_levels_arg(self, levels): - """ - Accept a percentage or dimensionless or m...
["sunpy/map/tests/test_mapbase.py::test_contour_deprecation_warning", "sunpy/map/tests/test_mapbase.py::test_find_contours_contourpy", "sunpy/map/tests/test_mapbase.py::test_find_contours_skimage", "sunpy/map/tests/test_mapbase.py::test_find_contours_invalid_library"]
["sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase.py::test_f...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
9
4
1,051
0
0.6
1
0.75
1
0.205167
80.8905
8,122
swe_smith::train::19054
swe_smith
train
19,054
seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__1z3vp3uu
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
add_root_to_paths function returns None instead of processed paths Description When using include_paths or exclude_paths with DeepDiff, the function `add_root_to_paths` in helper.py returns None instead of the processed path set, causing UnboundLocalError when trying to use path filtering functionality. Steps/Code t...
diff --git a/deepdiff/helper.py b/deepdiff/helper.py index ff6d668..9e8e756 100644 --- a/deepdiff/helper.py +++ b/deepdiff/helper.py @@ -318,15 +318,9 @@ def convert_item_or_items_into_set_else_none(items): def add_root_to_paths(paths): - """ - Sometimes the users want to just pass - [key] instead of root...
["tests/test_diff_include_paths.py::TestDeepDiffIncludePaths::test_include_paths_root_neg", "tests/test_diff_include_paths.py::TestDeepDiffIncludePaths::test_include_paths_root_pos", "tests/test_diff_include_paths.py::TestDeepDiffIncludePaths::test_include_paths_nest00_neg", "tests/test_diff_include_paths.py::TestDeepD...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
17
36
890
0
0.6
1
0.75
1
0.205
80.89
8,123
swe_smith::train::52482
swe_smith
train
52,482
pydicom__pydicom.7d361b3d.func_pm_remove_assign__a5cw9tlg
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
FileSet write() method fails with UnboundLocalError when copy_safe=True #### Description When calling the `write()` method on a `FileSet` instance with `copy_safe=True` (or when the internal dataset is None), the method fails with an `UnboundLocalError` because several variables are not properly initialized. #### St...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..6d19905 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -2168,10 +2168,7 @@ class FileSet: """ ds = self._ds if copy_safe or not ds: - ds = self._create_dicomdir() - - # By defaul...
["tests/test_fileset.py::TestRecordNode::test_encoding", "tests/test_fileset.py::TestRecordNode::test_file_id_singleton", "tests/test_fileset.py::TestFileInstance::test_path", "tests/test_fileset.py::TestFileInstance::test_load", "tests/test_fileset.py::TestFileInstance::test_for_moving", "tests/test_fileset.py::TestFi...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
15
60
930
0
0.6
1
0.75
1
0.205
80.89
8,124
swe_smith::train::45238
swe_smith
train
45,238
dask__dask.5f61e423.combine_module__kqszj26z
swesmith/dask__dask.5f61e423
dask/dask
python
null
from_delayed divisions validation broken #### Description When using `from_delayed` with explicit divisions, the validation logic is incorrect and raises a ValueError even when the divisions are properly formatted. #### Steps/Code to Reproduce ```python import pandas as pd import dask.dataframe as dd from dask.dela...
diff --git a/dask/dataframe/dask_expr/io/_delayed.py b/dask/dataframe/dask_expr/io/_delayed.py index 879191b..5bcc749 100644 --- a/dask/dataframe/dask_expr/io/_delayed.py +++ b/dask/dataframe/dask_expr/io/_delayed.py @@ -133,7 +133,7 @@ def from_delayed( ) elif divisions is not None: divs = list(...
["dask/dataframe/dask_expr/io/tests/test_delayed.py::test_from_delayed[None]", "dask/dataframe/dask_expr/io/tests/test_delayed.py::test_from_delayed[foo]", "dask/dataframe/dask_expr/io/tests/test_delayed.py::test_from_delayed_dask", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>0]", "das...
["dask/dataframe/dask_expr/io/tests/test_delayed.py::test_from_delayed_optimizing", "dask/dataframe/dask_expr/io/tests/test_delayed.py::test_from_delayed_fusion", "dask/dataframe/dask_expr/io/tests/test_io.py::test_io_fusion[csv]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_csv_integer_usecols", "dask/datafram...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
2
13
18
970
0
0.6
1
0.75
1
0.205
80.89
8,125
swe_smith::train::18019
swe_smith
train
18,019
pyasn1__pyasn1.0f07d724.func_pm_remove_wrapper__vr21ztrx
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
Character encoded REAL decoding broken #### Description When decoding character-encoded REAL values, the decoder fails with an UnboundLocalError. The issue occurs when trying to decode REAL values that use character encoding format. #### Steps/Code to Reproduce ```python from pyasn1.codec.ber import decoder from py...
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index 7e69ca1..50d1459 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -586,26 +586,6 @@ class RealPayloadDecoder(AbstractSimplePayloadDecoder): if LOG: LOG('decoding character encoded REAL...
["tests/codec/ber/test_decoder.py::RealDecoderTestCase::testChar"]
["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
21
1
810
0
0.6
1
0.75
1
0.205
80.89
8,126
swe_smith::train::39101
swe_smith
train
39,101
pallets__jinja.ada0a9a6.func_basic__ki1h1t9m
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Macro argument parsing broken - arguments and defaults swapped #### Description When defining macros with default arguments, the parser incorrectly swaps the arguments and defaults lists, causing macro calls to fail with AttributeError. #### Steps/Code to Reproduce ```python from jinja2 import Environment env = En...
diff --git a/src/jinja2/parser.py b/src/jinja2/parser.py index 817abec..22cbe1c 100644 --- a/src/jinja2/parser.py +++ b/src/jinja2/parser.py @@ -404,19 +404,19 @@ class Parser: return node def parse_signature(self, node: _MacroCall) -> None: - args = node.args = [] defaults = node.defaul...
["tests/test_core_tags.py::TestMacros::test_arguments", "tests/test_core_tags.py::TestMacros::test_macro_api", "tests/test_core_tags.py::TestMacros::test_macro_defaults_self_ref", "tests/test_regression.py::TestBug::test_callable_defaults", "tests/test_regression.py::TestBug::test_caller_scoping", "tests/test_regressio...
["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
12
7
990
0
0.6
1
0.75
1
0.205
80.89
8,127
swe_smith::train::7743
swe_smith
train
7,743
cantools__cantools.0c6a7871.func_basic__t7yoro5y
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML namespace validation logic inverted causing valid namespaces to be rejected #### Description When loading ARXML files, valid AUTOSAR namespaces are being rejected with "Unrecognized XML namespace" errors. This affects both AUTOSAR 3.x and 4.x namespace formats that should be supported. #### Steps/Code to Repro...
diff --git a/src/cantools/database/can/formats/arxml/__init__.py b/src/cantools/database/can/formats/arxml/__init__.py index 6171755..ed2e7bd 100644 --- a/src/cantools/database/can/formats/arxml/__init__.py +++ b/src/cantools/database/can/formats/arxml/__init__.py @@ -52,17 +52,16 @@ def load_string(string:str, ...
["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_database.py::CanToolsDataba...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
9
23
1,050
0
0.6
1
0.75
1
0.205
80.89
8,128
swe_bench::dev::5
swe_bench
dev
5
marshmallow-code__marshmallow-1524
marshmallow-code/marshmallow
marshmallow-code/marshmallow
python
7015fc4333a2f32cd58c3465296e834acd4496ff
Incorrect Email Validation https://github.com/marshmallow-code/marshmallow/blob/fbe22eb47db5df64b2c4133f9a5cb6c6920e8dd2/src/marshmallow/validate.py#L136-L151 The email validation regex will match `email@domain.com\n`, `email\n@domain.com`, and `email\n@domain.com\n`. The issue is that `$` is used to match until the ...
`^` behaves as expected, but `$` also matches a "string-ending newline". This appears to be a holdover from POSIX that most languages have long abandoned as default behavior. Thanks for reporting this @nbanmp. If you are interesting in contributing a MR, I would be happy to review it, otherwise I can pick this up as...
diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py --- a/src/marshmallow/validate.py +++ b/src/marshmallow/validate.py @@ -65,7 +65,7 @@ def _regex_generator(self, relative, require_tld): r'\[?[A-F0-9]*:[A-F0-9:]+\]?)', # ...or ipv6 r'(?::\d+)?', # optional port ...
diff --git a/tests/test_validate.py b/tests/test_validate.py --- a/tests/test_validate.py +++ b/tests/test_validate.py @@ -41,6 +41,7 @@ def test_url_absolute_valid(valid_url): 'http:/example.org', 'foo://example.org', '../icons/logo.gif', + 'https://example.org\n', 'abc', '..', '/', @@...
["tests/test_validate.py::test_url_absolute_invalid[https://example.org\\n]", "tests/test_validate.py::test_url_relative_invalid[http://example.org\\n]", "tests/test_validate.py::test_url_dont_require_tld_invalid[http://example\\n]", "tests/test_validate.py::test_email_invalid[niceandsimple\\n@example.com]", "tests/tes...
["tests/test_validate.py::test_url_absolute_valid[http://example.org]", "tests/test_validate.py::test_url_absolute_valid[https://example.org]", "tests/test_validate.py::test_url_absolute_valid[ftp://example.org]", "tests/test_validate.py::test_url_absolute_valid[ftps://example.org]", "tests/test_validate.py::test_url_a...
null
true
2020-02-26T20:55:30Z
1
10
5
829
0
0.8
1
0.55
1
0.1715
80.8895
8,129
swe_smith::train::43210
swe_smith
train
43,210
gawel__pyquery.811cd048.func_pm_remove_cond__wt3qosks
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
wrap() method doesn't handle empty PyQuery objects correctly #### Description When calling `wrap()` on an empty PyQuery object, the method fails with an assertion error instead of returning the empty object unchanged. #### Steps/Code to Reproduce ```python from pyquery import PyQuery as pq # Create an empty PyQuer...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..8d4eabe 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -1373,8 +1373,6 @@ class PyQuery(list): .. """ - if not self: - return self assert isinstance(value, basestring) value = froms...
["tests/doctests.rst::doctests.rst"]
["README.rst::README.rst", "docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/manipulating.rst::manipulating.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselec...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
11
1
1,009
0
0.6
1
0.75
1
0.204833
80.8895
8,130
swe_smith::train::24012
swe_smith
train
24,012
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__grlee2g8
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
TimeSeries.remove_column() doesn't validate column name before processing #### Description When calling `remove_column()` on a TimeSeries object with an invalid column name, the method processes the data and units before checking if the column exists, leading to unexpected behavior. #### Steps/Code to Reproduce ```...
diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py index 80e5d20..9d2b18f 100644 --- a/sunpy/timeseries/timeseriesbase.py +++ b/sunpy/timeseries/timeseriesbase.py @@ -474,6 +474,8 @@ class GenericTimeSeries: return self.__class__(data, meta, units) def remove_column(sel...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_remove_column"]
["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
7
1
1,089
0
0.6
1
0.75
1
0.204833
80.8895
8,131
swe_smith::train::52493
swe_smith
train
52,493
pydicom__pydicom.7d361b3d.func_pm_remove_assign__ew9m2zll
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
NameError in format_number_as_ds function after variable removal #### Description The `format_number_as_ds` function in `valuerep.py` is raising a `NameError` because the `use_scientific` variable is being referenced but not defined. #### Steps/Code to Reproduce ```python from pydicom.valuerep import format_number_...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..4b548a6 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -970,15 +970,6 @@ def format_number_as_ds(val: float | Decimal) -> str: # Characters needed for '-' at start sign_chars = 1 if val < 0.0 else 0 - # N...
["tests/test_dataelem.py::TestDataElement::test_DSFloat_conversion_auto_format", "tests/test_dataset.py::TestDatasetElements::test_formatted_DS_assignment", "tests/test_valuerep.py::TestTruncateFloatForDS::test_auto_format[3.141592653589793-3.14159265358979]", "tests/test_valuerep.py::TestTruncateFloatForDS::test_auto_...
["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
10
95
1,029
0
0.6
1
0.75
1
0.204833
80.8895
8,132
swe_smith::train::13890
swe_smith
train
13,890
python-openxml__python-docx.0cf6d71f.func_basic__qzp3166d
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Table cell lookup fails with grid_before offset #### Description When working with tables that have `grid_before` values (cells that are omitted at the start of a row), the `tc_at_grid_col` method incorrectly calculates grid offsets and raises `ValueError` for valid grid positions. #### Steps/Code to Reproduce ```p...
diff --git a/src/docx/oxml/table.py b/src/docx/oxml/table.py index e38d585..5ef76e2 100644 --- a/src/docx/oxml/table.py +++ b/src/docx/oxml/table.py @@ -81,18 +81,13 @@ class CT_Row(BaseOxmlElement): Raises ValueError when this `w:tr` contains no `w:tc` with exact starting `grid_offset`. """ - ...
["tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[2-1-1-top-0]", "tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[4-2-1-top-1]", "tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[2-0-1-bottom-2]", "tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_ext...
["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
11
17
1,009
0
0.6
1
0.75
1
0.204833
80.8895
8,133
swe_smith::train::43101
swe_smith
train
43,101
gawel__pyquery.811cd048.func_basic__p1i2qipr
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
PyQuery fromstring function breaks with file-like objects #### Description When passing file-like objects to PyQuery, the parsing logic is incorrectly swapped, causing XML syntax errors and unexpected behavior. File-like objects should use `parse` method but are being processed with `fromstring` method instead. ####...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..e98d0ea 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -68,25 +68,26 @@ def fromstring(context, parser=None, custom_parser=None): """use html parser if we don't have clean xml """ if hasattr(context, 'read') and hasattr(cont...
["README.rst::README.rst", "docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/manipulating.rst::manipulating.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselec...
["pyquery/pyquery.py::pyquery.pyquery.PyQuery.__html__", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.__str__", "tests/test_pyquery.py::TestSelector::test_selector_from_doc", "tests/test_pyquery.py::TestConstruction::test_typeerror_on_invalid_value", "tests/test_pyquery.py::TestMakeLinks::test_make_link", "tests/test_p...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
21
139
808
0
0.6
1
0.75
1
0.204667
80.889
8,134
swe_smith::train::20616
swe_smith
train
20,616
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__cgh8hlrv
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
DATE_ADD function with 3 arguments causes UnboundLocalError #### Description When using the DATE_ADD function with 3 arguments (unit, value, expression) in Spark dialect, an UnboundLocalError is raised due to a variable being referenced before assignment. #### Steps/Code to Reproduce ```python import sqlglot # Thi...
diff --git a/sqlglot/dialects/spark.py b/sqlglot/dialects/spark.py index f86f0eb..f95b5d8 100644 --- a/sqlglot/dialects/spark.py +++ b/sqlglot/dialects/spark.py @@ -42,7 +42,10 @@ def _build_datediff(args: t.List) -> exp.Expression: def _build_dateadd(args: t.List) -> exp.Expression: - expression = seq_get(args...
["tests/dialects/test_spark.py::TestSpark::test_spark"]
["tests/dialects/test_spark.py::TestSpark::test_analyze", "tests/dialects/test_spark.py::TestSpark::test_bool_or", "tests/dialects/test_spark.py::TestSpark::test_current_user", "tests/dialects/test_spark.py::TestSpark::test_ddl", "tests/dialects/test_spark.py::TestSpark::test_explode_projection_to_unnest", "tests/diale...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
11
1
1,008
0
0.6
1
0.75
1
0.204667
80.889
8,135
swe_smith::train::42622
swe_smith
train
42,622
python-jsonschema__jsonschema.93e0caa5.func_basic__mn02fmv6
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
unevaluatedItems validation logic inverted for arrays #### Description The `unevaluatedItems` keyword validation is behaving incorrectly for array instances. It appears to be validating the wrong items and producing inverted error messages. #### Steps/Code to Reproduce ```python import jsonschema # Schema with pre...
diff --git a/jsonschema/_keywords.py b/jsonschema/_keywords.py index f30f954..9d0dc86 100644 --- a/jsonschema/_keywords.py +++ b/jsonschema/_keywords.py @@ -390,17 +390,17 @@ def if_(validator, if_schema, instance, schema): def unevaluatedItems(validator, unevaluatedItems, instance, schema): - if not validator....
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft202012::test_unevaluatedItems_item_is_evaluated_in_an_uncle_schema_to_unevaluatedItems_uncle_keyword_evaluation_is_not_significant", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft202012::test_unevaluatedItems_non_array_instances_are_valid_ignores_bo...
["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
8
29
1,068
0
0.6
1
0.75
1
0.204667
80.889
8,136
swe_smith::train::2866
swe_smith
train
2,866
pudo__dataset.5c2dc8d3.func_pm_ctrl_shuffle__suzonpfb
swesmith/pudo__dataset.5c2dc8d3
pudo/dataset
python
null
find_one method raises UnboundLocalError when table exists #### Description The `find_one` method in the Table class is raising an `UnboundLocalError: local variable 'resiter' referenced before assignment` when called on existing tables. #### Steps/Code to Reproduce ```python import dataset # Connect to database a...
diff --git a/dataset/table.py b/dataset/table.py index 732964c..ea988cf 100644 --- a/dataset/table.py +++ b/dataset/table.py @@ -637,6 +637,13 @@ class Table(object): return ResultIter(conn.execute(query), row_type=self.db.row_type, step=_step) def find_one(self, *args, **kwargs): + try: + ...
["test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id1", "test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id2", "test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id3", "test/test_dataset.py::DatabaseTestCase::test_create_table_shorthand1", "test/test_dataset.py::Database...
["test/test_dataset.py::DatabaseTestCase::test_contains", "test/test_dataset.py::DatabaseTestCase::test_create_table", "test/test_dataset.py::DatabaseTestCase::test_create_table_no_ids", "test/test_dataset.py::DatabaseTestCase::test_database_url_query_string", "test/test_dataset.py::DatabaseTestCase::test_invalid_value...
jyangballin/swesmith.x86_64.pudo_1776_dataset.5c2dc8d3
true
null
1
15
13
928
0
0.6
1
0.75
1
0.204667
80.889
8,137
swe_smith::train::49156
swe_smith
train
49,156
mozilla__bleach.73871d76.combine_file__w0axzmc0
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
AttributeError when accessing namespace property on Element objects #### Description When using bleach to clean or linkify HTML content, an AttributeError is raised when the code tries to access the namespace property of Element objects. This appears to be related to a typo in the property getter method. #### Steps/...
diff --git a/bleach/_vendor/html5lib/treebuilders/etree.py b/bleach/_vendor/html5lib/treebuilders/etree.py index 5ccfc4d..c8d64ba 100644 --- a/bleach/_vendor/html5lib/treebuilders/etree.py +++ b/bleach/_vendor/html5lib/treebuilders/etree.py @@ -55,7 +55,7 @@ def getETreeBuilder(ElementTreeImplementation, fullTree=False...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
9
183
1,048
0
0.6
1
0.75
1
0.204667
80.889
8,138
swe_smith::train::49087
swe_smith
train
49,087
mozilla__bleach.73871d76.combine_file__1kdsqwbh
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
getFragment() returns object without element attribute #### Description When using the etree tree builder, calling `getFragment()` on a TreeBuilder instance returns an object that doesn't have the expected `element` attribute, causing AttributeError when trying to access it. #### Steps/Code to Reproduce ```python i...
diff --git a/bleach/_vendor/html5lib/treebuilders/etree.py b/bleach/_vendor/html5lib/treebuilders/etree.py index 5ccfc4d..fbffce4 100644 --- a/bleach/_vendor/html5lib/treebuilders/etree.py +++ b/bleach/_vendor/html5lib/treebuilders/etree.py @@ -138,13 +138,13 @@ def getETreeBuilder(ElementTreeImplementation, fullTree=F...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
14
183
947
0
0.6
1
0.75
1
0.2045
80.8885
8,139
swe_smith::train::38469
swe_smith
train
38,469
amueller__word_cloud.ec24191c.func_basic__3t4ea6ld
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
WordCloud generation fails with broadcasting error when using masks #### Description When generating word clouds, I'm getting a ValueError about operands not being able to broadcast together. This happens with various mask configurations and seems to affect the integral image calculation. #### Steps/Code to Reproduc...
diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py index 1622c03..e92fb2d 100644 --- a/wordcloud/wordcloud.py +++ b/wordcloud/wordcloud.py @@ -40,11 +40,10 @@ class IntegralOccupancyMap(object): self.height = height self.width = width if mask is not None: - # the order of...
["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_default", "test/test_wordcloud.py::...
["test/test_wordcloud.py::test_empty_text", "test/test_wordcloud.py::test_stopwords_lowercasing", "test/test_wordcloud.py::test_check_errors", "test/test_wordcloud.py::test_mask_contour", "test/test_wordcloud.py::test_single_color_func", "test/test_wordcloud.py::test_single_color_func_grey", "test/test_wordcloud.py::te...
jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c
true
null
1
7
23
1,087
0
0.6
1
0.75
1
0.2045
80.8885
8,140
swe_smith::train::47636
swe_smith
train
47,636
sqlfluff__sqlfluff.50a1c4b6.combine_module__njpyntqw
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Plugin manager purge function causes AttributeError on reload #### Description When using the plugin system, calling `purge_plugin_manager()` causes an AttributeError when trying to reload plugins. The function appears to be setting incorrect values that break the plugin manager state. #### Steps/Code to Reproduce ...
diff --git a/src/sqlfluff/core/helpers/dict.py b/src/sqlfluff/core/helpers/dict.py index ae76dcd..fabcbb2 100644 --- a/src/sqlfluff/core/helpers/dict.py +++ b/src/sqlfluff/core/helpers/dict.py @@ -187,10 +187,10 @@ def iter_records_from_nested_dict( """ for key, val in nested_dict.items(): if isinsta...
["test/core/helpers/dict_test.py::test__config__iter_records_from_nested_dict", "test/core/plugin_test.py::test__plugin_handle_bad_load"]
["test/core/helpers/dict_test.py::test_helpers_dict_doctests", "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__dict_diff", "test/core/plugin_test.py::test__plugin_...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
2
8
2
1,067
0
0.6
1
0.75
1
0.2045
80.8885
8,141
swe_smith::train::24051
swe_smith
train
24,051
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__nbsrl5ys
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
MapSequence.as_array() raises UnboundLocalError when called #### Description When calling the `as_array()` method on a MapSequence object, an `UnboundLocalError` is raised indicating that the local variable 'data' cannot be accessed where it is not associated with a value. #### Steps/Code to Reproduce ```python imp...
diff --git a/sunpy/map/mapsequence.py b/sunpy/map/mapsequence.py index c875ad6..dd644b4 100644 --- a/sunpy/map/mapsequence.py +++ b/sunpy/map/mapsequence.py @@ -524,6 +524,10 @@ class MapSequence: @deprecated(since='6.1', alternative='data and mask properties', message=v61_DEPRECATION_MESSAGE) def as_array(...
["sunpy/map/tests/test_mapsequence.py::test_deprecations"]
["sunpy/map/tests/test_mapsequence.py::test_as_array_different_shapes", "sunpy/map/tests/test_mapsequence.py::test_as_array_no_masks", "sunpy/map/tests/test_mapsequence.py::test_as_array_all_masks", "sunpy/map/tests/test_mapsequence.py::test_as_array_some_masks", "sunpy/map/tests/test_mapsequence.py::test_all_meta", "s...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
9
1
1,047
0
0.6
1
0.75
1
0.2045
80.8885
8,142
swe_smith::train::46927
swe_smith
train
46,927
python-trio__trio.cfbbe2c1.func_basic__jges8kd7
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
NameError in trio._path module after recent changes #### Description After some recent changes to the `_wraps_async` decorator in `trio/_path.py`, several path-related operations are failing with `NameError: name 'run_async' is not defined`. This affects various async path methods like `resolve()`, `absolute()`, `ite...
diff --git a/src/trio/_path.py b/src/trio/_path.py index a58136b..c3c6990 100644 --- a/src/trio/_path.py +++ b/src/trio/_path.py @@ -36,14 +36,17 @@ def _wraps_async( # type: ignore[misc] ) -> Callable[[Callable[P, T]], Callable[P, Awaitable[T]]]: def decorator(fn: Callable[P, T]) -> Callable[P, Awaitable[T]]: ...
["src/trio/_tests/test_path.py::test_open_is_async_context_manager", "src/trio/_tests/test_path.py::test_async_method_signature", "src/trio/_tests/test_path.py::test_compare_async_stat_methods[is_dir]", "src/trio/_tests/test_path.py::test_compare_async_stat_methods[is_file]", "src/trio/_tests/test_path.py::test_async_m...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
13
12
966
0
0.6
1
0.75
1
0.204333
80.888
8,143
swe_smith::train::30018
swe_smith
train
30,018
getnikola__nikola.0f4c230e.func_pm_remove_assign__t0brfm9e
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
Link checker command crashes with NameError on undefined variables #### Description The `nikola check -l` command fails with a NameError when trying to check links on a site. Several variables that are referenced in the code are not properly defined, causing the link checking functionality to crash. #### Steps/Code ...
diff --git a/nikola/plugins/command/check.py b/nikola/plugins/command/check.py index 3f61dd2..7f0b946 100644 --- a/nikola/plugins/command/check.py +++ b/nikola/plugins/command/check.py @@ -193,18 +193,16 @@ class CommandCheck(Command): def analyze(self, fname, find_sources=False, check_remote=False, ignore_query...
["tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_per_day.py::test_check_links", "tests/integration/test_archive_per_month.py::test_check_links", "tests/integration/test_building_in_subdir.py::test_check_links", "tests/integration/test_category_destpath.py::test_check_links", ...
["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_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[overall]", "tests/integration/test_archive_full.py::test_full...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
12
18
986
0
0.6
1
0.75
1
0.204333
80.888
8,144
swe_smith::train::27112
swe_smith
train
27,112
tkrajina__gpxpy.09fc46b3.func_pm_ctrl_invert_if__k8cqst8f
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPXComplexField returns wrong type when is_list is True #### Description When parsing GPX files, `GPXComplexField.from_xml()` returns incorrect types for list fields. Instead of returning a list of objects, it returns a single object when `is_list=True`. #### Steps/Code to Reproduce ```python import gpxpy # Load a...
diff --git a/gpxpy/gpxfield.py b/gpxpy/gpxfield.py index e253df3..c1314e7 100644 --- a/gpxpy/gpxfield.py +++ b/gpxpy/gpxfield.py @@ -233,18 +233,17 @@ class GPXComplexField(AbstractGPXField): def from_xml(self, node: Any, version: str) -> Any: if self.is_list: + field_node = node.find(self.ta...
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_missing_elevations_without_ele", "test.py::GPXTests::test_add_missing_times_2", "test.py::GPXTests::test_clone_and_smooth", "test.py::GPXTests::test_course_between", "test.py::GPXTests::test_dilutions", "test.py::GPXTests::test_extension_witho...
["test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_add_missing_elevations", "test.py::GPXTests::tes...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
11
79
1,006
0
0.6
1
0.75
1
0.204333
80.888
8,145
r2e_gym::train::387
r2e_gym
train
387
orange3__0aa1714905af5673407e326867870ea8946d262f
orange3
biolab/orange3
python
0aa1714905af5673407e326867870ea8946d262f
**Title:** `remove_discrete_features` and `remove_nonbinary_features` Functions Do Not Support `to_metas` Parameter **Description:** The functions `remove_discrete_features` and `remove_nonbinary_features` are intended to move ignored attributes to metas when the `to_metas` parameter is set to `True`. However, current...
diff --git a/Orange/distance/base.py b/Orange/distance/base.py --- a/Orange/distance/base.py +++ b/Orange/distance/base.py @@ -34,22 +34,29 @@ # TODO I have put this function here as a substitute the above `_preprocess`. # None of them really belongs here; (re?)move them, eventually. -def remove_discrete_features(d...
diff --git a/Orange/distance/tests/test_distance.py b/Orange/distance/tests/test_distance.py --- a/Orange/distance/tests/test_distance.py +++ b/Orange/distance/tests/test_distance.py @@ -5,7 +5,8 @@ import numpy as np from scipy.sparse import csr_matrix -from Orange.data import ContinuousVariable, DiscreteVariable,...
null
null
namanjain12/orange3_final:0aa1714905af5673407e326867870ea8946d262f
true
null
2
20
null
1,538
0
0.75
1
0.6375
1
0.323
80.88775
8,146
swe_smith::train::28252
swe_smith
train
28,252
Mimino666__langdetect.a1598f1a.func_pm_class_rm_funcs__z1n2h1ha
swesmith/Mimino666__langdetect.a1598f1a
mimino666/langdetect
python
null
LangProfile missing __init__ method causes TypeError #### Description The LangProfile class is missing its `__init__` method, causing a TypeError when trying to instantiate the class. #### Steps/Code to Reproduce ```python from langdetect.utils.lang_profile import LangProfile # This will raise a TypeError profile ...
diff --git a/langdetect/utils/lang_profile.py b/langdetect/utils/lang_profile.py index 118cff8..fa66859 100644 --- a/langdetect/utils/lang_profile.py +++ b/langdetect/utils/lang_profile.py @@ -14,27 +14,6 @@ class LangProfile(object): ROMAN_CHAR_RE = re.compile(r'^[A-Za-z]$') ROMAN_SUBSTR_RE = re.compile(r'.*...
["langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_detector4", "langdetect/tests/test_detector.py::DetectorTest::t...
["langdetect/tests/test_language.py::LanguageTest::test_cmp", "langdetect/tests/test_language.py::LanguageTest::test_language", "langdetect/tests/utils/test_ngram.py::NGramTest::test_constants", "langdetect/tests/utils/test_ngram.py::NGramTest::test_ngram", "langdetect/tests/utils/test_ngram.py::NGramTest::test_ngram3"...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
true
null
1
23
13
765
0
0.6
1
0.75
1
0.204167
80.8875
8,147
swe_smith::train::23581
swe_smith
train
23,581
pyparsing__pyparsing.533adf47.func_basic__id9urj7e
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
# ParseResults.getName() fails with TypeError when used in boolean search parser ## Bug description When using the boolean search parser example, I'm getting a TypeError. The issue seems to be in the `getName()` method of `ParseResults` class. ```python from pyparsing import * from examples.booleansearchparser impor...
diff --git a/pyparsing/results.py b/pyparsing/results.py index 2458478..864227c 100644 --- a/pyparsing/results.py +++ b/pyparsing/results.py @@ -637,18 +637,18 @@ class ParseResults: return next( ( k - for k, vlist in parent_tokdict_items - ...
["tests/test_examples.py::TestExamples::test_booleansearchparser"]
["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
10
1
1,025
0
0.6
1
0.75
1
0.204167
80.8875
8,148
swe_smith::train::18922
swe_smith
train
18,922
seperman__deepdiff.ed252022.func_basic__thl281hd
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
type_is_subclass_of_type_group function arguments swapped causing TypeError #### Description The `type_is_subclass_of_type_group` function in `deepdiff/helper.py` has its arguments swapped in the logic, causing `isinstance` and `issubclass` calls to fail with TypeError when comparing types and type groups. #### Step...
diff --git a/deepdiff/helper.py b/deepdiff/helper.py index ff6d668..cad2e35 100644 --- a/deepdiff/helper.py +++ b/deepdiff/helper.py @@ -380,9 +380,9 @@ def type_in_type_group(item, type_group): def type_is_subclass_of_type_group(item, type_group): - return isinstance(item, type_group) \ - or (isinstance...
["tests/test_delta.py::TestNumpyDelta::test_numpy_delta_cases[delta_numpy4_type_change_ignore_numeric_type_changes]", "tests/test_diff_numpy.py::TestNumpy::test_numpy[numpy_array3_ignore_number_type_changes]", "tests/test_diff_numpy.py::TestNumpy::test_numpy[numpy_array4_ignore_number_type_changes_and_ignore_order]", "...
["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
6
52
1,105
0
0.6
1
0.75
1
0.204167
80.8875
8,149
swe_smith::train::8045
swe_smith
train
8,045
cantools__cantools.0c6a7871.func_pm_remove_assign__c601z0y7
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
C source generation fails with UnboundLocalError for variables 'length' and 'mask' #### Description When generating C source code from DBC files, the code generation process crashes with `UnboundLocalError: local variable 'length' referenced before assignment` or similar errors for the `mask` variable. #### Steps/Co...
diff --git a/src/cantools/database/can/c_source.py b/src/cantools/database/can/c_source.py index cf3c40e..4804249 100644 --- a/src/cantools/database/can/c_source.py +++ b/src/cantools/database/can/c_source.py @@ -757,20 +757,15 @@ class CodeGenSignal: if left >= (pos + 1): length =...
["tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source", "tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_bit_fields", "tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_database_name", "tests/test_command_line.py::CanToolsCommandLineTest::tes...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
8
9
1,065
0
0.6
1
0.75
1
0.204167
80.8875
8,150
swe_smith::train::39445
swe_smith
train
39,445
pallets__jinja.ada0a9a6.func_pm_ctrl_shuffle__i9idnoim
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
filesizeformat filter throws UnboundLocalError when used #### Description The `filesizeformat` filter is throwing an `UnboundLocalError` when trying to format file sizes. This happens for both binary and decimal formatting modes. #### Steps/Code to Reproduce ```python from jinja2 import Environment env = Environme...
diff --git a/src/jinja2/filters.py b/src/jinja2/filters.py index 1420877..4505035 100644 --- a/src/jinja2/filters.py +++ b/src/jinja2/filters.py @@ -689,13 +689,6 @@ def do_random(context: "Context", seq: "t.Sequence[V]") -> "t.Union[V, Undefined def do_filesizeformat(value: t.Union[str, float, int], binary: bool ...
["tests/test_filters.py::TestFilter::test_filesizeformat", "tests/test_filters.py::TestFilter::test_filesizeformat_issue59"]
["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
15
2
925
0
0.6
1
0.75
1
0.204167
80.8875
8,151
swe_smith::train::29595
swe_smith
train
29,595
django__channels.a144b4b8.func_basic__qeia2qfr
swesmith/django__channels.a144b4b8
django/channels
python
null
Channel layer backend initialization fails with positional arguments #### Description When creating a channel layer backend instance, the initialization fails because the backend class is being called with positional arguments instead of keyword arguments. #### Steps/Code to Reproduce ```python from channels.layers...
diff --git a/channels/layers.py b/channels/layers.py index 5fc53f7..7838a80 100644 --- a/channels/layers.py +++ b/channels/layers.py @@ -54,24 +54,18 @@ class ChannelLayerManager: return self._make_backend(name, config) def _make_backend(self, name, config): - # Check for old format config ...
["tests/test_layers.py::TestChannelLayerManager::test_config_instance"]
["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_generic_websocket.py::test_websocket...
jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8
true
null
1
18
1
865
0
0.6
1
0.75
1
0.204167
80.8875
8,152
swe_smith::train::7619
swe_smith
train
7,619
cantools__cantools.0c6a7871.func_basic__ki12aufx
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Parser iterator yields None values for every other frame #### Description When iterating over a Parser object, every other frame is returned as None instead of the expected frame object. This causes AttributeError when trying to access frame properties like frame_id. #### Steps/Code to Reproduce ```python import ca...
diff --git a/src/cantools/logreader.py b/src/cantools/logreader.py index 67943e0..e5f3370 100644 --- a/src/cantools/logreader.py +++ b/src/cantools/logreader.py @@ -350,5 +350,8 @@ class Parser: def __iter__(self): """Returns DataFrame log entries. Non-parseable log entries is discarded.""" - ...
["tests/test_logreader.py::TestLogreaderStreams::test_candump", "tests/test_logreader.py::TestLogreaderStreams::test_candump_absolute_timestamp", "tests/test_logreader.py::TestLogreaderStreams::test_candump_log", "tests/test_logreader.py::TestLogreaderStreams::test_candump_log_fd_absolute_time", "tests/test_logreader.p...
["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
11
1,084
0
0.6
1
0.75
1
0.204
80.887
8,153
swe_smith::train::52434
swe_smith
train
52,434
pydicom__pydicom.7d361b3d.func_pm_ctrl_shuffle__wnt6pdka
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Hook validation order causes TypeError to be raised instead of ValueError for unknown hooks #### Description When registering a callback with an unknown hook name and a non-callable function, the error checking order causes a `TypeError` about the function not being callable to be raised before the `ValueError` about...
diff --git a/src/pydicom/hooks.py b/src/pydicom/hooks.py index 106b001..e476484 100644 --- a/src/pydicom/hooks.py +++ b/src/pydicom/hooks.py @@ -57,6 +57,15 @@ class Hooks: self.raw_element_kwargs: dict[str, Any] = {} def register_callback(self, hook: str, func: Callable) -> None: + + if hook == ...
["tests/test_hooks.py::TestHooks::test_unknown_hook_raises"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
19
1
844
0
0.6
1
0.75
1
0.204
80.887
8,154
swe_smith::train::31831
swe_smith
train
31,831
davidhalter__parso.338a5760.combine_module__csk9v3px
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Indentation parsing broken after recent changes #### Description Something seems to be wrong with indentation handling in the diff parser. When parsing code with indentation changes, I'm getting `AttributeError: 'NoneType' object has no attribute` errors. #### Steps/Code to Reproduce ```python import parso # This ...
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
2
10
112
1,024
0
0.6
1
0.75
1
0.204
80.887
8,155
swe_smith::train::4958
swe_smith
train
4,958
bottlepy__bottle.a8dfef30.func_pm_ctrl_shuffle__qpnonzr9
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
Plugin setup method not called when plugin validation fails #### Description When installing a plugin that has a `setup` method but fails validation (e.g., doesn't implement `apply` or isn't callable), the `setup` method is never called because the validation happens after the plugin is added to the list but before `...
diff --git a/bottle.py b/bottle.py index 286b5bc..11d5f20 100755 --- a/bottle.py +++ b/bottle.py @@ -803,17 +803,16 @@ class Bottle(object): self.add_route(route) def install(self, plugin): + self.plugins.append(plugin) + if not callable(plugin) and not hasattr(plugin, 'apply'): + ...
["test/test_plugins.py::TestPluginAPI::test_apply", "test/test_plugins.py::TestPluginAPI::test_callable", "test/test_plugins.py::TestPluginAPI::test_instance_method_wrapper", "test/test_plugins.py::TestPluginAPI::test_setup"]
["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
9
4
1,044
0
0.6
1
0.75
1
0.204
80.887
8,156
swe_smith::train::30898
swe_smith
train
30,898
mido__mido.a0158ff9.func_basic__sex84zce
swesmith/mido__mido.a0158ff9
mido/mido
python
null
Port iteration doesn't handle OSError correctly when port is open #### Description When iterating over a MIDI input port using `for message in port:`, if an OSError occurs while the port is still open, the iteration incorrectly continues instead of re-raising the exception. This masks legitimate errors that should be...
diff --git a/mido/ports.py b/mido/ports.py index 5b7b2b8..980faad 100644 --- a/mido/ports.py +++ b/mido/ports.py @@ -234,21 +234,15 @@ class BaseInput(BasePort): def __iter__(self): """Iterate through messages until the port closes.""" - # This could have simply called receive() in a loop, but th...
["../dev/tests/test_ports.py::test_close_inside_iteration"]
["../dev/tests/test_frozen.py::test_hashability", "../dev/tests/test_frozen.py::test_freeze_and_thaw", "../dev/tests/test_frozen.py::test_thawed_message_is_copy", "../dev/tests/test_frozen.py::test_is_frozen", "../dev/tests/test_frozen.py::test_frozen_repr", "../dev/tests/test_frozen.py::test_frozen_meta_repr", "../dev...
jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9
true
null
1
10
1
1,024
0
0.6
1
0.75
1
0.204
80.887
8,157
swe_bench::test::1166
swe_bench
test
1,166
psf__requests-1537
psf/requests
psf/requests
python
d8268fb7b44da7b8aa225eb1ca6fbdb4f9dc2457
multipart/form-data and datetime data I raise an bug that you already fix in the past on this issue : https://github.com/kennethreitz/requests/issues/661 or https://github.com/kennethreitz/requests/issues/737 I tried the same methodology with that code : ``` import requets requests.post("http://httpbin.org/post", da...
Hi @ppavril, thanks for raising this issue! So the problem here is that we don't ask for a string representation of keys or values. I think the correct fix is changing the following code (at [line 102 of models.py](https://github.com/kennethreitz/requests/blob/master/requests/models.py#L102)) from: ``` python for fie...
diff --git a/requests/models.py b/requests/models.py --- a/requests/models.py +++ b/requests/models.py @@ -106,6 +106,10 @@ def _encode_files(files, data): val = [val] for v in val: if v is not None: + # Don't call str() on bytestrings: in Py3 it all goe...
diff --git a/test_requests.py b/test_requests.py --- a/test_requests.py +++ b/test_requests.py @@ -663,6 +663,14 @@ def test_header_keys_are_native(self): self.assertTrue('unicode' in p.headers.keys()) self.assertTrue('byte' in p.headers.keys()) + def test_can_send_nonstring_objects_with_files(se...
["test_requests.py::RequestsTestCase::test_can_send_nonstring_objects_with_files"]
["test_requests.py::RequestsTestCase::test_basic_building", "test_requests.py::RequestsTestCase::test_cannot_send_unprepared_requests", "test_requests.py::RequestsTestCase::test_cookie_parameters", "test_requests.py::RequestsTestCase::test_entry_points", "test_requests.py::RequestsTestCase::test_get_auth_from_url", "te...
null
true
2013-08-17T06:29:06Z
1
4
1
1,893
0
0.8
1
0.7
0.8
0.328833
80.8865
8,158
swe_smith::train::24300
swe_smith
train
24,300
sunpy__sunpy.f8edfd5c.func_pm_remove_cond__68polruj
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Time parsing fails for 24:00:00 format #### Description When parsing time strings with hour value of 24 (representing midnight of the next day), the parser now raises a ValueError instead of correctly handling the conversion. #### Steps/Code to Reproduce ```python from sunpy.time import parse_time # This should pa...
diff --git a/sunpy/time/time.py b/sunpy/time/time.py index 0d760c5..2997d1b 100644 --- a/sunpy/time/time.py +++ b/sunpy/time/time.py @@ -121,19 +121,9 @@ def _regex_parse_time(inp, format): # Special handling to add a day if the hour is 24 and the minute/second/microsecond are all zero add_one_day = False -...
["sunpy/time/tests/test_time.py::test_parse_time_24", "sunpy/time/tests/test_time.py::test_parse_time_24_2"]
["sunpy/time/tests/test_time.py::test_parse_time_microseconds_excess_trailing_zeros", "sunpy/time/tests/test_time.py::test_parse_time_tuple", "sunpy/time/tests/test_time.py::test_parse_time_int", "sunpy/time/tests/test_time.py::test_parse_time_pandas_timestamp", "sunpy/time/tests/test_time.py::test_parse_time_nanosecon...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
10
2
1,023
0
0.6
1
0.75
1
0.203833
80.8865
8,159
swe_smith::train::13714
swe_smith
train
13,714
python-openxml__python-docx.0cf6d71f.func_basic__l1swhpss
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Document loading fails with AttributeError after recent changes #### Description When trying to open Word documents, the library now fails with an AttributeError. This seems to affect basic document operations like loading files and iterating through content. #### Steps/Code to Reproduce ```python from docx import ...
diff --git a/src/docx/opc/pkgreader.py b/src/docx/opc/pkgreader.py index f00e7b5..722eaec 100644 --- a/src/docx/opc/pkgreader.py +++ b/src/docx/opc/pkgreader.py @@ -114,11 +114,11 @@ class _ContentTypeMap: `content_types_xml`.""" types_elm = parse_xml(content_types_xml) ct_map = _ContentTypeM...
["tests/opc/test_pkgreader.py::Describe_ContentTypeMap::it_can_construct_from_ct_item_xml", "tests/test_blkcntnr.py::DescribeBlockItemContainer::it_can_iterate_its_inner_content", "tests/test_package.py::DescribePackage::it_gathers_package_image_parts_after_unmarshalling", "tests/test_section.py::DescribeSection::it_ca...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
8
4
1,063
0
0.6
1
0.75
1
0.203833
80.8865
8,160
swe_smith::train::20617
swe_smith
train
20,617
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__cltcd8qz
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
BigQuery ML.FEATURES_AT_TIME parsing returns undefined variable #### Description When parsing BigQuery ML.FEATURES_AT_TIME expressions, the parser returns an undefined variable `expr` instead of properly constructing the expression object. #### Steps/Code to Reproduce ```python import sqlglot # This should parse s...
diff --git a/sqlglot/dialects/bigquery.py b/sqlglot/dialects/bigquery.py index 6d39231..e2ea2d2 100644 --- a/sqlglot/dialects/bigquery.py +++ b/sqlglot/dialects/bigquery.py @@ -833,11 +833,8 @@ class BigQuery(Dialect): return expr def _parse_features_at_time(self) -> exp.FeaturesAtTime: - ...
["tests/dialects/test_bigquery.py::TestBigQuery::test_bigquery"]
["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
15
1
923
0
0.6
1
0.75
1
0.203833
80.8865
8,161
swe_smith::train::28001
swe_smith
train
28,001
jsvine__pdfplumber.02ff4313.func_pm_remove_loop__0qhorz87
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
CSV export returns empty output when PDF contains objects #### Description When trying to export PDF data to CSV format using `to_csv()` method, the function returns empty output or fails with an IndexError. This affects both the programmatic API and the CLI interface. #### Steps/Code to Reproduce ```python import ...
diff --git a/pdfplumber/container.py b/pdfplumber/container.py index 2589a4a..e94aed1 100644 --- a/pdfplumber/container.py +++ b/pdfplumber/container.py @@ -156,13 +156,6 @@ class Container(object): include_attrs=include_attrs, exclude_attrs=exclude_attrs, ) - for page in pages...
["tests/test_convert.py::Test::test_cli_csv", "tests/test_convert.py::Test::test_cli_csv_exclude", "tests/test_convert.py::Test::test_cli_csv_include", "tests/test_convert.py::Test::test_csv", "tests/test_convert.py::Test::test_csv_all_types"]
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
9
5
1,043
0
0.6
1
0.75
1
0.203833
80.8865
8,162
swe_smith::train::52522
swe_smith
train
52,522
pydicom__pydicom.7d361b3d.func_pm_remove_assign__sgvc15ao
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
FileSet loading fails with NameError on undefined variables #### Description When loading a DICOMDIR file using FileSet, the code fails with NameError exceptions for several undefined variables including `records`, `node`, `child`, `missing`, `file_id`, and `path`. #### Steps/Code to Reproduce ```python from pydico...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..82b886c 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -1713,8 +1713,6 @@ class FileSet: If ``True`` then raise an exception if orphaned directory records are found in the File-set (default ``False...
["tests/test_fileset.py::TestRecordNode::test_root", "tests/test_fileset.py::TestRecordNode::test_leaf", "tests/test_fileset.py::TestRecordNode::test_add", "tests/test_fileset.py::TestRecordNode::test_key", "tests/test_fileset.py::TestRecordNode::test_bad_record", "tests/test_fileset.py::TestRecordNode::test_encoding",...
["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
11
105
1,003
0
0.6
1
0.75
1
0.203833
80.8865
8,163
swe_smith::train::46417
swe_smith
train
46,417
conan-io__conan.86f29e13.pr_16443
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
Replace requires functionality not working as expected I've encountered an issue with the replace requires functionality in the dependency graph. When attempting to replace a requirement with an alternative, the expected behavior is not occurring, and it seems to be causing missing binary errors. Here's a simple repr...
diff --git a/conans/client/graph/graph.py b/conans/client/graph/graph.py index b5037c2..d7d2309 100644 --- a/conans/client/graph/graph.py +++ b/conans/client/graph/graph.py @@ -67,7 +67,6 @@ class Node(object): self.should_build = False # If the --build or policy wants to build this binary self.build...
["test/integration/graph/test_replace_requires.py::TestReplaceRequires::test_alternative[False-dep/1.3-dep/*-dep/1.1-dep/1.1]", "test/integration/graph/test_replace_requires.py::TestReplaceRequires::test_alternative[False-dep/1.3-dep/*-dep/*@system-dep/1.3@system]", "test/integration/graph/test_replace_requires.py::Tes...
["test/integration/graph/test_replace_requires.py::test_replace_requires_invalid_requires_errors", "test/unittests/tools/cmake/test_cmaketoolchain.py::test_cmake_toolchain", "test/unittests/tools/cmake/test_cmaketoolchain.py::test_remove", "test/unittests/tools/cmake/test_cmaketoolchain.py::test_select_blocks", "test/u...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
6
64
1,102
0
0.6
1
0.75
1
0.203667
80.886
8,164
swe_smith::train::40208
swe_smith
train
40,208
scanny__python-pptx.278b47b1.combine_file__t5rx8w28
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
NotesSlide inheritance broken and slide_id returns incorrect value #### Description The NotesSlide class has been broken - it no longer inherits from _BaseSlide which causes multiple issues with accessing properties and methods. Additionally, the slide_id property now returns an incorrect value that's off by 1. ####...
diff --git a/src/pptx/slide.py b/src/pptx/slide.py index 3b1b65d..1fa9408 100644 --- a/src/pptx/slide.py +++ b/src/pptx/slide.py @@ -98,7 +98,7 @@ class NotesMaster(_BaseMaster): """ -class NotesSlide(_BaseSlide): +class NotesSlide(): """Notes slide object. Provides access to slide notes placeholde...
["tests/test_slide.py::DescribeNotesSlide::it_can_clone_the_notes_master_placeholders", "tests/test_slide.py::DescribeSlide::it_knows_its_slide_id"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
9
2
1,042
0
0.6
1
0.75
1
0.203667
80.886
8,165
swe_bench::test::1012
swe_bench
test
1,012
matplotlib__matplotlib-23266
matplotlib/matplotlib
matplotlib/matplotlib
python
dab648ac5eff66a39742f718a356ebe250e01880
[ENH]: contour kwarg for negative_linestyle ### Problem if you contour a negative quantity, it gets dashed lines. Leaving aside whether this is a good default or not, the only way to toggle this is via `rcParams['contour.negative_linestyle']=False`. ### Proposed solution I think this should be togglable via kwarg, ...
Should the current `linestyles` kwarg be used to accomplish this or should a new kwarg be added? I have a simple solution adding a new kwarg (though it would need a little more work before it is ready). The following code snippet and images will show a solution with an added kwarg, but I expect this is not exactly w...
diff --git a/lib/matplotlib/contour.py b/lib/matplotlib/contour.py --- a/lib/matplotlib/contour.py +++ b/lib/matplotlib/contour.py @@ -701,7 +701,7 @@ def __init__(self, ax, *args, hatches=(None,), alpha=None, origin=None, extent=None, cmap=None, colors=None, norm=None, vmin=None, vm...
diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py --- a/lib/matplotlib/tests/test_contour.py +++ b/lib/matplotlib/tests/test_contour.py @@ -605,3 +605,80 @@ def test_subfigure_clabel(): CS = ax.contour(X, Y, Z) ax.clabel(CS, inline=True, fontsize=10) ax....
["lib/matplotlib/tests/test_contour.py::test_linestyles[solid]", "lib/matplotlib/tests/test_contour.py::test_linestyles[dashed]", "lib/matplotlib/tests/test_contour.py::test_linestyles[dashdot]", "lib/matplotlib/tests/test_contour.py::test_linestyles[dotted]", "lib/matplotlib/tests/test_contour.py::test_negative_linest...
["lib/matplotlib/tests/test_contour.py::test_contour_shape_1d_valid", "lib/matplotlib/tests/test_contour.py::test_contour_shape_2d_valid", "lib/matplotlib/tests/test_contour.py::test_contour_shape_error[args0-Length", "lib/matplotlib/tests/test_contour.py::test_contour_shape_error[args1-Length", "lib/matplotlib/tests/t...
null
true
2022-06-14T04:56:38Z
1
24
8
542
0
0.8
1
0.55
1
0.170333
80.886
8,166
swe_smith::train::47447
swe_smith
train
47,447
sqlfluff__sqlfluff.50a1c4b6.combine_file__j8nipwqo
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
LazySequence returns incorrect length and missing last element #### Description The LazySequence class is not behaving correctly - it's missing the last element and returning an incorrect length. When accessing elements or checking the length, the sequence appears to be truncated. #### Steps/Code to Reproduce ```py...
diff --git a/src/sqlfluff/cli/helpers.py b/src/sqlfluff/cli/helpers.py index d4af719..3faa2dd 100644 --- a/src/sqlfluff/cli/helpers.py +++ b/src/sqlfluff/cli/helpers.py @@ -89,10 +89,13 @@ class LazySequence(abc.Sequence): @cached_property def _sequence(self) -> abc.Sequence: - return self._getter() ...
["test/cli/helpers_test.py::test_cli__helpers__lazy_sequence"]
["test/cli/helpers_test.py::test__cli__helpers__wrap_elem[abc-5-res0]", "test/cli/helpers_test.py::test__cli__helpers__wrap_field_a", "test/cli/helpers_test.py::test__cli__helpers__wrap_field_b", "test/cli/helpers_test.py::test__cli__helpers__wrap_field_c", "test/cli/helpers_test.py::test__cli__helpers__pad_line"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
7
1
1,082
0
0.6
1
0.75
1
0.203667
80.886
8,167
swe_smith::train::38331
swe_smith
train
38,331
burnash__gspread.a8be3b96.func_pm_remove_assign__io21sbpa
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
Worksheet resize method breaks when only rows parameter is provided #### Description When calling `worksheet.resize()` with only the `rows` parameter, the method fails with a `NameError: name 'grid_properties' is not defined`. This happens because the `grid_properties` dictionary is not initialized when only rows are...
diff --git a/gspread/worksheet.py b/gspread/worksheet.py index 883e3a2..60830f4 100644 --- a/gspread/worksheet.py +++ b/gspread/worksheet.py @@ -1489,10 +1489,9 @@ class Worksheet: :param int rows: (optional) New number of rows. :param int cols: (optional) New number columns. """ - gri...
["tests/worksheet_test.py::WorksheetTest::test_basic_filters", "tests/worksheet_test.py::WorksheetTest::test_batch_merged_cells", "tests/worksheet_test.py::WorksheetTest::test_get_all_records", "tests/worksheet_test.py::WorksheetTest::test_get_all_records_different_header", "tests/worksheet_test.py::WorksheetTest::test...
["tests/cell_test.py::CellTest::test_a1_value", "tests/cell_test.py::CellTest::test_define_named_range", "tests/cell_test.py::CellTest::test_delete_named_range", "tests/cell_test.py::CellTest::test_equality", "tests/cell_test.py::CellTest::test_merge_cells", "tests/cell_test.py::CellTest::test_numeric_value", "tests/ce...
jyangballin/swesmith.x86_64.burnash_1776_gspread.a8be3b96
true
null
1
6
30
1,102
0
0.6
1
0.75
1
0.203667
80.886
8,168
swe_smith::train::47388
swe_smith
train
47,388
sqlfluff__sqlfluff.50a1c4b6.combine_file__bx3pc5yn
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
OutputStream config attribute not properly initialized #### Description When creating OutputStream instances, the config attribute is not being properly set, causing AttributeError when trying to access configuration settings. #### Steps/Code to Reproduce ```python from sqlfluff.cli.outputstream import TqdmOutput, ...
diff --git a/src/sqlfluff/cli/outputstream.py b/src/sqlfluff/cli/outputstream.py index 6bab7d9..2cd8b35 100644 --- a/src/sqlfluff/cli/outputstream.py +++ b/src/sqlfluff/cli/outputstream.py @@ -15,7 +15,7 @@ class OutputStream(abc.ABC): """Base class for linter output stream.""" def __init__(self, config: Fl...
["test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_no_dialect[command0]", "test/cli/commands_test.py::test__cli__command_parse_error_dialect_explicit_warning", "test/cli/commands_test.py::test__cli__command_parse_error_dialect_implicit_warning", "test/cli/commands_...
["test/cli/autocomplete_test.py::test_dialect_click_type_shell_complete[an-expected0]", "test/cli/autocomplete_test.py::test_dialect_click_type_shell_complete[d-expected1]", "test/cli/autocomplete_test.py::test_dialect_click_type_shell_complete[g-expected2]", "test/cli/autocomplete_test.py::test_dialect_click_type_shel...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
15
73
922
0
0.6
1
0.75
1
0.203667
80.886
8,169
swe_smith::train::27137
swe_smith
train
27,137
tkrajina__gpxpy.09fc46b3.func_pm_ctrl_shuffle__4ol2js01
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
get_elevation_extremes() raises UnboundLocalError when GPX has tracks #### Description When calling `get_elevation_extremes()` on a GPX object that contains tracks, the method raises an `UnboundLocalError: local variable 'elevations' referenced before assignment`. #### Steps/Code to Reproduce ```python import gpxpy...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..414a856 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -2403,6 +2403,8 @@ class GPX: return result def get_elevation_extremes(self) -> MinimumMaximum: + if not self.tracks: + return MinimumMaximum(None, None) """ ...
["test.py::GPXTests::test_min_max", "test.py::GPXTests::test_named_tuples_values_elevation_extremes", "test.py::GPXTests::test_track_with_elevation_zero", "test.py::GPXTests::test_track_with_some_points_are_without_elevations", "test.py::GPXTests::test_track_without_elevation"]
["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
1,002
0
0.6
1
0.75
1
0.203667
80.886
8,170
swe_smith::train::12038
swe_smith
train
12,038
lepture__mistune.bf54ef67.combine_file__a199ydvl
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
Table plugin broken after recent changes #### Description The table plugin is not working correctly. When trying to render markdown tables, I'm getting AttributeError exceptions instead of proper HTML output. #### Steps/Code to Reproduce ```python import mistune # Simple table markdown markdown_text = """ | Name |...
diff --git a/src/mistune/plugins/table.py b/src/mistune/plugins/table.py index 39e81f9..66f6a7e 100644 --- a/src/mistune/plugins/table.py +++ b/src/mistune/plugins/table.py @@ -149,22 +149,22 @@ def render_table_body(renderer: "BaseRenderer", text: str) -> str: def render_table_row(renderer: "BaseRenderer", text: ...
["tests/test_plugins.py::TestPlugin1_table::test_align_table_001", "tests/test_plugins.py::TestPlugin1_table::test_align_table_002", "tests/test_plugins.py::TestPlugin1_table::test_misc_table_001", "tests/test_plugins.py::TestPlugin1_table::test_misc_table_002", "tests/test_plugins.py::TestPlugin1_table::test_misc_tabl...
["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx...
jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67
true
null
1
14
18
942
0
0.6
1
0.75
1
0.203667
80.886
8,171
r2e_gym::train::5247
r2e_gym
train
5,247
pyramid__b6ffe51f16d2ea65f2313e99b24185f635a1bf64
pyramid
pylons/pyramid
python
b6ffe51f16d2ea65f2313e99b24185f635a1bf64
**[ISSUE]** **Title:** JSONP Callback Lacks Proper Validation, Allowing Potential JavaScript Injection **Description:** The current implementation of the JSONP renderer does not adequately validate the `callback` parameter. This oversight allows attackers to inject arbitrary JavaScript code by manipulating the `callb...
diff --git a/pyramid/renderers.py b/pyramid/renderers.py --- a/pyramid/renderers.py +++ b/pyramid/renderers.py @@ -1,6 +1,7 @@ import contextlib import json import os +import re from zope.interface import ( implementer, @@ -22,6 +23,8 @@ from pyramid.decorator import reify from pyramid.events import Befo...
diff --git a/pyramid/tests/test_renderers.py b/pyramid/tests/test_renderers.py --- a/pyramid/tests/test_renderers.py +++ b/pyramid/tests/test_renderers.py @@ -646,6 +646,14 @@ result = renderer({'a':'1'}, {}) self.assertEqual(result, '{"a": "1"}') + def test_render_to_jsonp_invalid_callback(self)...
null
null
namanjain12/pyramid_final:b6ffe51f16d2ea65f2313e99b24185f635a1bf64
true
null
1
9
null
1,754
0
0.75
1
0.6375
1
0.322333
80.88575
8,172
swe_smith::train::32279
swe_smith
train
32,279
davidhalter__parso.338a5760.func_pm_remove_cond__cuuv6xeh
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
NameError in f-string parsing after recent changes #### Description After some recent changes to the f-string parsing logic, there's a NameError being raised when processing f-string expressions. The variable `conversion` is being referenced but not defined in the scope. #### Steps/Code to Reproduce ```python impor...
diff --git a/parso/python/errors.py b/parso/python/errors.py index 09c5047..6e7bd43 100644 --- a/parso/python/errors.py +++ b/parso/python/errors.py @@ -1014,18 +1014,12 @@ class _FStringRule(SyntaxRule): self._check_fstring_contents(format_spec.children[1:], depth) def _check_fstring_expr(self, fstring...
["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_python_errors.py::test_pyth...
["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
7
11
1,081
0
0.6
1
0.75
1
0.2035
80.8855
8,173
swe_smith::train::52824
swe_smith
train
52,824
stanfordnlp__string2string.c4a72f59.func_pm_op_change__n8rncnxx
swesmith/stanfordnlp__string2string.c4a72f59
stanfordnlp/string2string
python
null
TypeError in SmithWaterman alignment with specific input strings #### Description Encountered a `TypeError` when using the `SmithWaterman` class for sequence alignment with certain input strings. The issue arises during the alignment process, causing unexpected behavior. #### Steps/Code to Reproduce ```python from s...
diff --git a/string2string/alignment/classical.py b/string2string/alignment/classical.py index 86c8039..5bd300c 100644 --- a/string2string/alignment/classical.py +++ b/string2string/alignment/classical.py @@ -804,7 +804,7 @@ class SmithWaterman(NeedlemanWunsch): # Backtrack the score matrix. ...
["tests/test_alignment.py::AlignmentTestCase::test_smithwaterman"]
["tests/test_alignment.py::AlignmentTestCase::test_dtw", "tests/test_alignment.py::AlignmentTestCase::test_hiirschberg", "tests/test_alignment.py::AlignmentTestCase::test_longest_common_subsequence", "tests/test_alignment.py::AlignmentTestCase::test_longest_common_subsubtring", "tests/test_alignment.py::AlignmentTestCa...
jyangballin/swesmith.x86_64.stanfordnlp_1776_string2string.c4a72f59
true
null
1
6
1
1,101
0
0.6
1
0.75
1
0.2035
80.8855
8,174
swe_smith::train::32255
swe_smith
train
32,255
davidhalter__parso.338a5760.func_pm_remove_assign__t2mqpa75
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
NameError in PEP8 normalizer when checking file endings #### Description The PEP8 normalizer is throwing `NameError: name 'prev' is not defined` when processing certain Python files. This appears to be affecting the end-of-file newline checking functionality. #### Steps/Code to Reproduce ```python import parso # T...
diff --git a/parso/python/pep8.py b/parso/python/pep8.py index c492dae..301885a 100644 --- a/parso/python/pep8.py +++ b/parso/python/pep8.py @@ -214,7 +214,6 @@ class PEP8Normalizer(ErrorFinder): break elif typ == 'file_input': endmarker = node.children[-1] - prev =...
["test/test_normalizer_issues_files.py::test_normalizer_issue[latin-1.py]", "test/test_normalizer_issues_files.py::test_normalizer_issue[E30not.py]", "test/test_normalizer_issues_files.py::test_normalizer_issue[E12_second.py]", "test/test_normalizer_issues_files.py::test_normalizer_issue[E50.py]", "test/test_normalizer...
["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
13
32
961
0
0.6
1
0.75
1
0.2035
80.8855
8,175
swe_smith::train::10415
swe_smith
train
10,415
paramiko__paramiko.23f92003.func_basic__ct0fy695
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP error code mapping returns wrong error for file not found operations Description When performing SFTP operations on non-existent files or directories, the server returns incorrect error codes. Operations that should return "No such file" errors are instead returning "Permission denied" errors. Steps/Code to Rep...
diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index cd3910d..e00af20 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -183,14 +183,14 @@ class SFTPServer(BaseSFTP, SubsystemHandler): :param int e: an errno code, as from ``OSError.errno``. :return: an `int` SFTP er...
["tests/test_sftp.py::TestSFTP::test_rename", "tests/test_sftp.py::TestSFTP::test_folder", "tests/test_sftp.py::TestSFTP::test_mkdir"]
["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
3
1,101
0
0.6
1
0.75
1
0.2035
80.8855
8,176
swe_smith::train::8095
swe_smith
train
8,095
cantools__cantools.0c6a7871.func_pm_remove_assign__vf327kaq
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
NameError when loading DBC files with attributes #### Description When loading DBC files that contain attributes, a `NameError: name 'definition' is not defined` error is raised. This affects any DBC file parsing that includes attribute definitions. #### Steps/Code to Reproduce ```python import cantools # This wil...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..ab4f2c0 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -1103,12 +1103,10 @@ def _load_attributes(tokens, definitions): def to_object(attribute): ...
["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_timestamp_absolute", "tests/tes...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
10
146
1,021
0
0.6
1
0.75
1
0.2035
80.8855
8,177
swe_smith::train::44713
swe_smith
train
44,713
mahmoud__glom.fb3c4e76.func_basic__ed5z00k2
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
T attribute access broken for single underscore attributes #### Description When accessing attributes that start with a single underscore using the T object, an AttributeError is raised incorrectly suggesting to use the dunder method syntax. #### Steps/Code to Reproduce ```python from glom import glom, T # This sh...
diff --git a/glom/core.py b/glom/core.py index cee71a3..b1462f1 100644 --- a/glom/core.py +++ b/glom/core.py @@ -1427,11 +1427,11 @@ class TType: __slots__ = ('__ops__',) def __getattr__(self, name): - if name.startswith('__'): + if name.startswith('_'): raise AttributeError('T in...
["glom/test/test_basic.py::test_call_and_target", "glom/test/test_basic.py::test_python_native", "glom/test/test_basic.py::test_ref", "glom/test/test_basic.py::test_api_repr", "glom/test/test_check.py::test_check_basic", "glom/test/test_cli.py::test_main_python_full_spec_python_target", "glom/test/test_error.py::test_e...
["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
32
1,100
0
0.6
1
0.75
1
0.203333
80.885
8,178
swe_smith::train::17927
swe_smith
train
17,927
pyasn1__pyasn1.0f07d724.func_pm_ctrl_shuffle__k4ces9h5
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
Choice.setComponentByPosition returns early without setting component #### Description When calling `setComponentByPosition` on a Choice object, the method returns early before actually setting the component value, causing the Choice to remain uninitialized. #### Steps/Code to Reproduce ```python from pyasn1.type i...
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py index 9aff5e6..1a2251b 100644 --- a/pyasn1/type/univ.py +++ b/pyasn1/type/univ.py @@ -3089,6 +3089,12 @@ class Choice(Set): verifyConstraints=True, matchTags=True, match...
["tests/codec/ber/test_decoder.py::ChoiceDecoderTestCase::testBySpec", "tests/codec/ber/test_decoder.py::ChoiceDecoderTestCase::testExplicitTag", "tests/codec/ber/test_decoder.py::ChoiceDecoderTestCase::testExplicitTagUndefLength", "tests/codec/ber/test_decoder.py::ChoiceDecoderTestCase::testUndefLength", "tests/codec/...
["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
47
960
0
0.6
1
0.75
1
0.203333
80.885
8,179
swe_smith::train::33587
swe_smith
train
33,587
pallets__click.fde47b4b.func_basic__b6414fba
swesmith/pallets__click.fde47b4b
pallets/click
python
null
ClickException error messages are reversed #### Description When a ClickException is raised, the error message appears to be reversed (displayed backwards). This affects all error messages throughout the Click library. #### Steps/Code to Reproduce ```python import click @click.command() @click.option('--count', ty...
diff --git a/src/click/exceptions.py b/src/click/exceptions.py index c41c206..bd4294b 100644 --- a/src/click/exceptions.py +++ b/src/click/exceptions.py @@ -31,10 +31,8 @@ class ClickException(Exception): def __init__(self, message: str) -> None: super().__init__(message) - # The context will be ...
["tests/test_arguments.py::test_nargs_err", "tests/test_arguments.py::test_defaults_for_nargs", "tests/test_basic.py::test_file_lazy_mode", "tests/test_basic.py::test_path_option", "tests/test_basic.py::test_choice_option", "tests/test_basic.py::test_choice_argument", "tests/test_basic.py::test_datetime_option_default"...
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
1
6
24
1,100
0
0.6
1
0.75
1
0.203333
80.885
8,180
swe_smith::train::24904
swe_smith
train
24,904
marshmallow-code__marshmallow.9716fc62.func_pm_remove_loop__05qjpy6r
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Schema unknown field handling broken after recent changes #### Description Schema deserialization is not properly handling unknown fields anymore. When loading data with unknown fields, the schema is not respecting the `unknown` parameter settings for INCLUDE, EXCLUDE, and RAISE behaviors. #### Steps/Code to Reprodu...
diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py index e21768e..a3d5b24 100644 --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -676,18 +676,7 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta): field_obj.data_key if field_obj.data_key is not None else field_n...
["tests/test_deserialization.py::TestSchemaDeserialization::test_unknown_fields_deserialization", "tests/test_deserialization.py::TestSchemaDeserialization::test_unknown_fields_deserialization_precedence", "tests/test_deserialization.py::TestSchemaDeserialization::test_unknown_fields_deserialization_with_data_key", "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
11
21
1,000
0
0.6
1
0.75
1
0.203333
80.885
8,181
swe_smith::train::40012
swe_smith
train
40,012
scanny__python-pptx.278b47b1.combine_file__7uwpqtef
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
GroupShape click_action property returns ActionSetting instead of raising TypeError #### Description The `click_action` property on `GroupShape` is supposed to raise a `TypeError` since group shapes cannot have click actions, but it's now returning an `ActionSetting` object instead. #### Steps/Code to Reproduce ```...
diff --git a/src/pptx/shapes/group.py b/src/pptx/shapes/group.py index 7173758..41340eb 100644 --- a/src/pptx/shapes/group.py +++ b/src/pptx/shapes/group.py @@ -29,7 +29,11 @@ class GroupShape(BaseShape): A group shape cannot have a click action or hover action. """ - raise TypeError("a group...
["tests/shapes/test_group.py::DescribeGroupShape::it_raises_on_access_click_action", "tests/shapes/test_group.py::DescribeGroupShape::it_provides_access_to_its_shadow"]
["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
8
2
1,060
0
0.6
1
0.75
1
0.203333
80.885
8,182
swe_smith::train::23845
swe_smith
train
23,845
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__bywozy8m
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
SRS file parsing fails with IndexError for files with 3 sections #### Description When parsing SRS files that have exactly 3 sections, the `split_lines` function in `sunpy/io/special/srs.py` raises an `IndexError: list index out of range`. This affects multiple SRS test files and breaks the ability to read certain SR...
diff --git a/sunpy/io/special/srs.py b/sunpy/io/special/srs.py index bde7f94..df62aad 100644 --- a/sunpy/io/special/srs.py +++ b/sunpy/io/special/srs.py @@ -167,11 +167,11 @@ def split_lines(file_lines): t2_lines[1:] = _try_drop_empty_column("COMMENT", t2_lines[1:], expected_pattern_dict) if len(section...
["sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150906SRS.txt-5]", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150306SRS.txt-4]", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150101SRS.txt-9]", "sunpy/io/tests/test_s...
["sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/19960106SRS.txt-4]", "sunpy/io/tests/test_srs.py::test_parse_longitude[N10W05-5]", "sunpy/io/tests/test_srs.py::test_parse_longitude[N89E00-0]", "sunpy/io/tests/test_srs.py::test_parse_longitude[S33E02--2]", "sunpy/io/tests/test_srs.py::test...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
7
11
1,080
0
0.6
1
0.75
1
0.203333
80.885
8,183
swe_smith::train::33489
swe_smith
train
33,489
pallets__click.fde47b4b.func_basic__66846e32
swesmith/pallets__click.fde47b4b
pallets/click
python
null
String and bytes values now incorrectly accepted as iterable defaults #### Description When setting default values for parameters that expect iterables, string and bytes values are now being accepted and processed character by character instead of being rejected as invalid defaults. #### Steps/Code to Reproduce ```...
diff --git a/src/click/core.py b/src/click/core.py index abe9fa9..3532dfd 100644 --- a/src/click/core.py +++ b/src/click/core.py @@ -1941,10 +1941,10 @@ def _check_iter(value: t.Any) -> cabc.Iterator[t.Any]: """Check if the value is iterable but not a string. Raises a type error, or return an iterator over th...
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_envvar_only_if_values_empty", "tests/test_arguments.py::test_empty_nargs", "tests/test_arguments.py::test_eat_options",...
["tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs_tup_composite[opts2]", "tests/test_arguments.py::test_nargs_tup_composite[opts3]", "tests/test_arguments.py::test_nargs_err", "tests/test_arguments.py::test_bytes...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
1
6
48
1,099
0
0.6
1
0.75
1
0.203167
80.8845
8,184
swe_smith::train::43808
swe_smith
train
43,808
pydata__patsy.a5d16484.combine_file__nfkmhovs
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Stateful transforms broken after recent changes I'm getting errors when using stateful transforms like `center()` and `standardize()`. The transforms seem to be calling methods in the wrong order and passing arguments incorrectly. #### Steps/Code to Reproduce ```python import numpy as np from patsy.state import cent...
diff --git a/patsy/state.py b/patsy/state.py index 8d674ba..3563ca7 100644 --- a/patsy/state.py +++ b/patsy/state.py @@ -53,9 +53,9 @@ def stateful_transform(class_): @wraps(class_) def stateful_transform_wrapper(*args, **kwargs): transform = class_() - transform.memorize_chunk(*args, **kwargs...
["patsy/mgcv_cubic_splines.py::test_crs_errors", "patsy/mgcv_cubic_splines.py::test_te_errors", "patsy/mgcv_cubic_splines.py::test_te_1smooth", "patsy/splines.py::test_bs_0degree", "patsy/splines.py::test_bs_errors", "patsy/test_state.py::test_stateful_transform_wrapper", "patsy/test_state.py::test_Standardize"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
10
7
1,019
0
0.6
1
0.75
1
0.203167
80.8845
8,185
swe_smith::train::6817
swe_smith
train
6,817
joke2k__faker.8b401a7d.func_pm_remove_cond__oyamf48f
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
zip() method fails with UnboundLocalError when using default compression #### Description The `zip()` method in the misc provider throws an `UnboundLocalError` when called without specifying a compression parameter or when using compression types other than 'bzip2', 'bz2', 'lzma', or 'xz'. #### Steps/Code to Reprodu...
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py index 70f20ec..b27de72 100644 --- a/faker/providers/misc/__init__.py +++ b/faker/providers/misc/__init__.py @@ -238,18 +238,10 @@ class Provider(BaseProvider): raise ValueError( "`num_files`, `min_file_size`, ...
["tests/providers/test_misc.py::TestMiscProvider::test_zip_one_byte_undersized", "tests/providers/test_misc.py::TestMiscProvider::test_zip_exact_minimum_size", "tests/providers/test_misc.py::TestMiscProvider::test_zip_over_minimum_size", "tests/providers/test_misc.py::TestMiscProvider::test_zip_compression_py3", "tests...
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
9
5
1,039
0
0.6
1
0.75
1
0.203167
80.8845
8,186
swe_smith::train::27908
swe_smith
train
27,908
jsvine__pdfplumber.02ff4313.func_pm_ctrl_shuffle__zhw8iqv9
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
find_table method returns undefined variable when no tables found #### Description The `find_table` method raises an `UnboundLocalError` when trying to access an undefined variable `largest` before it's assigned. This happens when the method attempts to return the largest table but the variable is referenced before b...
diff --git a/pdfplumber/page.py b/pdfplumber/page.py index 71330d8..ab1ce5d 100644 --- a/pdfplumber/page.py +++ b/pdfplumber/page.py @@ -491,20 +491,19 @@ class Page(Container): def find_table( self, table_settings: Optional[T_table_settings] = None ) -> Optional[Table]: - tset = TableSettings...
["tests/test_ca_warn_report.py::Test::test_parse", "tests/test_dedupe_chars.py::Test::test_extract_table", "tests/test_issues.py::Test::test_issue_1181", "tests/test_issues.py::Test::test_issue_140", "tests/test_issues.py::Test::test_issue_216", "tests/test_nics_report.py::Test::test_plain", "tests/test_nics_report.py:...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
13
12
959
0
0.6
1
0.75
1
0.203167
80.8845
8,187
swe_smith::train::1731
swe_smith
train
1,731
agronholm__typeguard.b6a7e438.combine_module__wt517jkg
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
UnboundLocalError when using typeguard decorators #### Description When using `@typechecked` decorator or other typeguard functionality, getting `UnboundLocalError: local variable 'target_name' referenced before assignment` and similar errors for other variables. #### Steps/Code to Reproduce ```python from typeguar...
diff --git a/src/typeguard/_decorators.py b/src/typeguard/_decorators.py index a6c20cb..f0f7ce5 100644 --- a/src/typeguard/_decorators.py +++ b/src/typeguard/_decorators.py @@ -36,7 +36,6 @@ def make_cell(value: object) -> _Cell: def find_target_function( new_code: CodeType, target_path: Sequence[str], firstlinen...
["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[importhook]", "tests/test_suppression.py::test_contextmanager_typechecked", "...
["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
9
59
1,039
0
0.6
1
0.75
1
0.203167
80.8845
8,188
swe_smith::train::43997
swe_smith
train
43,997
pydata__patsy.a5d16484.func_basic__di24tglu
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
`_row_tensor_product` raises wrong exception type for invalid inputs #### Description The `_row_tensor_product` function is raising `TypeError` instead of `ValueError` for certain invalid input cases. This causes issues when the function is called with empty lists or 1D arrays. #### Steps/Code to Reproduce ```pytho...
diff --git a/patsy/mgcv_cubic_splines.py b/patsy/mgcv_cubic_splines.py index 5f93680..d4ed08e 100644 --- a/patsy/mgcv_cubic_splines.py +++ b/patsy/mgcv_cubic_splines.py @@ -182,13 +182,14 @@ def _row_tensor_product(dms): def test__row_tensor_product_errors(): import pytest - pytest.raises(ValueError, _row_te...
["patsy/mgcv_cubic_splines.py::test__row_tensor_product_errors"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
7
1
1,079
0
0.6
1
0.75
1
0.203167
80.8845
8,189
swe_smith::train::38034
swe_smith
train
38,034
weaveworks__grafanalib.5c3b17ed.combine_file__p4u5pipd
swesmith/weaveworks__grafanalib.5c3b17ed
weaveworks/grafanalib
python
null
DashboardEncoder serialization broken for objects with to_json_data method #### Description JSON serialization fails when trying to serialize dashboard objects that have a `to_json_data` method. The encoder appears to be calling the wrong method or handling the serialization logic incorrectly. #### Steps/Code to Rep...
diff --git a/grafanalib/_gen.py b/grafanalib/_gen.py index 4094edf..ee0c734 100644 --- a/grafanalib/_gen.py +++ b/grafanalib/_gen.py @@ -20,8 +20,8 @@ class DashboardEncoder(json.JSONEncoder): def default(self, obj): to_json_data = getattr(obj, 'to_json_data', None) if to_json_data: - ...
["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_logs_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_...
["grafanalib/tests/test_cloudwatch.py::test_cloudwatch_logs_insights_target", "grafanalib/tests/test_core.py::test_template_defaults", "grafanalib/tests/test_core.py::test_custom_template_ok", "grafanalib/tests/test_core.py::test_custom_template_dont_override_options", "grafanalib/tests/test_core.py::test_table", "graf...
jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed
true
null
1
6
12
1,098
0
0.6
1
0.75
1
0.203
80.884
8,190
swe_smith::train::7151
swe_smith
train
7,151
cantools__cantools.0c6a7871.combine_module__cjsnnrd5
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
CDD file parsing fails with AttributeError when loading diagnostic databases #### Description When loading CDD files for diagnostic databases, the parser fails with `AttributeError: 'NoneType' object has no attribute 'find'`. This appears to affect both big-endian and little-endian CDD files. #### Steps/Code to Repr...
diff --git a/src/cantools/database/can/signal.py b/src/cantools/database/can/signal.py index c518727..c054ab4 100644 --- a/src/cantools/database/can/signal.py +++ b/src/cantools/database/can/signal.py @@ -167,7 +167,8 @@ class Signal: :return: The calculated scaled value """ - retu...
["tests/test_database.py::CanToolsDatabaseTest::test_system_3_arxml", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
2
21
9
798
0
0.6
1
0.75
1
0.203
80.884
8,191
swe_smith::train::24895
swe_smith
train
24,895
marshmallow-code__marshmallow.9716fc62.func_pm_remove_cond__41y96ne6
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Schema load_fields not populated causing "Unknown field" errors #### Description When loading data with a schema, all fields are being treated as unknown fields and validation fails with "Unknown field" errors. This affects basic schema functionality where defined fields should be recognized during deserialization. ...
diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py index e21768e..c0023db 100644 --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -974,10 +974,6 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta): field_names = field_names - self.exclude invalid_fields |= s...
["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[raise]", "tests/test_decorators.py::TestPassOriginal::test_pass_original_single", "tests/test_decorators.py::TestPassOriginal::te...
["tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorated_processor_inheritance", "tests/test_decorators.py::test_pre_dump_is_invoked_before_implicit_field_generation", "tests/tes...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
7
188
1,078
0
0.6
1
0.75
1
0.203
80.884
8,192
swe_smith::train::19184
swe_smith
train
19,184
seperman__deepdiff.ed252022.func_pm_op_swap__jweh8rbe
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepSearch fails with TypeError when searching in dictionaries #### Description When using DeepSearch to search for items in dictionaries, a TypeError is raised due to incorrect string formatting in the search functionality. #### Steps/Code to Reproduce ```python from deepdiff import DeepSearch obj = {'long': 'som...
diff --git a/deepdiff/search.py b/deepdiff/search.py index ae86ce0..f09a9e2 100644 --- a/deepdiff/search.py +++ b/deepdiff/search.py @@ -206,7 +206,7 @@ class DeepSearch(dict): for item_key in obj_keys: if not print_as_attribute and isinstance(item_key, strings): - item_key_str = ...
["tests/test_search.py::TestDeepSearch::test_int_in_dictionary", "tests/test_search.py::TestDeepSearch::test_string_in_dictionary", "tests/test_search.py::TestDeepSearch::test_string_in_dictionary_case_insensitive", "tests/test_search.py::TestDeepSearch::test_string_in_dictionary_key_case_insensitive_partial", "tests/t...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
9
16
1,038
0
0.6
1
0.75
1
0.203
80.884
8,193
r2e_gym::train::317
r2e_gym
train
317
orange3__eb3d6ecff8e8cb3d72ac54c29977bd588c9104a7
orange3
biolab/orange3
python
eb3d6ecff8e8cb3d72ac54c29977bd588c9104a7
**Title:** Pickled Variables Fail Backward Compatibility After Recent Equality and Hash Changes **Description:** After merging recent changes that modify the equality and hashing mechanisms of variables, attempts to pickle and unpickle `DiscreteVariable` instances no longer maintain their expected behavior. Specifical...
diff --git a/Orange/data/variable.py b/Orange/data/variable.py --- a/Orange/data/variable.py +++ b/Orange/data/variable.py @@ -353,12 +353,15 @@ var1 = self._get_identical_source(self) var2 = self._get_identical_source(other) # pylint: disable=protected-access - return var1.name == var...
diff --git a/Orange/data/tests/test_variable.py b/Orange/data/tests/test_variable.py --- a/Orange/data/tests/test_variable.py +++ b/Orange/data/tests/test_variable.py @@ -215,18 +215,25 @@ def test_hash_eq(self): a = ContinuousVariable("a") + a1 = ContinuousVariable("a") b1 = ContinuousV...
null
null
namanjain12/orange3_final:eb3d6ecff8e8cb3d72ac54c29977bd588c9104a7
true
null
1
9
null
1,750
0
0.75
1
0.6375
1
0.321667
80.88375
8,194
swe_smith::train::2432
swe_smith
train
2,432
pdfminer__pdfminer.six.1a8bd2f7.func_pm_ctrl_invert_if__sdt9eh5s
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFSimpleFont encoding logic inverted causing KeyError on fonts without Encoding When processing PDF fonts that don't have an "Encoding" key in their specification, the code incorrectly tries to access the non-existent key instead of using the default encoding. #### Steps/Code to Reproduce ```python from pdfminer.hi...
diff --git a/pdfminer/pdffont.py b/pdfminer/pdffont.py index e1df40c..875ce88 100644 --- a/pdfminer/pdffont.py +++ b/pdfminer/pdffont.py @@ -956,22 +956,21 @@ class PDFSimpleFont(PDFFont): # built-in encoding or a dictionary that describes # the differences. if "Encoding" in spec: - ...
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "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::test_issue_566_cid_range", "tests/test_highlevel_extract...
["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
9
46
1,037
0
0.6
1
0.75
1
0.202833
80.8835
8,195
swe_smith::train::14171
swe_smith
train
14,171
python-openxml__python-docx.0cf6d71f.func_pm_ctrl_shuffle__0hn2yqtk
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
tc_at_grid_offset method always raises ValueError immediately #### Description The `tc_at_grid_offset` method in `CT_Row` class always raises a `ValueError` immediately when called, regardless of the input parameters or table structure. #### Steps/Code to Reproduce ```python from docx import Document from docx.oxml...
diff --git a/src/docx/oxml/table.py b/src/docx/oxml/table.py index e38d585..ff72acb 100644 --- a/src/docx/oxml/table.py +++ b/src/docx/oxml/table.py @@ -77,12 +77,12 @@ class CT_Row(BaseOxmlElement): return trPr.grid_before def tc_at_grid_offset(self, grid_offset: int) -> CT_Tc: + + raise ValueEr...
["tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[2-1-1-top-0]", "tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[4-2-1-top-1]", "tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_extents_to_help[2-0-1-bottom-2]", "tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_ext...
["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
9
17
1,037
0
0.6
1
0.75
1
0.202833
80.8835
8,196
swe_smith::train::44914
swe_smith
train
44,914
mahmoud__glom.fb3c4e76.func_pm_ctrl_shuffle__41uz9js5
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
Group spec fails with UnboundLocalError when target is empty #### Description When using `Group` with an empty target, the code raises an `UnboundLocalError` because the `ret` variable is referenced before assignment in the iteration loop. #### Steps/Code to Reproduce ```python from glom import glom, Group, T # Th...
diff --git a/glom/grouping.py b/glom/grouping.py index 122bd08..c35b9cf 100644 --- a/glom/grouping.py +++ b/glom/grouping.py @@ -73,9 +73,12 @@ class Group: self.spec = spec def glomit(self, target, scope): - scope[MODE] = GROUP scope[CUR_AGG] = None # reset aggregation tripwire for sub...
["glom/test/test_error.py::test_all_public_errors", "glom/test/test_grouping.py::test_bucketing", "glom/test/test_grouping.py::test_corner_cases", "glom/test/test_grouping.py::test_agg", "glom/test/test_grouping.py::test_limit", "glom/test/test_grouping.py::test_reduce", "glom/test/test_grouping.py::test_sample"]
["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
15
7
917
0
0.6
1
0.75
1
0.202833
80.8835
8,197
swe_smith::train::43035
swe_smith
train
43,035
gawel__pyquery.811cd048.func_basic__6aehqmva
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
FlexibleElement __call__ method breaks when pget is no_default #### Description When using PyQuery elements that have FlexibleElement properties without a getter method defined, accessing the property raises a `ValueError: Invalid argument count` instead of the expected `NotImplementedError`. #### Steps/Code to Repr...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..e6d11ca 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -135,14 +135,16 @@ class FlexibleElement(object): """real element to support set/get/del attr and item and js call style""" def __call__(prop, *a...
["docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/tips.rst::tips.rst", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.hide", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.serialize", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.serialize_array", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.serialize_d...
["README.rst::README.rst", "docs/manipulating.rst::manipulating.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/scrap.rst::scrap.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselectpatch.JQueryTranslator.xpath_button_pseudo", "pyquery/cssselectpatch.py::pyquery.cssselect...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
10
32
1,017
0
0.6
1
0.75
1
0.202833
80.8835
8,198
swe_smith::train::23003
swe_smith
train
23,003
graphql-python__graphene.82903263.pr_1495
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
# Enum objects cannot be pickled ## Code Sample ```python import pickle from graphene import Enum class PickleEnum(Enum): A = 1 B = 2 # Try to pickle and unpickle an enum value a = PickleEnum.A pickled = pickle.dumps(a) restored = pickle.loads(pickled) # This fails ``` ## Problem description When trying ...
diff --git a/graphene/types/enum.py b/graphene/types/enum.py index bc61cd4..1909ce2 100644 --- a/graphene/types/enum.py +++ b/graphene/types/enum.py @@ -31,11 +31,9 @@ class EnumMeta(SubclassWithMeta_Meta): # with the enum values. enum_members.pop("Meta", None) enum = PyEnum(cls.__name__, enu...
["graphene/tests/issues/test_881.py::test_enums_pickling"]
["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i...
jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263
true
null
1
6
1
1,097
0
0.6
1
0.75
1
0.202833
80.8835
8,199
swe_smith::train::51599
swe_smith
train
51,599
pydicom__pydicom.7d361b3d.combine_module__9969gtre
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
## `write_string` function broken due to variable reference before assignment #### Description The `write_string` function in `filewriter.py` is causing `UnboundLocalError` when trying to write string data elements. The variable `val` is being referenced before it's assigned, making the function completely unusable. ...
diff --git a/src/pydicom/datadict.py b/src/pydicom/datadict.py index b4f9f3a..c947a5c 100644 --- a/src/pydicom/datadict.py +++ b/src/pydicom/datadict.py @@ -298,7 +298,7 @@ def dictionary_is_retired(tag: TagType) -> bool: KeyError If the tag is not present in the DICOM data dictionary. """ - retur...
["tests/test_charset.py::TestCharset::test_charset_patient_names[chrArab-\\u0642\\u0628\\u0627\\u0646\\u064a^\\u0644\\u0646\\u0632\\u0627\\u0631]", "tests/test_charset.py::TestCharset::test_charset_patient_names[chrFren-Buc^J\\xe9r\\xf4me]", "tests/test_charset.py::TestCharset::test_charset_patient_names[chrFrenMulti-B...
["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
9
184
1,036
0
0.6
1
0.75
1
0.202667
80.883