From a239c801c7bdece04f564ecbbc9b88e8261b4cca Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 15 Mar 2023 15:41:04 +0100 Subject: [PATCH] Fix CI issues (#2796) --- codespell_lib/_codespell.py | 2 +- codespell_lib/tests/test_basic.py | 8 ++++---- pyproject.toml | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index baf77997af..49a62a3996 100644 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py @@ -587,7 +587,7 @@ def parse_options( cfg_args.append(f"--{key}") # If value is blank, skip. val = config["codespell"][key] - if val != "": + if val: cfg_args.append(val) # Parse config file options. diff --git a/codespell_lib/tests/test_basic.py b/codespell_lib/tests/test_basic.py index d7bd72de9e..f40a7ae04d 100644 --- a/codespell_lib/tests/test_basic.py +++ b/codespell_lib/tests/test_basic.py @@ -141,7 +141,7 @@ def test_basic( assert isinstance(result, tuple) code, stdout, stderr = result assert code == 0 - assert stdout == stderr == "" + assert not stdout and not stderr assert cs.main(tmp_path) == 0 # empty directory @@ -266,7 +266,7 @@ def test_summary( assert isinstance(result, tuple) code, stdout, stderr = result assert code == 0 - assert stdout == stderr == "", "no output" + assert not stdout and not stderr, "no output" result = cs.main(fname, "--summary", std=True) assert isinstance(result, tuple) code, stdout, stderr = result @@ -375,12 +375,12 @@ def test_encoding( assert isinstance(result, tuple) code, stdout, stderr = result assert code == 0 - assert stdout == stderr == "" + assert not stdout and not stderr result = cs.main("-q", "0", fname, std=True, count=False) assert isinstance(result, tuple) code, stdout, stderr = result assert code == 0 - assert stdout == "" + assert not stdout assert "WARNING: Binary file" in stderr diff --git a/pyproject.toml b/pyproject.toml index dff3dd5576..ac57a7409d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -105,7 +105,6 @@ addopts = "--cov=codespell_lib -rs --cov-report= --tb=short --junit-xml=junit-re extend-ignore = [ "ANN101", "B904", - "PLC1901", "PLW2901", ] line-length = 88