Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Lint

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
type: [ "opened", "reopened", "synchronize" ]

env:
FORCE_COLOR: 1

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.cache/pre-commit
key:
lint-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/.pre-commit-config.yaml') }}
restore-keys: |
lint-v1-
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install pre-commit
- name: Lint
run: |
pre-commit run --all-files --show-diff-on-failure
env:
PRE_COMMIT_COLOR: always
36 changes: 36 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: check-yaml
- id: debug-statements
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
language_version: python3
additional_dependencies: [flake8-typing-imports==1.9.0]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.5.4
hooks:
- id: autopep8
- repo: https://github.com/timothycrosley/isort
rev: 5.7.0
hooks:
- id: isort
args: [--filter-files]
files: \.py$
- repo: local
hooks:
- id: rst
name: rst
entry: rst-lint --encoding utf-8
files: .rst
language: python
additional_dependencies: [pygments, restructuredtext_lint]
1 change: 0 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ include .coveragerc
include tox.ini

recursive-include src *.txt *.zcml

8 changes: 8 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
[bdist_wheel]
universal = 0

[isort]
lines_between_sections = 0
lines_after_imports = 2
no_sections = True
from_first = True
lines_between_types = 0
force_single_line = True
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from setuptools import setup, find_packages
from setuptools import find_packages
from setuptools import setup


setup(
Expand Down
3 changes: 2 additions & 1 deletion src/gocept/httpserverlayer/wsgi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from wsgiref.simple_server import WSGIServer, WSGIRequestHandler
from wsgiref.simple_server import WSGIRequestHandler
from wsgiref.simple_server import WSGIServer
import os
import plone.testing
import threading
Expand Down
1 change: 0 additions & 1 deletion src/gocept/httpserverlayer/zopeappwsgi/testing.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@
<grant role="zope.Manager" principal="zope.mgr" />

</configure>

2 changes: 1 addition & 1 deletion src/gocept/httpserverlayer/zopeappwsgi/tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import gocept.httpserverlayer.tests.isolation
from gocept.httpserverlayer.zopeappwsgi.testing import ZODB_LAYER
import gocept.httpserverlayer.tests.isolation
import unittest


Expand Down