From c03e0bc6d7a570aad6b6fd9bc053f49e7c937ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Fri, 24 Jul 2020 16:12:52 +0300 Subject: [PATCH] Some style fixing. --- .appveyor.yml | 78 ++++++---------------------- .github/ISSUE_TEMPLATE/bug_report.md | 1 - .pre-commit-config.yaml | 2 +- MANIFEST.in | 2 +- appveyor.yml | 34 ------------ ci/bootstrap.py | 4 +- docs/conf.py | 3 +- docs/index.rst | 1 - examples/adhoc-layout/setup.py | 4 +- examples/src-layout/setup.py | 4 +- tox.ini | 2 +- 11 files changed, 29 insertions(+), 106 deletions(-) delete mode 100644 appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml index e6a32e08..cede338b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,77 +1,33 @@ +# NOTE: this file is auto-generated via ci/bootstrap.py (ci/templates/appveyor.yml). version: '{branch}-{build}' build: off environment: matrix: - TOXENV: check - TOXPYTHON: C:\Python36\python.exe - PYTHON_HOME: C:\Python36 - PYTHON_VERSION: '3.6' - PYTHON_ARCH: '32' - - TOXENV: py27 - TOXPYTHON: C:\Python27\python.exe - PYTHON_HOME: C:\Python27 - PYTHON_VERSION: '2.7' - PYTHON_ARCH: '32' - - TOXENV: py27 - TOXPYTHON: C:\Python27-x64\python.exe - PYTHON_HOME: C:\Python27-x64 - PYTHON_VERSION: '2.7' - PYTHON_ARCH: '64' - WINDOWS_SDK_VERSION: v7.0 - - TOXENV: py35 - TOXPYTHON: C:\Python35\python.exe - PYTHON_HOME: C:\Python35 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '32' - - TOXENV: py35 - TOXPYTHON: C:\Python35-x64\python.exe - PYTHON_HOME: C:\Python35-x64 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '64' - - TOXENV: py36 - TOXPYTHON: C:\Python36\python.exe - PYTHON_HOME: C:\Python36 - PYTHON_VERSION: '3.6' - PYTHON_ARCH: '32' - - TOXENV: py36 - TOXPYTHON: C:\Python36-x64\python.exe - PYTHON_HOME: C:\Python36-x64 - PYTHON_VERSION: '3.6' - PYTHON_ARCH: '64' - - TOXENV: py37 - TOXPYTHON: C:\Python37\python.exe - PYTHON_HOME: C:\Python37 - PYTHON_VERSION: '3.7' - PYTHON_ARCH: '32' - - TOXENV: py37 - TOXPYTHON: C:\Python37-x64\python.exe - PYTHON_HOME: C:\Python37-x64 - PYTHON_VERSION: '3.7' - PYTHON_ARCH: '64' - - TOXENV: py38 - TOXPYTHON: C:\Python38\python.exe - PYTHON_HOME: C:\Python38 - PYTHON_VERSION: '3.8' - PYTHON_ARCH: '32' - - TOXENV: py38 - TOXPYTHON: C:\Python38-x64\python.exe - PYTHON_HOME: C:\Python38-x64 - PYTHON_VERSION: '3.8' - PYTHON_ARCH: '64' + - TOXENV: 'py27-pytest46-xdist27-coverage45,py27-pytest46-xdist27-coverage52' + - TOXENV: 'py35-pytest46-xdist27-coverage45,py35-pytest46-xdist27-coverage52' + - TOXENV: 'py36-pytest46-xdist27-coverage45,py36-pytest46-xdist27-coverage52,py36-pytest46-xdist33-coverage45,py36-pytest46-xdist33-coverage52,py36-pytest54-xdist33-coverage45,py36-pytest54-xdist33-coverage52,py36-pytest60-xdist33-coverage52' + - TOXENV: 'py37-pytest46-xdist27-coverage45,py37-pytest46-xdist27-coverage52,py37-pytest46-xdist33-coverage45,py37-pytest46-xdist33-coverage52,py37-pytest54-xdist33-coverage45,py37-pytest54-xdist33-coverage52,py37-pytest60-xdist33-coverage52' + - TOXENV: 'pypy-pytest46-xdist27-coverage45,pypy-pytest46-xdist27-coverage52' + init: - ps: echo $env:TOXENV - ps: ls C:\Python* install: - - '%PYTHON_HOME%\python -mpip install --progress-bar=off tox -rci/requirements.txt' - - '%PYTHON_HOME%\Scripts\virtualenv --version' - - '%PYTHON_HOME%\Scripts\easy_install --version' - - '%PYTHON_HOME%\Scripts\pip --version' - - '%PYTHON_HOME%\Scripts\tox --version' + - IF "%TOXENV:~0,5%" == "pypy-" choco install --no-progress python.pypy + - IF "%TOXENV:~0,6%" == "pypy3-" choco install --no-progress pypy3 + - SET PATH=C:\tools\pypy\pypy;%PATH% + - C:\Python37\python -m pip install -U "virtualenv>=16.5.0" + - C:\Python37\python -m pip install tox + test_script: - - cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd %PYTHON_HOME%\Scripts\tox + - C:\Python37\python -m tox + on_failure: - ps: dir "env:" - ps: get-content .tox\*\log\* +artifacts: + - path: dist\* ### To enable remote debugging uncomment this (also, see: http://www.appveyor.com/docs/how-to/rdp-to-build-worker): # on_finish: diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 391d7f17..8cdb3737 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -29,4 +29,3 @@ If you paste raw code make sure you quote it, eg: def foobar(): pass ``` - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8de50bae..f9942328 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # pre-commit install # To update the pre-commit hooks run: # pre-commit install-hooks -exclude: '^(.tox|ci/templates|.bumpversion.cfg)(/|$)' +exclude: '^(src/.*\.pth|\.tox|ci/templates|\.bumpversion\.cfg)(/|$)' repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: master diff --git a/MANIFEST.in b/MANIFEST.in index b3fa97b2..6db46114 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -23,4 +23,4 @@ include README.rst include tox.ini .travis.yml .appveyor.yml .readthedocs.yml .pre-commit-config.yaml -global-exclude *.py[cod] __pycache__/* *.so *.dylib +global-exclude *.py[cod] __pycache__/* *.so *.dylib .coverage .coverage.* diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index cede338b..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: this file is auto-generated via ci/bootstrap.py (ci/templates/appveyor.yml). -version: '{branch}-{build}' -build: off -environment: - matrix: - - TOXENV: check - - TOXENV: 'py27-pytest46-xdist27-coverage45,py27-pytest46-xdist27-coverage52' - - TOXENV: 'py35-pytest46-xdist27-coverage45,py35-pytest46-xdist27-coverage52' - - TOXENV: 'py36-pytest46-xdist27-coverage45,py36-pytest46-xdist27-coverage52,py36-pytest46-xdist33-coverage45,py36-pytest46-xdist33-coverage52,py36-pytest54-xdist33-coverage45,py36-pytest54-xdist33-coverage52,py36-pytest60-xdist33-coverage52' - - TOXENV: 'py37-pytest46-xdist27-coverage45,py37-pytest46-xdist27-coverage52,py37-pytest46-xdist33-coverage45,py37-pytest46-xdist33-coverage52,py37-pytest54-xdist33-coverage45,py37-pytest54-xdist33-coverage52,py37-pytest60-xdist33-coverage52' - - TOXENV: 'pypy-pytest46-xdist27-coverage45,pypy-pytest46-xdist27-coverage52' - -init: - - ps: echo $env:TOXENV - - ps: ls C:\Python* -install: - - IF "%TOXENV:~0,5%" == "pypy-" choco install --no-progress python.pypy - - IF "%TOXENV:~0,6%" == "pypy3-" choco install --no-progress pypy3 - - SET PATH=C:\tools\pypy\pypy;%PATH% - - C:\Python37\python -m pip install -U "virtualenv>=16.5.0" - - C:\Python37\python -m pip install tox - -test_script: - - C:\Python37\python -m tox - -on_failure: - - ps: dir "env:" - - ps: get-content .tox\*\log\* -artifacts: - - path: dist\* - -### To enable remote debugging uncomment this (also, see: http://www.appveyor.com/docs/how-to/rdp-to-build-worker): -# on_finish: -# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) diff --git a/ci/bootstrap.py b/ci/bootstrap.py index 6c77dfcb..61747a15 100755 --- a/ci/bootstrap.py +++ b/ci/bootstrap.py @@ -20,6 +20,7 @@ def check_call(args): print("+", *args) subprocess.check_call(args) + def exec_in_env(): env_path = join(base_path, ".tox", "bootstrap") if sys.platform == "win32": @@ -47,6 +48,7 @@ def exec_in_env(): print("+ exec", python_executable, __file__, "--no-env") os.execv(python_executable, [python_executable, __file__, "--no-env"]) + def main(): import jinja2 @@ -79,6 +81,7 @@ def main(): print("Wrote {}".format(name)) print("DONE.") + if __name__ == "__main__": args = sys.argv[1:] if args == ["--no-env"]: @@ -88,4 +91,3 @@ def main(): else: print("Unexpected arguments {0}".format(args), file=sys.stderr) sys.exit(1) - diff --git a/docs/conf.py b/docs/conf.py index 63e3bdce..ce62c430 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,6 +3,7 @@ import os +import sphinx_py3doc_enhanced_theme extensions = [ 'sphinx.ext.autodoc', @@ -33,7 +34,7 @@ 'issue': ('https://github.com/pytest-dev/pytest-cov/issues/%s', '#'), 'pr': ('https://github.com/pytest-dev/pytest-cov/pull/%s', 'PR #'), } -import sphinx_py3doc_enhanced_theme + html_theme = "sphinx_py3doc_enhanced_theme" html_theme_path = [sphinx_py3doc_enhanced_theme.get_html_theme_path()] html_theme_options = { diff --git a/docs/index.rst b/docs/index.rst index 84ff5810..32fb1caf 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -27,4 +27,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/examples/adhoc-layout/setup.py b/examples/adhoc-layout/setup.py index c6b05920..e52b68d1 100644 --- a/examples/adhoc-layout/setup.py +++ b/examples/adhoc-layout/setup.py @@ -1,5 +1,5 @@ -from setuptools import setup, find_packages - +from setuptools import find_packages +from setuptools import setup setup( name='example', diff --git a/examples/src-layout/setup.py b/examples/src-layout/setup.py index e1b59c8d..c8ded818 100644 --- a/examples/src-layout/setup.py +++ b/examples/src-layout/setup.py @@ -1,5 +1,5 @@ -from setuptools import setup, find_packages - +from setuptools import find_packages +from setuptools import setup setup( name='example', diff --git a/tox.ini b/tox.ini index 49fe4ac6..6c42a711 100644 --- a/tox.ini +++ b/tox.ini @@ -73,4 +73,4 @@ commands = python setup.py check --strict --metadata --restructuredtext check-manifest {toxinidir} flake8 src tests setup.py - isort --check-only --diff --recursive src tests setup.py + isort --check-only --diff src tests setup.py