Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Taneli Hukkinen <[email protected]>
  • Loading branch information
KyleKing and hukkin authored Dec 19, 2024
1 parent 71721f4 commit e35067c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/mdformat/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ def make_arg_parser(
)
parser.add_argument(
"--no-validate",
action="store_false",
action="store_const",
const=False,
dest="validate",
default=None,
help="do not validate that the rendered HTML is consistent",
)
version_str = f"mdformat {mdformat.__version__}"
Expand Down
3 changes: 1 addition & 2 deletions tests/test_config_file.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from io import StringIO
import sys
from unittest import mock
from unittest.mock import patch

import pytest

Expand Down Expand Up @@ -158,7 +157,7 @@ def test_conf_no_validate(tmp_path):
content = "1. ordered"
file_path.write_text(content)

with patch("mdformat.renderer._context.get_list_marker_type", return_value="?"):
with mock.patch("mdformat.renderer._context.get_list_marker_type", return_value="?"):
assert run_with_clear_cache((str(file_path),)) == 1
assert file_path.read_text() == content

Expand Down

0 comments on commit e35067c

Please sign in to comment.