task_id
string
instance_id
string
split
string
repo
string
base_commit
string
problem_statement
string
prompt
string
workspace_paths_json
string
gold_patch
string
test_patch
string
fail_to_pass_json
string
pass_to_pass_json
string
hints_text
string
version
string
difficulty
string
image
string
eval_script
string
eval_type
string
log_parser
string
environment_setup_commit
string
source_dataset
string
marshmallow-code__marshmallow-1343
marshmallow-code__marshmallow-1343
dev
marshmallow-code/marshmallow
2be2d83a1a9a6d3d9b85804f3ab545cecc409bb0
[version 2.20.0] TypeError: 'NoneType' object is not subscriptable After update from version 2.19.5 to 2.20.0 I got error for code like: ```python from marshmallow import Schema, fields, validates class Bar(Schema): value = fields.String() @validates('value') # <- issue here def validate_valu...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["src/marshmallow/schema.py"]
diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -877,7 +877,7 @@ def _invoke_field_validators(self, unmarshal, data, many): for idx, item in enumerate(data): try: value = ...
diff --git a/tests/test_marshalling.py b/tests/test_marshalling.py --- a/tests/test_marshalling.py +++ b/tests/test_marshalling.py @@ -2,7 +2,7 @@ import pytest -from marshmallow import fields, Schema +from marshmallow import fields, Schema, validates from marshmallow.marshalling import Marshaller, Unmarshaller, ...
["tests/test_marshalling.py::TestUnmarshaller::test_deserialize_wrong_nested_type_with_validates_method"]
["tests/test_marshalling.py::test_missing_is_falsy", "tests/test_marshalling.py::TestMarshaller::test_prefix", "tests/test_marshalling.py::TestMarshaller::test_marshalling_generator", "tests/test_marshalling.py::TestMarshaller::test_default_to_missing", "tests/test_marshalling.py::TestMarshaller::test_serialize_fields_...
Thanks for reporting. I was able to reproduce this on 2.20.0. This is likely a regression from https://github.com/marshmallow-code/marshmallow/pull/1323 . I don't have time to look into it now. Would appreciate a PR.
2.20
swebench/sweb.eval.x86_64.marshmallow-code_1776_marshmallow-1343:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 2be2d83a1a9a6d3d9b85804f3ab545cecc409bb0 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_marshmallow
7015fc4333a2f32cd58c3465296e834acd4496ff
SWE-bench/SWE-bench_Lite
marshmallow-code__marshmallow-1359
marshmallow-code__marshmallow-1359
dev
marshmallow-code/marshmallow
b40a0f4e33823e6d0f341f7e8684e359a99060d1
3.0: DateTime fields cannot be used as inner field for List or Tuple fields Between releases 3.0.0rc8 and 3.0.0rc9, `DateTime` fields have started throwing an error when being instantiated as inner fields of container fields like `List` or `Tuple`. The snippet below works in <=3.0.0rc8 and throws the error below in >=3...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["src/marshmallow/fields.py"]
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -1114,7 +1114,7 @@ def _bind_to_schema(self, field_name, schema): super()._bind_to_schema(field_name, schema) self.format = ( self.format - or g...
diff --git a/tests/test_fields.py b/tests/test_fields.py --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -169,6 +169,20 @@ class OtherSchema(MySchema): assert schema2.fields["foo"].key_field.root == schema2 assert schema2.fields["foo"].value_field.root == schema2 + # Regression test for ...
["tests/test_fields.py::TestParentAndName::test_datetime_list_inner_format"]
["tests/test_fields.py::test_field_aliases[Integer-Integer]", "tests/test_fields.py::test_field_aliases[String-String]", "tests/test_fields.py::test_field_aliases[Boolean-Boolean]", "tests/test_fields.py::test_field_aliases[Url-Url]", "tests/test_fields.py::TestField::test_repr", "tests/test_fields.py::TestField::test_...
Thanks for reporting. I don't think I'll have time to look into this until the weekend. Would you like to send a PR? I'm afraid I don't have any time either, and I don't really have enough context on the `_bind_to_schema` process to make sure I'm not breaking stuff. OK, no problem. @lafrech Will you have a chance to l...
3.0
swebench/sweb.eval.x86_64.marshmallow-code_1776_marshmallow-1359:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff b40a0f4e33823e6d0f341f7e8684e359a99060d1 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_marshmallow
8b3a32614fd4a74e93e9a63a042e74c1fea34466
SWE-bench/SWE-bench_Lite
pvlib__pvlib-python-1072
pvlib__pvlib-python-1072
dev
pvlib/pvlib-python
04a523fafbd61bc2e49420963b84ed8e2bd1b3cf
temperature.fuentes errors when given tz-aware inputs on pandas>=1.0.0 **Describe the bug** When the weather timeseries inputs to `temperature.fuentes` have tz-aware index, an internal call to `np.diff(index)` returns an array of `Timedelta` objects instead of an array of nanosecond ints, throwing an error immediately...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pvlib/temperature.py"]
diff --git a/pvlib/temperature.py b/pvlib/temperature.py --- a/pvlib/temperature.py +++ b/pvlib/temperature.py @@ -599,8 +599,9 @@ def fuentes(poa_global, temp_air, wind_speed, noct_installed, module_height=5, # n.b. the way Fuentes calculates the first timedelta makes it seem like # the value doesn't matter ...
diff --git a/pvlib/tests/test_temperature.py b/pvlib/tests/test_temperature.py --- a/pvlib/tests/test_temperature.py +++ b/pvlib/tests/test_temperature.py @@ -190,3 +190,17 @@ def test_fuentes(filename, inoct): night_difference = expected_tcell[is_night] - actual_tcell[is_night] assert night_difference.max() ...
["pvlib/tests/test_temperature.py::test_fuentes_timezone[Etc/GMT+5]"]
["pvlib/tests/test_temperature.py::test_sapm_cell", "pvlib/tests/test_temperature.py::test_sapm_module", "pvlib/tests/test_temperature.py::test_sapm_cell_from_module", "pvlib/tests/test_temperature.py::test_sapm_ndarray", "pvlib/tests/test_temperature.py::test_sapm_series", "pvlib/tests/test_temperature.py::test_pvsyst...
0.7
swebench/sweb.eval.x86_64.pvlib_1776_pvlib-python-1072:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 04a523fafbd61bc2e49420963b84ed8e2bd1b3cf source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pvlib
6e5148f59c5050e8f7a0084b7ae39e93b80f72e6
SWE-bench/SWE-bench_Lite
pvlib__pvlib-python-1154
pvlib__pvlib-python-1154
dev
pvlib/pvlib-python
0b8f24c265d76320067a5ee908a57d475cd1bb24
pvlib.irradiance.reindl() model generates NaNs when GHI = 0 **Describe the bug** The reindl function should give zero sky diffuse when GHI is zero. Instead it generates NaN or Inf values due to "term3" having a quotient that divides by GHI. **Expected behavior** The reindl function should result in zero sky diff...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pvlib/irradiance.py"]
diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -886,8 +886,9 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra, # these are the () and [] sub-terms of the second term of eqn 8 term1 = 1 - AI term2 = 0.5 * (1 + tools.cosd(s...
diff --git a/pvlib/tests/test_irradiance.py b/pvlib/tests/test_irradiance.py --- a/pvlib/tests/test_irradiance.py +++ b/pvlib/tests/test_irradiance.py @@ -203,7 +203,7 @@ def test_reindl(irrad_data, ephem_data, dni_et): 40, 180, irrad_data['dhi'], irrad_data['dni'], irrad_data['ghi'], dni_et, ephem_da...
["pvlib/tests/test_irradiance.py::test_reindl"]
["pvlib/tests/test_irradiance.py::test_get_extra_radiation[asce-300-1383.636203]", "pvlib/tests/test_irradiance.py::test_get_extra_radiation[asce-300.0-1383.636203]", "pvlib/tests/test_irradiance.py::test_get_extra_radiation[asce-testval2-1383.636203]", "pvlib/tests/test_irradiance.py::test_get_extra_radiation[asce-tes...
Verified. Looks like an easy fix. Verified. Looks like an easy fix.
0.8
swebench/sweb.eval.x86_64.pvlib_1776_pvlib-python-1154:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 0b8f24c265d76320067a5ee908a57d475cd1bb24 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pvlib
ef8ad2fee9840a77d14b0dfd17fc489dd85c9b91
SWE-bench/SWE-bench_Lite
pvlib__pvlib-python-1606
pvlib__pvlib-python-1606
dev
pvlib/pvlib-python
c78b50f4337ecbe536a961336ca91a1176efc0e8
golden-section search fails when upper and lower bounds are equal **Describe the bug** I was using pvlib for sometime now and until now I was always passing a big dataframe containing readings of a long period. Because of some changes in our software architecture, I need to pass the weather readings as a single readin...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pvlib/tools.py"]
diff --git a/pvlib/tools.py b/pvlib/tools.py --- a/pvlib/tools.py +++ b/pvlib/tools.py @@ -341,6 +341,8 @@ def _golden_sect_DataFrame(params, lower, upper, func, atol=1e-8): -------- pvlib.singlediode._pwr_optfcn """ + if np.any(upper - lower < 0.): + raise ValueError('upper >= lower is require...
diff --git a/pvlib/tests/test_tools.py b/pvlib/tests/test_tools.py --- a/pvlib/tests/test_tools.py +++ b/pvlib/tests/test_tools.py @@ -45,6 +45,22 @@ def test__golden_sect_DataFrame_vector(): v, x = tools._golden_sect_DataFrame(params, lower, upper, _obj_test_golden_sect) ...
["pvlib/tests/test_tools.py::test__golden_sect_DataFrame_vector"]
["pvlib/tests/test_tools.py::test_build_kwargs[keys0-input_dict0-expected0]", "pvlib/tests/test_tools.py::test_build_kwargs[keys1-input_dict1-expected1]", "pvlib/tests/test_tools.py::test_build_kwargs[keys2-input_dict2-expected2]", "pvlib/tests/test_tools.py::test_build_kwargs[keys3-input_dict3-expected3]", "pvlib/test...
Confirmed. This appears to be an oversight in `pvlib.tools._golden_section_DataFrame` involving error messaging, likely introduced with #1089 . In this code when processing the content of `data`, photocurrent is 0., hence the shunt resistance is infinite and v_oc is 0. That sets the range for the golden section sear...
0.8
swebench/sweb.eval.x86_64.pvlib_1776_pvlib-python-1606:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff c78b50f4337ecbe536a961336ca91a1176efc0e8 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pvlib
ef8ad2fee9840a77d14b0dfd17fc489dd85c9b91
SWE-bench/SWE-bench_Lite
pvlib__pvlib-python-1707
pvlib__pvlib-python-1707
dev
pvlib/pvlib-python
40e9e978c170bdde4eeee1547729417665dbc34c
regression: iam.physical returns nan for aoi > 90° when n = 1 **Describe the bug** For pvlib==0.9.5, when n = 1 (no reflection) and aoi > 90°, we get nan as result. **To Reproduce** ```python import pvlib pvlib.iam.physical(aoi=100, n=1) ``` returns `nan`. **Expected behavior** The result should be `0`, as...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pvlib/iam.py"]
diff --git a/pvlib/iam.py b/pvlib/iam.py --- a/pvlib/iam.py +++ b/pvlib/iam.py @@ -175,8 +175,12 @@ def physical(aoi, n=1.526, K=4.0, L=0.002, *, n_ar=None): n2costheta2 = n2 * costheta # reflectance of s-, p-polarized, and normal light by the first interface - rho12_s = ((n1costheta1 - n2costheta2) / (n...
diff --git a/pvlib/tests/test_iam.py b/pvlib/tests/test_iam.py --- a/pvlib/tests/test_iam.py +++ b/pvlib/tests/test_iam.py @@ -51,6 +51,18 @@ def test_physical(): assert_series_equal(iam, expected) +def test_physical_n1_L0(): + aoi = np.array([0, 22.5, 45, 67.5, 90, 100, np.nan]) + expected = np.array([1...
["pvlib/tests/test_iam.py::test_physical_n1_L0"]
["pvlib/tests/test_iam.py::test_ashrae", "pvlib/tests/test_iam.py::test_ashrae_scalar", "pvlib/tests/test_iam.py::test_physical", "pvlib/tests/test_iam.py::test_physical_ar", "pvlib/tests/test_iam.py::test_physical_noar", "pvlib/tests/test_iam.py::test_physical_scalar", "pvlib/tests/test_iam.py::test_martin_ruiz", "pvl...
0.9
swebench/sweb.eval.x86_64.pvlib_1776_pvlib-python-1707:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 40e9e978c170bdde4eeee1547729417665dbc34c source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pvlib
6072e0982c3c0236f532ddfa48fbf461180d834e
SWE-bench/SWE-bench_Lite
pvlib__pvlib-python-1854
pvlib__pvlib-python-1854
dev
pvlib/pvlib-python
27a3a07ebc84b11014d3753e4923902adf9a38c0
PVSystem with single Array generates an error **Is your feature request related to a problem? Please describe.** When a PVSystem has a single Array, you can't assign just the Array instance when constructing the PVSystem. ``` mount = pvlib.pvsystem.FixedMount(surface_tilt=35, surface_azimuth=180) array = pvlib....
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pvlib/pvsystem.py"]
diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -101,10 +101,11 @@ class PVSystem: Parameters ---------- - arrays : iterable of Array, optional - List of arrays that are part of the system. If not specified - a single array is created fr...
diff --git a/pvlib/tests/test_pvsystem.py b/pvlib/tests/test_pvsystem.py --- a/pvlib/tests/test_pvsystem.py +++ b/pvlib/tests/test_pvsystem.py @@ -1887,8 +1887,6 @@ def test_PVSystem_multiple_array_creation(): assert pv_system.arrays[0].module_parameters == {} assert pv_system.arrays[1].module_parameters == {...
["pvlib/tests/test_pvsystem.py::test_PVSystem_single_array"]
["pvlib/tests/test_pvsystem.py::test_PVSystem_get_iam[ashrae-model_params0]", "pvlib/tests/test_pvsystem.py::test_PVSystem_get_iam[physical-model_params1]", "pvlib/tests/test_pvsystem.py::test_PVSystem_get_iam[martin_ruiz-model_params2]", "pvlib/tests/test_pvsystem.py::test_PVSystem_multi_array_get_iam", "pvlib/tests/t...
0.9
swebench/sweb.eval.x86_64.pvlib_1776_pvlib-python-1854:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 27a3a07ebc84b11014d3753e4923902adf9a38c0 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pvlib
6072e0982c3c0236f532ddfa48fbf461180d834e
SWE-bench/SWE-bench_Lite
pydicom__pydicom-1139
pydicom__pydicom-1139
dev
pydicom/pydicom
b9fb05c177b685bf683f7f57b2d57374eb7d882d
Make PersonName3 iterable ```python from pydicom import Dataset ds = Dataset() ds.PatientName = 'SomeName' 'S' in ds.PatientName ``` ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: argument of type 'PersonName3' is not iterable ``` I'm not really sure if this is ...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pydicom/valuerep.py"]
diff --git a/pydicom/valuerep.py b/pydicom/valuerep.py --- a/pydicom/valuerep.py +++ b/pydicom/valuerep.py @@ -1,6 +1,5 @@ # Copyright 2008-2018 pydicom authors. See LICENSE file for details. """Special classes for DICOM value representations (VR)""" -from copy import deepcopy from decimal import Decimal import re ...
diff --git a/pydicom/tests/test_valuerep.py b/pydicom/tests/test_valuerep.py --- a/pydicom/tests/test_valuerep.py +++ b/pydicom/tests/test_valuerep.py @@ -427,6 +427,62 @@ def test_hash(self): ) assert hash(pn1) == hash(pn2) + def test_next(self): + """Test that the next function works on ...
["pydicom/tests/test_valuerep.py::TestPersonName::test_next", "pydicom/tests/test_valuerep.py::TestPersonName::test_iterator", "pydicom/tests/test_valuerep.py::TestPersonName::test_contains"]
["pydicom/tests/test_valuerep.py::TestTM::test_pickling", "pydicom/tests/test_valuerep.py::TestDT::test_pickling", "pydicom/tests/test_valuerep.py::TestDA::test_pickling", "pydicom/tests/test_valuerep.py::TestDS::test_empty_value", "pydicom/tests/test_valuerep.py::TestDS::test_float_values", "pydicom/tests/test_valuere...
I think it is reasonable to support at least some `str` methods (definitely `__contains__` for the example above), but there are many that don't make a lot of sense in this context though - e.g. `join`, `ljust`, `maketrans`, `splitlines` just to name a few, but I suppose each would either never be actually used or woul...
2.0
swebench/sweb.eval.x86_64.pydicom_1776_pydicom-1139:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff b9fb05c177b685bf683f7f57b2d57374eb7d882d source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pydicom
9d69811e539774f296c2f289839147e741251716
SWE-bench/SWE-bench_Lite
pydicom__pydicom-1256
pydicom__pydicom-1256
dev
pydicom/pydicom
49a3da4a3d9c24d7e8427a25048a1c7d5c4f7724
from_json does not correctly convert BulkDataURI's in SQ data elements **Describe the bug** When a DICOM object contains large data elements in SQ elements and is converted to JSON, those elements are correctly turned into BulkDataURI's. However, when the JSON is converted back to DICOM using from_json, the BulkDataUR...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pydicom/jsonrep.py"]
diff --git a/pydicom/jsonrep.py b/pydicom/jsonrep.py --- a/pydicom/jsonrep.py +++ b/pydicom/jsonrep.py @@ -226,7 +226,8 @@ def get_sequence_item(self, value): value_key = unique_value_keys[0] elem = DataElement.from_json( self.dataset_class, key, vr, - ...
diff --git a/pydicom/tests/test_json.py b/pydicom/tests/test_json.py --- a/pydicom/tests/test_json.py +++ b/pydicom/tests/test_json.py @@ -354,3 +354,25 @@ def bulk_data_reader(tag, vr, value): ds = Dataset().from_json(json.dumps(json_data), bulk_data_reader) assert b'xyzzy' == ds[0x00091002].value ...
["pydicom/tests/test_json.py::TestBinary::test_bulk_data_reader_is_called_within_SQ"]
["pydicom/tests/test_json.py::TestPersonName::test_json_pn_from_file", "pydicom/tests/test_json.py::TestPersonName::test_pn_components_to_json", "pydicom/tests/test_json.py::TestPersonName::test_pn_components_from_json", "pydicom/tests/test_json.py::TestPersonName::test_empty_value", "pydicom/tests/test_json.py::TestPe...
2.1
swebench/sweb.eval.x86_64.pydicom_1776_pydicom-1256:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 49a3da4a3d9c24d7e8427a25048a1c7d5c4f7724 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pydicom
506ecea8f378dc687d5c504788fc78810a190b7a
SWE-bench/SWE-bench_Lite
pydicom__pydicom-1413
pydicom__pydicom-1413
dev
pydicom/pydicom
f909c76e31f759246cec3708dadd173c5d6e84b1
Error : a bytes-like object is required, not 'MultiValue' Hello, I am getting following error while updating the tag LongTrianglePointIndexList (0066,0040), **TypeError: a bytes-like object is required, not 'MultiValue'** I noticed that the error gets produced only when the VR is given as "OL" , works fine with...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pydicom/dataelem.py"]
diff --git a/pydicom/dataelem.py b/pydicom/dataelem.py --- a/pydicom/dataelem.py +++ b/pydicom/dataelem.py @@ -433,13 +433,24 @@ def value(self) -> Any: @value.setter def value(self, val: Any) -> None: """Convert (if necessary) and set the value of the element.""" + # Ignore backslash characte...
diff --git a/pydicom/tests/test_valuerep.py b/pydicom/tests/test_valuerep.py --- a/pydicom/tests/test_valuerep.py +++ b/pydicom/tests/test_valuerep.py @@ -1546,3 +1546,16 @@ def test_set_value(vr, pytype, vm0, vmN, keyword): elem = ds[keyword] assert elem.value == list(vmN) assert list(vmN) == elem.value...
["pydicom/tests/test_valuerep.py::test_assigning_bytes[OD-bytes-vm017-vmN17-DoubleFloatPixelData]", "pydicom/tests/test_valuerep.py::test_assigning_bytes[OL-bytes-vm019-vmN19-TrackPointIndexList]", "pydicom/tests/test_valuerep.py::test_assigning_bytes[OV-bytes-vm020-vmN20-SelectorOVValue]"]
["pydicom/tests/test_valuerep.py::TestTM::test_pickling", "pydicom/tests/test_valuerep.py::TestTM::test_pickling_tm_from_time", "pydicom/tests/test_valuerep.py::TestTM::test_str_and_repr", "pydicom/tests/test_valuerep.py::TestTM::test_new_empty_str", "pydicom/tests/test_valuerep.py::TestTM::test_new_str_conversion", "p...
Also tried following code to get the byte string, but same error. 1. data=array.array('L', indexData).tostring() # to convert to long -> same error 2. data=array.array('Q', indexData).tostring() # to convert to long long -> same error O* VRs should be `bytes`. Use `array.tobytes()` instead of `tostring()`? A...
2.1
swebench/sweb.eval.x86_64.pydicom_1776_pydicom-1413:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff f909c76e31f759246cec3708dadd173c5d6e84b1 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pydicom
506ecea8f378dc687d5c504788fc78810a190b7a
SWE-bench/SWE-bench_Lite
pydicom__pydicom-1694
pydicom__pydicom-1694
dev
pydicom/pydicom
f8cf45b6c121e5a4bf4a43f71aba3bc64af3db9c
Dataset.to_json_dict can still generate exceptions when suppress_invalid_tags=True **Describe the bug** I'm using `Dataset.to_json_dict(suppress_invalid_tags=True)` and can live with losing invalid tags. Unfortunately, I can still trigger an exception with something like `2.0` in an `IS` field. **Expected behavio...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pydicom/dataset.py"]
diff --git a/pydicom/dataset.py b/pydicom/dataset.py --- a/pydicom/dataset.py +++ b/pydicom/dataset.py @@ -2492,8 +2492,8 @@ def to_json_dict( json_dataset = {} for key in self.keys(): json_key = '{:08X}'.format(key) - data_element = self[key] try: + ...
diff --git a/pydicom/tests/test_json.py b/pydicom/tests/test_json.py --- a/pydicom/tests/test_json.py +++ b/pydicom/tests/test_json.py @@ -7,7 +7,7 @@ from pydicom import dcmread from pydicom.data import get_testdata_file -from pydicom.dataelem import DataElement +from pydicom.dataelem import DataElement, RawDataEl...
["pydicom/tests/test_json.py::TestDataSetToJson::test_suppress_invalid_tags_with_failed_dataelement"]
["pydicom/tests/test_json.py::TestPersonName::test_json_pn_from_file", "pydicom/tests/test_json.py::TestPersonName::test_pn_components_to_json", "pydicom/tests/test_json.py::TestPersonName::test_pn_components_from_json", "pydicom/tests/test_json.py::TestPersonName::test_empty_value", "pydicom/tests/test_json.py::TestPe...
2.3
swebench/sweb.eval.x86_64.pydicom_1776_pydicom-1694:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff f8cf45b6c121e5a4bf4a43f71aba3bc64af3db9c source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pydicom
a8be738418dee0a2b93c241fbd5e0bc82f4b8680
SWE-bench/SWE-bench_Lite
pydicom__pydicom-901
pydicom__pydicom-901
dev
pydicom/pydicom
3746878d8edf1cbda6fbcf35eec69f9ba79301ca
pydicom should not define handler, formatter and log level. The `config` module (imported when pydicom is imported) defines a handler and set the log level for the pydicom logger. This should not be the case IMO. It should be the responsibility of the client code of pydicom to configure the logging module to its conven...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pydicom/config.py"]
diff --git a/pydicom/config.py b/pydicom/config.py --- a/pydicom/config.py +++ b/pydicom/config.py @@ -62,10 +62,7 @@ def DS_decimal(use_Decimal_boolean=True): # Logging system and debug function to change logging level logger = logging.getLogger('pydicom') -handler = logging.StreamHandler() -formatter = logging.Fo...
diff --git a/pydicom/tests/test_config.py b/pydicom/tests/test_config.py new file mode 100644 --- /dev/null +++ b/pydicom/tests/test_config.py @@ -0,0 +1,107 @@ +# Copyright 2008-2019 pydicom authors. See LICENSE file for details. +"""Unit tests for the pydicom.config module.""" + +import logging +import sys + +import ...
["pydicom/tests/test_config.py::TestDebug::test_default", "pydicom/tests/test_config.py::TestDebug::test_debug_on_handler_null", "pydicom/tests/test_config.py::TestDebug::test_debug_off_handler_null", "pydicom/tests/test_config.py::TestDebug::test_debug_on_handler_stream", "pydicom/tests/test_config.py::TestDebug::test...
[]
In addition, I don't understand what the purpose of the `config.debug` function since the default behavor of the logging module in absence of configuartion seems to already be the one you want. From https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library: > If the using application does not...
1.3
swebench/sweb.eval.x86_64.pydicom_1776_pydicom-901:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 3746878d8edf1cbda6fbcf35eec69f9ba79301ca source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pydicom
7241f5d9db0de589b230bb84212fbb643a7c86c3
SWE-bench/SWE-bench_Lite
pylint-dev__astroid-1196
pylint-dev__astroid-1196
dev
pylint-dev/astroid
39c2a9805970ca57093d32bbaf0e6a63e05041d8
getitem does not infer the actual unpacked value When trying to call `Dict.getitem()` on a context where we have a dict unpacking of anything beside a real dict, astroid currently raises an `AttributeError: 'getitem'`, which has 2 problems: - The object might be a reference against something constant, this pattern i...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["astroid/nodes/node_classes.py"]
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -2346,24 +2346,33 @@ def itered(self): """ return [key for (key, _) in self.items] - def getitem(self, index, context=None): + def getitem( + ...
diff --git a/tests/unittest_python3.py b/tests/unittest_python3.py --- a/tests/unittest_python3.py +++ b/tests/unittest_python3.py @@ -5,7 +5,9 @@ import unittest from textwrap import dedent -from astroid import nodes +import pytest + +from astroid import exceptions, nodes from astroid.builder import AstroidBuilde...
["tests/unittest_python3.py::Python3TC::test_unpacking_in_dict_getitem_uninferable", "tests/unittest_python3.py::Python3TC::test_unpacking_in_dict_getitem_with_ref"]
["tests/unittest_python3.py::Python3TC::test_annotation_as_string", "tests/unittest_python3.py::Python3TC::test_annotation_support", "tests/unittest_python3.py::Python3TC::test_as_string", "tests/unittest_python3.py::Python3TC::test_async_comprehensions", "tests/unittest_python3.py::Python3TC::test_async_comprehensions...
2.12
swebench/sweb.eval.x86_64.pylint-dev_1776_astroid-1196:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 39c2a9805970ca57093d32bbaf0e6a63e05041d8 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_astroid
52f6d2d7722db383af035be929f18af5e9fe8cd5
SWE-bench/SWE-bench_Lite
pylint-dev__astroid-1268
pylint-dev__astroid-1268
dev
pylint-dev/astroid
ce5cbce5ba11cdc2f8139ade66feea1e181a7944
'AsStringVisitor' object has no attribute 'visit_unknown' ```python >>> import astroid >>> astroid.nodes.Unknown().as_string() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/tusharsadhwani/code/marvin-python/venv/lib/python3.9/site-packages/astroid/nodes/node_ng.py", line 6...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["astroid/nodes/as_string.py"]
diff --git a/astroid/nodes/as_string.py b/astroid/nodes/as_string.py --- a/astroid/nodes/as_string.py +++ b/astroid/nodes/as_string.py @@ -36,6 +36,7 @@ MatchSingleton, MatchStar, MatchValue, + Unknown, ) # pylint: disable=unused-argument @@ -643,6 +644,9 @@ def visit_property(...
diff --git a/tests/unittest_nodes.py b/tests/unittest_nodes.py --- a/tests/unittest_nodes.py +++ b/tests/unittest_nodes.py @@ -306,6 +306,11 @@ def test_f_strings(self): ast = abuilder.string_build(code) self.assertEqual(ast.as_string().strip(), code.strip()) + @staticmethod + def test_as_stri...
["tests/unittest_nodes.py::AsStringTest::test_as_string_unknown"]
["tests/unittest_nodes.py::AsStringTest::test_3k_annotations_and_metaclass", "tests/unittest_nodes.py::AsStringTest::test_3k_as_string", "tests/unittest_nodes.py::AsStringTest::test_as_string", "tests/unittest_nodes.py::AsStringTest::test_as_string_for_list_containing_uninferable", "tests/unittest_nodes.py::AsStringTes...
Thank you for opening the issue. I don't believe `Unknown().as_string()` is ever called regularly. AFAIK it's only used during inference. What should the string representation of an `Unknown` node be? So not sure this needs to be addressed. Probably just `'Unknown'`. It's mostly only a problem when we do something like...
2.9
swebench/sweb.eval.x86_64.pylint-dev_1776_astroid-1268:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff ce5cbce5ba11cdc2f8139ade66feea1e181a7944 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_astroid
0d1211558670cfefd95b39984b8d5f7f34837f32
SWE-bench/SWE-bench_Lite
pylint-dev__astroid-1333
pylint-dev__astroid-1333
dev
pylint-dev/astroid
d2a5b3c7b1e203fec3c7ca73c30eb1785d3d4d0a
astroid 2.9.1 breaks pylint with missing __init__.py: F0010: error while code parsing: Unable to load file __init__.py ### Steps to reproduce > Steps provided are for Windows 11, but initial problem found in Ubuntu 20.04 > Update 2022-01-04: Corrected repro steps and added more environment details 1. Set up simp...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["astroid/modutils.py"]
diff --git a/astroid/modutils.py b/astroid/modutils.py --- a/astroid/modutils.py +++ b/astroid/modutils.py @@ -297,6 +297,9 @@ def _get_relative_base_path(filename, path_to_check): if os.path.normcase(real_filename).startswith(path_to_check): importable_path = real_filename + # if "var" in path_to_ch...
diff --git a/tests/unittest_modutils.py b/tests/unittest_modutils.py --- a/tests/unittest_modutils.py +++ b/tests/unittest_modutils.py @@ -30,6 +30,7 @@ import tempfile import unittest import xml +from pathlib import Path from xml import etree from xml.etree import ElementTree @@ -189,6 +190,30 @@ def test_load_...
["tests/unittest_modutils.py::ModPathFromFileTest::test_load_packages_without_init"]
["tests/unittest_modutils.py::ModuleFileTest::test_find_egg_module", "tests/unittest_modutils.py::ModuleFileTest::test_find_zipped_module", "tests/unittest_modutils.py::LoadModuleFromNameTest::test_known_values_load_module_from_name_1", "tests/unittest_modutils.py::LoadModuleFromNameTest::test_known_values_load_module_...
I can't seem to reproduce this in my `virtualenv`. This might be specific to `venv`? Needs some further investigation. @interifter Which version of `pylint` are you using? Right, ``pip install pylint astroid==2.9.0``, will keep the local version if you already have one, so I thought it was ``2.12.2`` but that could be ...
2.10
swebench/sweb.eval.x86_64.pylint-dev_1776_astroid-1333:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff d2a5b3c7b1e203fec3c7ca73c30eb1785d3d4d0a source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_astroid
da745538c7236028a22cdf0405f6829fcf6886bc
SWE-bench/SWE-bench_Lite
pylint-dev__astroid-1866
pylint-dev__astroid-1866
dev
pylint-dev/astroid
6cf238d089cf4b6753c94cfc089b4a47487711e5
"TypeError: unsupported format string passed to NoneType.__format__" while running type inference in version 2.12.x ### Steps to reproduce I have no concise reproducer. Exception happens every time I run pylint on some internal code, with astroid 2.12.10 and 2.12.12 (debian bookworm). It does _not_ happen with earli...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["astroid/brain/brain_builtin_inference.py"]
diff --git a/astroid/brain/brain_builtin_inference.py b/astroid/brain/brain_builtin_inference.py --- a/astroid/brain/brain_builtin_inference.py +++ b/astroid/brain/brain_builtin_inference.py @@ -954,8 +954,10 @@ def _infer_str_format_call( try: formatted_string = format_template.format(*pos_values, **ke...
diff --git a/tests/unittest_brain_builtin.py b/tests/unittest_brain_builtin.py --- a/tests/unittest_brain_builtin.py +++ b/tests/unittest_brain_builtin.py @@ -103,6 +103,12 @@ def test_string_format(self, format_string: str) -> None: """ "My name is {fname}, I'm {age}".format(fsname = "Daniel"...
["tests/unittest_brain_builtin.py::TestStringNodes::test_string_format_uninferable[\\n"]
["tests/unittest_brain_builtin.py::BuiltinsTest::test_infer_property", "tests/unittest_brain_builtin.py::TestStringNodes::test_string_format[empty-indexes]", "tests/unittest_brain_builtin.py::TestStringNodes::test_string_format[numbered-indexes]", "tests/unittest_brain_builtin.py::TestStringNodes::test_string_format[na...
Hi @crosser, thanks for the report. > I have no concise reproducer. We might be able to help you distill one. `pylint` produces a crash report, and shows the link in your terminal, like this: ```shell ************* Module a a.py:1:0: F0002: a.py: Fatal error while checking 'a.py'. Please open an issue in o...
2.13
swebench/sweb.eval.x86_64.pylint-dev_1776_astroid-1866:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 6cf238d089cf4b6753c94cfc089b4a47487711e5 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_astroid
fe058bff95745371df5796286d33677c21137847
SWE-bench/SWE-bench_Lite
pylint-dev__astroid-1978
pylint-dev__astroid-1978
dev
pylint-dev/astroid
0c9ab0fe56703fa83c73e514a1020d398d23fa7f
Deprecation warnings from numpy ### Steps to reproduce 1. Run pylint over the following test case: ``` """Test case""" import numpy as np value = np.random.seed(1234) ``` ### Current behavior ``` /home/bje/source/nemo/myenv/lib/python3.10/site-packages/astroid/raw_building.py:470: FutureWarning: In the...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["astroid/raw_building.py"]
diff --git a/astroid/raw_building.py b/astroid/raw_building.py --- a/astroid/raw_building.py +++ b/astroid/raw_building.py @@ -10,11 +10,14 @@ import builtins import inspect +import io +import logging import os import sys import types import warnings from collections.abc import Iterable +from contextlib import...
diff --git a/tests/unittest_raw_building.py b/tests/unittest_raw_building.py --- a/tests/unittest_raw_building.py +++ b/tests/unittest_raw_building.py @@ -8,8 +8,15 @@ # For details: https://github.com/PyCQA/astroid/blob/main/LICENSE # Copyright (c) https://github.com/PyCQA/astroid/blob/main/CONTRIBUTORS.txt +from ...
["tests/unittest_raw_building.py::test_build_module_getattr_catch_output"]
["tests/unittest_raw_building.py::RawBuildingTC::test_attach_dummy_node", "tests/unittest_raw_building.py::RawBuildingTC::test_build_class", "tests/unittest_raw_building.py::RawBuildingTC::test_build_from_import", "tests/unittest_raw_building.py::RawBuildingTC::test_build_function", "tests/unittest_raw_building.py::Raw...
This seems very similar to https://github.com/PyCQA/astroid/pull/1514 that was fixed in 2.12.0. I'm running 2.12.13 (> 2.12.0), so the fix isn't working in this case? I don't know why #1514 did not fix this, I think we were capturing both stdout and stderr, so this will need some investigation. My guess would be that t...
2.14
swebench/sweb.eval.x86_64.pylint-dev_1776_astroid-1978:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 0c9ab0fe56703fa83c73e514a1020d398d23fa7f source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_astroid
0c9ab0fe56703fa83c73e514a1020d398d23fa7f
SWE-bench/SWE-bench_Lite
pyvista__pyvista-4315
pyvista__pyvista-4315
dev
pyvista/pyvista
db6ee8dd4a747b8864caae36c5d05883976a3ae5
Rectilinear grid does not allow Sequences as inputs ### Describe the bug, what's wrong, and what you expected. Rectilinear grid gives an error when `Sequence`s are passed in, but `ndarray` are ok. ### Steps to reproduce the bug. This doesn't work ```python import pyvista as pv pv.RectilinearGrid([0, 1], [0,...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["pyvista/core/grid.py"]
diff --git a/pyvista/core/grid.py b/pyvista/core/grid.py --- a/pyvista/core/grid.py +++ b/pyvista/core/grid.py @@ -135,23 +135,30 @@ def __init__(self, *args, check_duplicates=False, deep=False, **kwargs): self.shallow_copy(args[0]) elif isinstance(args[0], (str, pathlib.Path)): ...
diff --git a/tests/test_grid.py b/tests/test_grid.py --- a/tests/test_grid.py +++ b/tests/test_grid.py @@ -735,6 +735,21 @@ def test_create_rectilinear_grid_from_specs(): assert grid.n_cells == 9 * 3 * 19 assert grid.n_points == 10 * 4 * 20 assert grid.bounds == (-10.0, 8.0, -10.0, 5.0, -10.0, 9.0) + + ...
["tests/test_grid.py::test_create_rectilinear_grid_from_specs"]
["tests/test_grid.py::test_volume", "tests/test_grid.py::test_init_from_polydata", "tests/test_grid.py::test_init_from_structured", "tests/test_grid.py::test_init_from_unstructured", "tests/test_grid.py::test_init_from_numpy_arrays", "tests/test_grid.py::test_init_bad_input", "tests/test_grid.py::test_init_from_arrays[...
0.39
swebench/sweb.eval.x86_64.pyvista_1776_pyvista-4315:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff db6ee8dd4a747b8864caae36c5d05883976a3ae5 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_pyvista
4c2d1aed10b1600d520271beba8579c71433e808
SWE-bench/SWE-bench_Lite
sqlfluff__sqlfluff-1517
sqlfluff__sqlfluff-1517
dev
sqlfluff/sqlfluff
304a197829f98e7425a46d872ada73176137e5ae
"Dropped elements in sequence matching" when doubled semicolon ## Expected Behaviour Frankly, I'm not sure whether it (doubled `;`) should be just ignored or rather some specific rule should be triggered. ## Observed Behaviour ```console (.venv) ?master ~/prod/_inne/sqlfluff> echo "select id from tbl;;" | sqlfluff ...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["src/sqlfluff/core/parser/helpers.py"]
diff --git a/src/sqlfluff/core/parser/helpers.py b/src/sqlfluff/core/parser/helpers.py --- a/src/sqlfluff/core/parser/helpers.py +++ b/src/sqlfluff/core/parser/helpers.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Any, Iterator, TYPE_CHECKING +from sqlfluff.core.errors import SQLParseError from sqlfluff.core...
diff --git a/test/dialects/ansi_test.py b/test/dialects/ansi_test.py --- a/test/dialects/ansi_test.py +++ b/test/dialects/ansi_test.py @@ -3,7 +3,7 @@ import pytest import logging -from sqlfluff.core import FluffConfig, Linter +from sqlfluff.core import FluffConfig, Linter, SQLParseError from sqlfluff.core.parser ...
["test/dialects/ansi_test.py::test__dialect__ansi_multiple_semicolons[select"]
["test/dialects/ansi_test.py::test__dialect__ansi__file_lex[a", "test/dialects/ansi_test.py::test__dialect__ansi__file_lex[b.c-res1]", "test/dialects/ansi_test.py::test__dialect__ansi__file_lex[abc", "test/dialects/ansi_test.py::test__dialect__ansi_specific_segment_parses[SelectKeywordSegment-select]", "test/dialects/a...
Sounds similar to #1458 where we should handle "empty" statement/files better? Nope, that's the different issue. I doubt that solving one of them would help in other one. I think both issues should stay, just in the case. But what do you think @tunetheweb - should it just ignore these `;;` or raise something like `Foun...
0.6
swebench/sweb.eval.x86_64.sqlfluff_1776_sqlfluff-1517:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 304a197829f98e7425a46d872ada73176137e5ae source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_sqlfluff
67023b85c41d23d6c6d69812a41b207c4f8a9331
SWE-bench/SWE-bench_Lite
sqlfluff__sqlfluff-1625
sqlfluff__sqlfluff-1625
dev
sqlfluff/sqlfluff
14e1a23a3166b9a645a16de96f694c77a5d4abb7
TSQL - L031 incorrectly triggers "Avoid using aliases in join condition" when no join present ## Expected Behaviour Both of these queries should pass, the only difference is the addition of a table alias 'a': 1/ no alias ``` SELECT [hello] FROM mytable ``` 2/ same query with alias ``` SELECT a.[...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["src/sqlfluff/rules/L031.py"]
diff --git a/src/sqlfluff/rules/L031.py b/src/sqlfluff/rules/L031.py --- a/src/sqlfluff/rules/L031.py +++ b/src/sqlfluff/rules/L031.py @@ -211,7 +211,7 @@ def _lint_aliases_in_join( violation_buff.append( LintResult( anchor=alias_info.alias_identifier_ref, - ...
diff --git a/test/cli/commands_test.py b/test/cli/commands_test.py --- a/test/cli/commands_test.py +++ b/test/cli/commands_test.py @@ -49,7 +49,7 @@ def invoke_assert_code( expected_output = """== [test/fixtures/linter/indentation_error_simple.sql] FAIL L: 2 | P: 4 | L003 | Indentation not hanging or a multiple o...
["test/cli/commands_test.py::test__cli__command_directed"]
["test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_dialect_legacy", "test/cli/commands_test.py::test__cli__command_lint_stdin[command0]", "test/cli/commands_test.py::test__cli__command_lint_stdin[command1]", "test/cli/commands_test.py::test__cli__command_lint_stdin[...
Actually, re-reading the docs I think this is the intended behaviour... closing
0.6
swebench/sweb.eval.x86_64.sqlfluff_1776_sqlfluff-1625:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff 14e1a23a3166b9a645a16de96f694c77a5d4abb7 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_sqlfluff
67023b85c41d23d6c6d69812a41b207c4f8a9331
SWE-bench/SWE-bench_Lite
sqlfluff__sqlfluff-1733
sqlfluff__sqlfluff-1733
dev
sqlfluff/sqlfluff
a1579a16b1d8913d9d7c7d12add374a290bcc78c
Extra space when first field moved to new line in a WITH statement Note, the query below uses a `WITH` statement. If I just try to fix the SQL within the CTE, this works fine. Given the following SQL: ```sql WITH example AS ( SELECT my_id, other_thing, one_more FROM my_table ...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["src/sqlfluff/rules/L039.py"]
diff --git a/src/sqlfluff/rules/L039.py b/src/sqlfluff/rules/L039.py --- a/src/sqlfluff/rules/L039.py +++ b/src/sqlfluff/rules/L039.py @@ -44,7 +44,9 @@ def _eval(self, context: RuleContext) -> Optional[List[LintResult]]: # This is to avoid indents if not prev_newline: ...
diff --git a/test/rules/std_L003_L036_L039_combo_test.py b/test/rules/std_L003_L036_L039_combo_test.py new file mode 100644 --- /dev/null +++ b/test/rules/std_L003_L036_L039_combo_test.py @@ -0,0 +1,36 @@ +"""Tests issue #1373 doesn't reoccur. + +The combination of L003 (incorrect indentation), L036 (select targets), +...
["test/rules/std_L003_L036_L039_combo_test.py::test__rules__std_L003_L036_L039"]
["test/rules/std_L016_L36_combo_test.py::test__rules__std_L016_L036_long_line_lint", "test/rules/std_L016_L36_combo_test.py::test__rules__std_L016_L036_long_line_fix", "test/rules/std_L016_L36_combo_test.py::test__rules__std_L016_L036_long_line_fix2"]
Does running `sqlfluff fix` again correct the SQL? @tunetheweb yes, yes it does. Is that something that the user is supposed to do (run it multiple times) or is this indeed a bug? Ideally not, but there are some circumstances where it’s understandable that would happen. This however seems an easy enough example where i...
0.6
swebench/sweb.eval.x86_64.sqlfluff_1776_sqlfluff-1733:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff a1579a16b1d8913d9d7c7d12add374a290bcc78c source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_sqlfluff
67023b85c41d23d6c6d69812a41b207c4f8a9331
SWE-bench/SWE-bench_Lite
sqlfluff__sqlfluff-1763
sqlfluff__sqlfluff-1763
dev
sqlfluff/sqlfluff
a10057635e5b2559293a676486f0b730981f037a
dbt postgres fix command errors with UnicodeEncodeError and also wipes the .sql file _If this is a parsing or linting issue, please include a minimal SQL example which reproduces the issue, along with the `sqlfluff parse` output, `sqlfluff lint` output and `sqlfluff fix` output when relevant._ ## Expected Behaviour ...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["src/sqlfluff/core/linter/linted_file.py"]
diff --git a/src/sqlfluff/core/linter/linted_file.py b/src/sqlfluff/core/linter/linted_file.py --- a/src/sqlfluff/core/linter/linted_file.py +++ b/src/sqlfluff/core/linter/linted_file.py @@ -7,6 +7,8 @@ import os import logging +import shutil +import tempfile from typing import ( Any, Iterable, @@ -493,7...
diff --git a/test/core/linter_test.py b/test/core/linter_test.py --- a/test/core/linter_test.py +++ b/test/core/linter_test.py @@ -641,3 +641,56 @@ def test__attempt_to_change_templater_warning(caplog): assert "Attempt to set templater to " in caplog.text finally: logger.propagate = original_prop...
["test/core/linter_test.py::test_safe_create_replace_file[utf8_create]", "test/core/linter_test.py::test_safe_create_replace_file[utf8_update]", "test/core/linter_test.py::test_safe_create_replace_file[utf8_special_char]"]
["test/core/linter_test.py::test__linter__path_from_paths__dir", "test/core/linter_test.py::test__linter__path_from_paths__default", "test/core/linter_test.py::test__linter__path_from_paths__exts", "test/core/linter_test.py::test__linter__path_from_paths__file", "test/core/linter_test.py::test__linter__path_from_paths_...
I get a dbt-related error -- can you provide your project file as well? Also, what operating system are you running this on? I tested a simplified (non-dbt) version of your file on my Mac, and it worked okay. ``` dbt.exceptions.DbtProjectError: Runtime Error no dbt_project.yml found at expected path /Users/bhart...
0.6
swebench/sweb.eval.x86_64.sqlfluff_1776_sqlfluff-1763:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff a10057635e5b2559293a676486f0b730981f037a source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_sqlfluff
67023b85c41d23d6c6d69812a41b207c4f8a9331
SWE-bench/SWE-bench_Lite
sqlfluff__sqlfluff-2419
sqlfluff__sqlfluff-2419
dev
sqlfluff/sqlfluff
f1dba0e1dd764ae72d67c3d5e1471cf14d3db030
Rule L060 could give a specific error message At the moment rule L060 flags something like this: ``` L: 21 | P: 9 | L060 | Use 'COALESCE' instead of 'IFNULL' or 'NVL'. ``` Since we likely know the wrong word, it might be nice to actually flag that instead of both `IFNULL` and `NVL` - like most of the other r...
You are a software engineering agent inside a full git checkout of the repo. Resolve the GitHub issue by exploring and editing files with your tools (ls, glob, grep, read_file, write_file, edit_file, execute). Prefer minimal correct edits. Do not modify tests unless necessary. When finished, stop calling tools and repl...
["src/sqlfluff/rules/L060.py"]
diff --git a/src/sqlfluff/rules/L060.py b/src/sqlfluff/rules/L060.py --- a/src/sqlfluff/rules/L060.py +++ b/src/sqlfluff/rules/L060.py @@ -59,4 +59,8 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]: ], ) - return LintResult(context.segment, [fix]) + return LintResu...
diff --git a/test/rules/std_L060_test.py b/test/rules/std_L060_test.py new file mode 100644 --- /dev/null +++ b/test/rules/std_L060_test.py @@ -0,0 +1,12 @@ +"""Tests the python routines within L060.""" +import sqlfluff + + +def test__rules__std_L060_raised() -> None: + """L060 is raised for use of ``IFNULL`` or ``N...
["test/rules/std_L060_test.py::test__rules__std_L060_raised"]
[]
@tunetheweb Yeah definitely, should be a pretty quick change 😊
0.8
swebench/sweb.eval.x86_64.sqlfluff_1776_sqlfluff-2419:latest
#!/bin/bash set -uxo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git -c core.fileMode=false diff f1dba0e1dd764ae72d67c3d5e1471cf14d3db030 source /opt/miniconda3/bin/activate conda activate testbed pytho...
pass_and_fail
parse_log_sqlfluff
a5c4eae4e3e419fe95460c9afd9cf39a35a470c4
SWE-bench/SWE-bench_Lite