We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is a bit more work, but we spare some resources and it should make things faster.
@duty def check_quality(ctx, files=PY_SRC_LIST): """ Check the code quality. Parameters: ctx: The context instance (passed automatically). files: The files to check. """ from flake8.main.cli import main as flake8 ctx.run(flake8, args=[["--config=config/flake8.ini", *files]], title="Checking code quality", pty=PTY)
@duty def check_docs(ctx): """ Check if the documentation builds correctly. Parameters: ctx: The context instance (passed automatically). """ from mkdocs.__main__ import cli as mkdocs Path("htmlcov").mkdir(parents=True, exist_ok=True) Path("htmlcov/index.html").touch(exist_ok=True) ctx.run(mkdocs, args=[["build", "-s"]], title="Building documentation")
@duty # noqa: WPS231 def check_types(ctx): # noqa: WPS231 """ Check that the code is correctly typed. Parameters: ctx: The context instance (passed automatically). """ from mypy.main import main as mypy class LazyStdout(StringIO): def __repr__(self) -> str: return "stdout" def write(self, value): return sys.stdout.write(value) class LazyStderr(StringIO): def __repr__(self) -> str: return "stderr" def write(self, value): return sys.stderr.write(value) os.environ["MYPY_FORCE_COLOR"] = "1" ctx.run( mypy, kwargs={ "args": ["--config-file", "config/mypy.ini", *PY_SRC_LIST], "stdout": LazyStdout(), "stderr": LazyStderr(), "clean_exit": True, }, title="Type-checking", command=f"mypy --config-file config/mypy.ini {PY_SRC}", )
It will require pawamoy/failprint#16, pawamoy/failprint#15, and pawamoy/failprint#14.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It is a bit more work, but we spare some resources and it should make things faster.
It will require pawamoy/failprint#16, pawamoy/failprint#15, and pawamoy/failprint#14.
The text was updated successfully, but these errors were encountered: