Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.
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
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
matrix:
config:
# [Python version, tox env]
- ["3.8", "flake8"]
- ["2.7", "py27"]
- ["3.6", "py36"]
- ["3.7", "py37"]
Expand Down
38 changes: 38 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
exclude: resources/
- id: end-of-file-fixer
exclude: resources/
- 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 README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ directory in ``js.jquery_datatables_plugins``) are published to some URL.
It contains the following plugins:

* DataTables Column Filter Add-on (http://jquery-datatables-column-filter.googlecode.com/svn/trunk/index.html)

9 changes: 8 additions & 1 deletion js/jquery_datatables_plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
from fanstatic import Library, Resource
from fanstatic import Library
from fanstatic import Resource
from js.jquery_datatables import jquery_datatables_js


library = Library('jquery_datatables_plugins', 'resources')

column_filter = Resource(
library, 'columnfilter/media/js/jquery.dataTables.columnFilter.js',
depends=[jquery_datatables_js],
minified='columnfilter/media/js/jquery.dataTables.columnFilter.min.js')


__all__ = [
'column_filter',
]
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ these resources to be included on a page::

>>> import js.jquery_datatables_plugins as p
>>> p.column_filter.need()

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

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


# The version of the wrapped library is the starting point for the
# version number of the python package.
# In bugfix releases of the python package, add a '-' suffix and an
Expand Down