From b52c962577c69c438ebce4c8c202abbcd928f130 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:09:23 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tasks.py | 22 +++++++++++----------- tests/base.py | 2 +- tests/config.py | 2 +- tests/main.py | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tasks.py b/tasks.py index 82261dd..753283c 100644 --- a/tasks.py +++ b/tasks.py @@ -13,7 +13,7 @@ @task def clean(c): - """ Remove artifacts and binary files. """ + """Remove artifacts and binary files.""" c.run("python setup.py clean --all") patterns = ["build", "dist"] patterns.extend(glob("*.egg*")) @@ -25,19 +25,19 @@ def clean(c): @task def lint(c): - """ Run linting tox environments. """ + """Run linting tox environments.""" c.run("tox -epep8,isort,black,pypi-description") @task # NOQA def format(c): # NOQA - """ Run code formatting tasks. """ + """Run code formatting tasks.""" c.run("tox -eblacken,isort_format") @task def towncrier_check(c): # NOQA - """ Check towncrier files. """ + """Check towncrier files.""" output = io.StringIO() c.run("git branch --contains HEAD", out_stream=output) skipped_branch_prefix = ["pull/", "develop", "master", "HEAD"] @@ -90,19 +90,19 @@ def towncrier_check(c): # NOQA @task def test(c): - """ Run test in local environment. """ + """Run test in local environment.""" c.run("python setup.py test") @task def test_all(c): - """ Run all tox environments. """ + """Run all tox environments.""" c.run("tox") @task def coverage(c): - """ Run test with coverage in local environment. """ + """Run test with coverage in local environment.""" c.run("coverage erase") c.run("run setup.py test") c.run("report -m") @@ -110,19 +110,19 @@ def coverage(c): @task def tag_release(c, level): - """ Tag release version. """ + """Tag release version.""" c.run("bumpversion --list %s --no-tag" % level) @task def tag_dev(c, level="patch"): - """ Tag development version. """ + """Tag development version.""" c.run("bumpversion --list %s --message='Bump develop version [ci skip]' --no-tag" % level) @task(pre=[clean]) def docbuild(c): - """ Build documentation. """ + """Build documentation.""" os.chdir("docs") build_dir = os.environ.get("BUILD_DIR", "_build/html") c.run("python -msphinx -W -b html -d _build/doctrees . %s" % build_dir) @@ -130,7 +130,7 @@ def docbuild(c): @task(docbuild) def docserve(c): - """ Serve docs at http://localhost:$DOCS_PORT/ (default port is 8000). """ + """Serve docs at http://localhost:$DOCS_PORT/ (default port is 8000).""" from livereload import Server server = Server() diff --git a/tests/base.py b/tests/base.py index 96a773a..7ca7aec 100644 --- a/tests/base.py +++ b/tests/base.py @@ -6,7 +6,7 @@ import unittest from copy import copy -from six import StringIO +from io import StringIO SYSTEM_ACTIVATE = os.path.join(os.path.dirname(sys.executable), "activate_this.py") diff --git a/tests/config.py b/tests/config.py index 6a15294..2b76d71 100644 --- a/tests/config.py +++ b/tests/config.py @@ -5,7 +5,7 @@ from argparse import Namespace from unittest.mock import patch -from six import StringIO +from io import StringIO from tzlocal import get_localzone from djangocms_installer import config diff --git a/tests/main.py b/tests/main.py index c197c78..efba3d8 100644 --- a/tests/main.py +++ b/tests/main.py @@ -148,7 +148,7 @@ def test_base_invocation(self): out = subprocess.check_output( ["sqlite3", "project.db", 'SELECT COUNT(*) FROM auth_user WHERE username="admin"'] ) - self.assertEqual(bytes(out), bytes(b"1\n")) + self.assertEqual(bytes(out), b"1\n") os.chdir(original_dir) rmtree(base_dir)