代码拉取完成,页面将自动刷新
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Doit task definitions."""
import multiprocessing
from doit.action import CmdAction
cores = multiprocessing.cpu_count()
DOIT_CONFIG = {
'default_tasks': [
'check',
],
'continue': True,
'verbosity': 1,
'num_process': cores,
}
def task_flake8():
"""Run flake8 check."""
return {
'actions': ['flake8 setup.py pyppeteer tests'],
}
def task_mypy():
"""Run mypy check."""
return {
'actions': ['mypy pyppeteer'],
}
def task_pydocstyle():
"""Run docstyle check."""
return {
'actions': ['pydocstyle pyppeteer'],
}
def task_docs():
"""Build sphinx document."""
return {
'actions': [
'sphinx-build -q -W -E -j auto -b html docs docs/_build/html',
],
}
def task_readme():
"""Check long description for package."""
return {
'actions': ['python setup.py check -r -s'],
}
def task_spell():
"""Check spelling of comments and docstrings."""
return {
'actions': [
'pylint --disable all --enable spelling --spelling-dict en_US '
'--spelling-private-dict-file spell.txt pyppeteer'
],
}
def task_check():
"""Run flake8/mypy/pydocstyle/docs/readme tasks."""
return {
'actions': None,
'task_dep': ['flake8', 'mypy', 'pydocstyle', 'docs', 'readme', 'spell']
}
def task_test():
"""Run pytest."""
return {
'actions': [CmdAction(
'pytest -n {}'.format(cores // 2),
buffering=1,
)],
'verbosity': 2,
}
def task_all():
"""Run all tests and checks."""
return {
'actions': None,
'task_dep': ['test', 'check'],
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。