diff --git a/.gitignore b/.gitignore index a85ae15..99eea0b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ __pycache__/ /.coverage venv/ -*.egg-info/ \ No newline at end of file +*.egg-info/ +.venv/ +.vscode/ diff --git a/pyproject.toml b/pyproject.toml index 3deef45..0df154f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "topyn" -version = "0.7.0.dev" +version = "0.7.0" description = "TOPyN: Typed Opinionated PYthon Normalizer" authors = ["Leandro Leites Barrios "] license = "MIT" diff --git a/tests/test_topyn.py b/tests/test_topyn.py index 15499ef..87de3e2 100644 --- a/tests/test_topyn.py +++ b/tests/test_topyn.py @@ -8,7 +8,7 @@ def test_version() -> None: - assert __version__ == "0.7.0.dev" + assert __version__ == "0.7.0" def _run_system_exit(path: str) -> None: @@ -57,10 +57,7 @@ def test_incorrect_naming(capsys: CaptureFixture) -> None: mock_out.assert_called_with("rules") captured = capsys.readouterr() - assert ( - "N802 function name 'iLikeCamelCase' should be lowercase" - in captured.out - ) + assert "N802 function name 'iLikeCamelCase' should be lowercase" in captured.out def test_bugbear(capsys: CaptureFixture) -> None: @@ -71,10 +68,7 @@ def test_bugbear(capsys: CaptureFixture) -> None: mock_out.assert_called_with("rules") captured = capsys.readouterr() - assert ( - "B006 Do not use mutable data structures for argument defaults" - in captured.out - ) + assert "B006 Do not use mutable data structures for argument defaults" in captured.out def test_comprehensions(capsys: CaptureFixture) -> None: @@ -102,15 +96,10 @@ def test_wrong_formatting(capsys: CaptureFixture) -> None: def test_ok(capsys: CaptureFixture) -> None: import topyn.tui - with patch.object( - topyn.tui, "everything_is_ok", wraps=topyn.tui.everything_is_ok - ) as mock_out: + with patch.object(topyn.tui, "everything_is_ok", wraps=topyn.tui.everything_is_ok) as mock_out: run(["tests/resources/ok"]) mock_out.assert_called_once() - assert ( - "All done! ✨ 🍰 ✨\n1 file would be left unchanged.\n" - == capsys.readouterr().err - ) + assert "All done! ✨ 🍰 ✨\n1 file would be left unchanged.\n" == capsys.readouterr().err def test_fix(tmpdir: py.path.local) -> None: @@ -123,9 +112,7 @@ def test_fix(tmpdir: py.path.local) -> None: _run_system_exit(str(tmpdir)) mock_out.assert_called_with("formatting") - with patch.object( - topyn.tui, "trying_to_fix", wraps=topyn.tui.trying_to_fix - ) as mock_out: + with patch.object(topyn.tui, "trying_to_fix", wraps=topyn.tui.trying_to_fix) as mock_out: run([str(tmpdir), "--fix"]) mock_out.assert_called_once() @@ -144,9 +131,7 @@ def test_fix_rules(tmpdir: py.path.local) -> None: _run_system_exit(str(tmpdir)) mock_out.assert_called_with("rules") - with patch.object( - topyn.tui, "trying_to_fix", wraps=topyn.tui.trying_to_fix - ) as mock_out: + with patch.object(topyn.tui, "trying_to_fix", wraps=topyn.tui.trying_to_fix) as mock_out: run([str(tmpdir), "--fix"]) mock_out.assert_called_once() diff --git a/topyn/__init__.py b/topyn/__init__.py index 08594a5..49e0fc1 100644 --- a/topyn/__init__.py +++ b/topyn/__init__.py @@ -1 +1 @@ -__version__ = "0.7.0.dev" +__version__ = "0.7.0"