Skip to content
Snippets Groups Projects
Verified Commit a6c88810 authored by Maik Nijhuis's avatar Maik Nijhuis
Browse files

Format using black version 23.1

parent 04de25dc
Branches
Tags
1 merge request!890Format using black version 23.1
Pipeline #43466 passed
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# Options affecting listfile parsing # Options affecting listfile parsing
# ---------------------------------- # ----------------------------------
with section("parse"): with section("parse"):
# Specify structure for custom cmake functions # Specify structure for custom cmake functions
additional_commands = { additional_commands = {
"foo": { "foo": {
...@@ -24,7 +23,6 @@ with section("parse"): ...@@ -24,7 +23,6 @@ with section("parse"):
# Options affecting formatting. # Options affecting formatting.
# ----------------------------- # -----------------------------
with section("format"): with section("format"):
# Disable formatting entirely, making cmake-format a no-op # Disable formatting entirely, making cmake-format a no-op
disable = False disable = False
...@@ -122,7 +120,6 @@ with section("format"): ...@@ -122,7 +120,6 @@ with section("format"):
# Options affecting comment reflow and formatting. # Options affecting comment reflow and formatting.
# ------------------------------------------------ # ------------------------------------------------
with section("markup"): with section("markup"):
# What character to use for bulleted lists # What character to use for bulleted lists
bullet_char = "*" bullet_char = "*"
...@@ -166,7 +163,6 @@ with section("markup"): ...@@ -166,7 +163,6 @@ with section("markup"):
# Options affecting the linter # Options affecting the linter
# ---------------------------- # ----------------------------
with section("lint"): with section("lint"):
# a list of lint codes to disable # a list of lint codes to disable
disabled_codes = [] disabled_codes = []
...@@ -223,7 +219,6 @@ with section("lint"): ...@@ -223,7 +219,6 @@ with section("lint"):
# Options affecting file encoding # Options affecting file encoding
# ------------------------------- # -------------------------------
with section("encode"): with section("encode"):
# If true, emit the unicode byte-order mark (BOM) at the start of the file # If true, emit the unicode byte-order mark (BOM) at the start of the file
emit_byteorder_mark = False emit_byteorder_mark = False
...@@ -238,7 +233,6 @@ with section("encode"): ...@@ -238,7 +233,6 @@ with section("encode"):
# Miscellaneous configurations options. # Miscellaneous configurations options.
# ------------------------------------- # -------------------------------------
with section("misc"): with section("misc"):
# A dictionary containing any per-command configuration overrides. Currently # A dictionary containing any per-command configuration overrides. Currently
# only `command_case` is supported. # only `command_case` is supported.
per_command = {} per_command = {}
...@@ -37,7 +37,6 @@ def parse_junit_tree(element, test_summary=None): ...@@ -37,7 +37,6 @@ def parse_junit_tree(element, test_summary=None):
# Parse top level <testsuites> or <testsuite> tags. # Parse top level <testsuites> or <testsuite> tags.
if element.tag in ["testsuites", "testsuite"]: if element.tag in ["testsuites", "testsuite"]:
for attr in test_summary[element.tag]: for attr in test_summary[element.tag]:
test_summary[element.tag][attr] += int(element.get(attr, 0)) test_summary[element.tag][attr] += int(element.get(attr, 0))
......
...@@ -97,7 +97,6 @@ def create_corrupted_data(): ...@@ -97,7 +97,6 @@ def create_corrupted_data():
@pytest.fixture() @pytest.fixture()
def create_corrupted_data_from_regular(): def create_corrupted_data_from_regular():
""" """
Use a lower frequency averaging to ensure the condition on the frequency Use a lower frequency averaging to ensure the condition on the frequency
channels is satisfied: channels per chan block >= max averaged channels channels is satisfied: channels per chan block >= max averaged channels
......
...@@ -87,7 +87,6 @@ def test_input_with_four_sources(): ...@@ -87,7 +87,6 @@ def test_input_with_four_sources():
@pytest.mark.parametrize("source", ["center", "ra", "dec", "radec"]) @pytest.mark.parametrize("source", ["center", "ra", "dec", "radec"])
@pytest.mark.parametrize("offset", ["center", "dl", "dm", "dldm"]) @pytest.mark.parametrize("offset", ["center", "dl", "dm", "dldm"])
def test_input_with_single_sources(source, offset): def test_input_with_single_sources(source, offset):
""" """
Test inputs that contain a single source. Test inputs that contain a single source.
Since these tests take quite some time, they only run locally, and only Since these tests take quite some time, they only run locally, and only
...@@ -218,7 +217,6 @@ def test_polynomial_frequency_term_corrections(): ...@@ -218,7 +217,6 @@ def test_polynomial_frequency_term_corrections():
) )
for ch in range(ch_count - 1): for ch in range(ch_count - 1):
# The factors 10, 20000 and 30000 match those in tIDGPredict_ref.py # The factors 10, 20000 and 30000 match those in tIDGPredict_ref.py
taql_command = f"select from {MSIN} where not(TERMS_DATA[{ch},0]=0 or near(TERMS_DATA[{ch},0], (select 10+20000*(CHAN_FREQ[{ch}]/CHAN_FREQ[0]-1) +30000*(CHAN_FREQ[{ch}]/CHAN_FREQ[0]-1)**2 from ::SPECTRAL_WINDOW)[0], 1e-3))" taql_command = f"select from {MSIN} where not(TERMS_DATA[{ch},0]=0 or near(TERMS_DATA[{ch},0], (select 10+20000*(CHAN_FREQ[{ch}]/CHAN_FREQ[0]-1) +30000*(CHAN_FREQ[{ch}]/CHAN_FREQ[0]-1)**2 from ::SPECTRAL_WINDOW)[0], 1e-3))"
assert_taql(taql_command) assert_taql(taql_command)
...@@ -29,7 +29,6 @@ except ImportError: ...@@ -29,7 +29,6 @@ except ImportError:
def test_constructor(): def test_constructor():
# Constructor using only default values for the arguments # Constructor using only default values for the arguments
info0 = dp3.DPInfo() info0 = dp3.DPInfo()
...@@ -55,7 +54,6 @@ def test_constructor(): ...@@ -55,7 +54,6 @@ def test_constructor():
def test_antenna_properties(): def test_antenna_properties():
info = dp3.DPInfo() info = dp3.DPInfo()
# Check default values. # Check default values.
......
...@@ -48,7 +48,6 @@ def check_fields(fields, set_fields): ...@@ -48,7 +48,6 @@ def check_fields(fields, set_fields):
def test_constructor(): def test_constructor():
# Test constructor with empty field # Test constructor with empty field
empty_fields = dp3.Fields() empty_fields = dp3.Fields()
check_fields(empty_fields, []) check_fields(empty_fields, [])
...@@ -74,7 +73,6 @@ def test_constructor(): ...@@ -74,7 +73,6 @@ def test_constructor():
def test_or_operator(): def test_or_operator():
test_fields = dp3.Fields() test_fields = dp3.Fields()
test_fields |= dp3.Fields.FLAGS test_fields |= dp3.Fields.FLAGS
check_fields(test_fields, ["flags"]) check_fields(test_fields, ["flags"])
...@@ -89,7 +87,6 @@ def test_or_operator(): ...@@ -89,7 +87,6 @@ def test_or_operator():
def test_equality_operator(): def test_equality_operator():
left_empty = dp3.Fields() left_empty = dp3.Fields()
right_empty = dp3.Fields() right_empty = dp3.Fields()
left_three = dp3.Fields.DATA | dp3.Fields.FLAGS | dp3.Fields.UVW left_three = dp3.Fields.DATA | dp3.Fields.FLAGS | dp3.Fields.UVW
...@@ -113,7 +110,6 @@ def test_equality_operator(): ...@@ -113,7 +110,6 @@ def test_equality_operator():
def test_string_operator(): def test_string_operator():
assert str(dp3.Fields()) == "[]" assert str(dp3.Fields()) == "[]"
assert str(dp3.Fields.DATA) == "[data]" assert str(dp3.Fields.DATA) == "[data]"
assert str(dp3.Fields.FLAGS) == "[flags]" assert str(dp3.Fields.FLAGS) == "[flags]"
...@@ -130,7 +126,6 @@ def test_string_operator(): ...@@ -130,7 +126,6 @@ def test_string_operator():
def test_update_requirements(): def test_update_requirements():
check_fields( check_fields(
dp3.Fields(dp3.Fields.DATA).update_requirements( dp3.Fields(dp3.Fields.DATA).update_requirements(
dp3.Fields(), dp3.Fields.DATA dp3.Fields(), dp3.Fields.DATA
......
...@@ -82,7 +82,6 @@ def test_info(): ...@@ -82,7 +82,6 @@ def test_info():
dp3.Step.__init__(self) dp3.Step.__init__(self)
def _update_info(self, info): def _update_info(self, info):
# Modify the info a bit showing that this method is # Modify the info a bit showing that this method is
# indeed called when set_info() is called. # indeed called when set_info() is called.
# An example of a step that makes actual changes to the info object # An example of a step that makes actual changes to the info object
......
...@@ -129,7 +129,6 @@ def test_bdapredict(create_skymodel, bda_predict_step_type): ...@@ -129,7 +129,6 @@ def test_bdapredict(create_skymodel, bda_predict_step_type):
def test_predicted_values_regular_input( def test_predicted_values_regular_input(
create_skymodel_in_phase_center, bda_predict_step_type create_skymodel_in_phase_center, bda_predict_step_type
): ):
check_call( check_call(
[ [
tcf.DP3EXE, tcf.DP3EXE,
......
...@@ -173,7 +173,6 @@ def test_caltype_fulljones(create_model_data): ...@@ -173,7 +173,6 @@ def test_caltype_fulljones(create_model_data):
def test_caltype_diagonal_nchan_2(create_model_data): def test_caltype_diagonal_nchan_2(create_model_data):
check_call( check_call(
[ [
tcf.DP3EXE, tcf.DP3EXE,
...@@ -216,7 +215,6 @@ def test_caltype_diagonal_nchan_2(create_model_data): ...@@ -216,7 +215,6 @@ def test_caltype_diagonal_nchan_2(create_model_data):
@pytest.mark.parametrize("caltype", ["tec", "tecandphase"]) @pytest.mark.parametrize("caltype", ["tec", "tecandphase"])
def test_output_parameters(caltype): def test_output_parameters(caltype):
check_call( check_call(
[ [
tcf.DP3EXE, tcf.DP3EXE,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment