diff options
Diffstat (limited to '')
-rw-r--r-- | .pre-commit-config.yaml | 10 | ||||
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | identify/extensions.py | 8 | ||||
-rw-r--r-- | identify/interpreters.py | 1 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | tox.ini | 9 |
6 files changed, 23 insertions, 9 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3dd9b8d..7187380 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.1.0 + rev: v2.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -14,16 +14,16 @@ repos: - id: check-byte-order-marker - id: fix-encoding-pragma - repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.7 + rev: 3.8.0 hooks: - id: flake8 exclude: ^identify/vendor/licenses\.py$ - repo: https://github.com/pre-commit/mirrors-autopep8 - rev: v1.4.3 + rev: v1.5.2 hooks: - id: autopep8 - repo: https://github.com/asottile/reorder_python_imports - rev: v1.4.0 + rev: v2.3.0 hooks: - id: reorder-python-imports args: [ @@ -31,6 +31,6 @@ repos: '--add-import', 'from __future__ import unicode_literals', ] - repo: https://github.com/asottile/add-trailing-comma - rev: v1.0.0 + rev: v2.0.1 hooks: - id: add-trailing-comma diff --git a/.travis.yml b/.travis.yml index 0bf07c5..2f27068 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ matrix: python: 3.6 - env: TOXENV=pypy python: pypy + - env: TOXENV=pre-commit + python: 3.6 install: pip install coveralls tox script: tox after_success: coveralls diff --git a/identify/extensions.py b/identify/extensions.py index cd4db92..3f09b89 100644 --- a/identify/extensions.py +++ b/identify/extensions.py @@ -16,6 +16,9 @@ EXTENSIONS = { 'cc': {'text', 'c++'}, 'cu': {'text', 'cuda'}, 'cfg': {'text'}, + 'clj': {'text', 'clojure'}, + 'cljc': {'text', 'clojure'}, + 'cljs': {'text', 'clojure', 'clojurescript'}, 'cmake': {'text', 'cmake'}, 'cnf': {'text'}, 'coffee': {'text', 'coffee'}, @@ -23,6 +26,7 @@ EXTENSIONS = { 'cpp': {'text', 'c++'}, 'crt': {'text', 'pem'}, 'cs': {'text', 'c#'}, + 'csh': {'text', 'shell', 'csh'}, 'cson': {'text', 'cson'}, 'css': {'text', 'css'}, 'csv': {'text', 'csv'}, @@ -31,6 +35,7 @@ EXTENSIONS = { 'def': {'text', 'def'}, 'dtd': {'text', 'dtd'}, 'ear': {'binary', 'zip', 'jar'}, + 'edn': {'text', 'clojure', 'edn'}, 'ejs': {'text', 'ejs'}, 'eot': {'binary', 'eot'}, 'eps': {'binary', 'eps'}, @@ -44,6 +49,7 @@ EXTENSIONS = { 'go': {'text', 'go'}, 'gotmpl': {'text', 'gotmpl'}, 'gpx': {'text', 'gpx', 'xml'}, + 'graphql': {'text', 'graphql'}, 'gradle': {'text', 'groovy'}, 'groovy': {'text', 'groovy'}, 'gyb': {'text', 'gyb'}, @@ -150,6 +156,7 @@ EXTENSIONS = { 'tiff': {'binary', 'image', 'tiff'}, 'toml': {'text', 'toml'}, 'tf': {'text', 'terraform'}, + 'tfvars': {'text', 'terraform'}, 'ts': {'text', 'ts'}, 'tsx': {'text', 'tsx'}, 'ttf': {'binary', 'ttf'}, @@ -192,6 +199,7 @@ NAMES = { '.bash_profile': EXTENSIONS['bash'], '.bowerrc': EXTENSIONS['json'] | {'bowerrc'}, '.coveragerc': EXTENSIONS['ini'] | {'coveragerc'}, + '.cshrc': EXTENSIONS['csh'], '.dockerignore': {'text', 'dockerignore'}, '.editorconfig': {'text', 'editorconfig'}, '.gitconfig': EXTENSIONS['ini'] | {'gitconfig'}, diff --git a/identify/interpreters.py b/identify/interpreters.py index 96c1d92..bcffb5a 100644 --- a/identify/interpreters.py +++ b/identify/interpreters.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals INTERPRETERS = { 'bash': {'shell', 'bash'}, + 'csh': {'shell', 'csh'}, 'dash': {'shell', 'dash'}, 'node': {'javascript'}, 'nodejs': {'javascript'}, @@ -1,6 +1,6 @@ [metadata] name = identify -version = 1.4.15 +version = 1.4.19 description = File identification library for Python long_description = file: README.md long_description_content_type = text/markdown @@ -1,5 +1,5 @@ [tox] -envlist = py27,py35,py36,pypy +envlist = py27,py35,py36,pypy,pre-commit tox_pip_extensions_ext_venv_update = true [testenv] @@ -9,8 +9,11 @@ commands = coverage erase coverage run -m pytest {posargs:tests} coverage report --fail-under 100 - pre-commit install -f --install-hooks - pre-commit run --all-files + +[testenv:pre-commit] +skip_install = true +deps = pre-commit +commands = pre-commit run --all-files --show-diff-on-failure [flake8] max-line-length = 119 |