summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-11-03 06:14:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-11-03 06:14:07 +0000
commitfb30f8c3416b99ff543094ffa977802ec5eb4f0e (patch)
treec74d32a6a68c3fd6267399d0ded737c39a5ac4e4
parentReleasing debian version 1.5.5-1. (diff)
downloadidentify-fb30f8c3416b99ff543094ffa977802ec5eb4f0e.tar.xz
identify-fb30f8c3416b99ff543094ffa977802ec5eb4f0e.zip
Merging upstream version 1.5.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--.coveragerc29
-rw-r--r--.travis.yml19
-rw-r--r--Makefile16
-rw-r--r--README.md5
-rw-r--r--azure-pipelines.yml19
-rw-r--r--identify/extensions.py3
-rw-r--r--requirements-dev.txt2
-rw-r--r--setup.cfg9
-rw-r--r--tests/identify_test.py10
-rw-r--r--tox.ini4
10 files changed, 38 insertions, 78 deletions
diff --git a/.coveragerc b/.coveragerc
deleted file mode 100644
index f995964..0000000
--- a/.coveragerc
+++ /dev/null
@@ -1,29 +0,0 @@
-[run]
-branch = True
-source =
- .
-omit =
- .tox/*
- /usr/*
- setup.py
-
-[report]
-show_missing = True
-
-exclude_lines =
- # Have to re-enable the standard pragma
- \#\s*pragma: no cover
-
- # Don't complain if tests don't hit defensive assertion code:
- ^\s*raise AssertionError\b
- ^\s*raise NotImplementedError\b
- ^\s*return NotImplemented\b
- ^\s*raise$
-
- # Don't complain if non-runnable code isn't run:
- ^if __name__ == ['"]__main__['"]:$
-
-[html]
-directory = coverage-html
-
-# vim:ft=dosini
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 2f27068..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-language: python
-matrix:
- include:
- - env: TOXENV=py27
- - env: TOXENV=py35
- python: 3.5
- - env: TOXENV=py36
- 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
-cache:
- directories:
- - $HOME/.cache/pip
- - $HOME/.cache/pre-commit
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 0ce294d..0000000
--- a/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-.PHONY: minimal
-minimal: venv
-
-venv: setup.py requirements-dev.txt tox.ini
- tox -e venv
-
-.PHONY: test
-test:
- tox
-
-.PHONY: clean
-clean:
- find -name '*.pyc' -delete
- find -name '__pycache__' -delete
- rm -rf .tox
- rm -rf venv
diff --git a/README.md b/README.md
index 17aabd2..accf29b 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,9 @@
identify
========
-[![Build Status](https://travis-ci.org/chriskuehl/identify.svg?branch=master)](https://travis-ci.org/chriskuehl/identify)
-[![Coverage Status](https://coveralls.io/repos/github/chriskuehl/identify/badge.svg?branch=master)](https://coveralls.io/github/chriskuehl/identify?branch=master)
+[![Build Status](https://dev.azure.com/asottile/asottile/_apis/build/status/pre-commit.identify?branchName=master)](https://dev.azure.com/asottile/asottile/_build/latest?definitionId=67&branchName=master)
+[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/asottile/asottile/67/master.svg)](https://dev.azure.com/asottile/asottile/_build/latest?definitionId=67&branchName=master)
+[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/pre-commit/identify/master.svg)](https://results.pre-commit.ci/latest/github/pre-commit/identify/master)
[![PyPI version](https://badge.fury.io/py/identify.svg)](https://pypi.python.org/pypi/identify)
File identification library for Python.
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 0000000..7bb7600
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,19 @@
+trigger:
+ branches:
+ include: [master, test-me-*]
+ tags:
+ include: ['*']
+
+resources:
+ repositories:
+ - repository: asottile
+ type: github
+ endpoint: github
+ name: asottile/azure-pipeline-templates
+ ref: refs/tags/v2.0.0
+
+jobs:
+- template: job--python-tox.yml@asottile
+ parameters:
+ toxenvs: [pypy3, py36, py37, py38]
+ os: linux
diff --git a/identify/extensions.py b/identify/extensions.py
index 1110ccb..5d5a685 100644
--- a/identify/extensions.py
+++ b/identify/extensions.py
@@ -27,6 +27,7 @@ EXTENSIONS = {
'cpp': {'text', 'c++'},
'crt': {'text', 'pem'},
'cs': {'text', 'c#'},
+ 'csproj': {'text', 'xml', 'csproj'},
'csh': {'text', 'shell', 'csh'},
'cson': {'text', 'cson'},
'css': {'text', 'css'},
@@ -151,6 +152,7 @@ EXTENSIONS = {
'scm': {'text', 'scheme'},
'scss': {'text', 'scss'},
'sh': {'text', 'shell'},
+ 'sln': {'text', 'sln'},
'sls': {'text', 'salt'},
'so': {'binary'},
'sol': {'text', 'solidity'},
@@ -186,6 +188,7 @@ EXTENSIONS = {
'vue': {'text', 'vue'},
'war': {'binary', 'zip', 'jar'},
'wav': {'binary', 'audio', 'wav'},
+ 'webp': {'binary', 'image', 'webp'},
'whl': {'binary', 'wheel', 'zip'},
'wkt': {'text', 'wkt'},
'woff': {'binary', 'woff'},
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 6732f9c..0c5a37e 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,3 +1,3 @@
+covdefaults
coverage
-pre-commit>=0.12.0
pytest
diff --git a/setup.cfg b/setup.cfg
index c742f5a..2b90b9f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,10 +1,10 @@
[metadata]
name = identify
-version = 1.5.5
+version = 1.5.7
description = File identification library for Python
long_description = file: README.md
long_description_content_type = text/markdown
-url = https://github.com/chriskuehl/identify
+url = https://github.com/pre-commit/identify
author = Chris Kuehl
author_email = ckuehl@ocf.berkeley.edu
license = MIT
@@ -37,5 +37,8 @@ exclude =
tests*
testing*
-[wheel]
+[bdist_wheel]
universal = True
+
+[coverage:run]
+plugins = covdefaults
diff --git a/tests/identify_test.py b/tests/identify_test.py
index a80c401..8e00f60 100644
--- a/tests/identify_test.py
+++ b/tests/identify_test.py
@@ -105,7 +105,7 @@ def test_tags_from_path_plist_text(tmpdir):
x = tmpdir.join('t.plist')
x.write(
'<?xml version="1.0" encoding="UTF-8"?>\n'
- '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n'
+ '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n' # noqa: E501
'<plist version="1.0">\n'
'<dict>\n'
'\t<key>Last Login Name</key>\n'
@@ -179,12 +179,14 @@ def test_tags_from_interpreter(interpreter, expected):
(b'', True),
('éóñəå ⊂(◉‿◉)つ(ノ≥∇≤)ノ'.encode('utf8'), True),
(r'¯\_(ツ)_/¯'.encode('utf8'), True),
- ('♪┏(・o・)┛♪┗ ( ・o・) ┓♪┏ ( ) ┛♪┗ (・o・ ) ┓♪┏(・o・)┛♪'.encode('utf8'), True),
+ ('♪┏(・o・)┛♪┗ ( ・o・) ┓♪┏ ( ) ┛♪┗ (・o・ ) ┓♪'.encode('utf8'), True),
('éóñå'.encode('latin1'), True),
(b'hello world\x00', False),
- (b'\x7f\x45\x4c\x46\x02\x01\x01', False), # first few bytes of /bin/bash
- (b'\x43\x92\xd9\x0f\xaf\x32\x2c', False), # some /dev/urandom output
+ # first few bytes of /bin/bash
+ (b'\x7f\x45\x4c\x46\x02\x01\x01', False),
+ # some /dev/urandom output
+ (b'\x43\x92\xd9\x0f\xaf\x32\x2c', False),
),
)
def test_is_text(data, expected):
diff --git a/tox.ini b/tox.ini
index 33cae3c..2876390 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,5 @@
[tox]
envlist = py27,py35,py36,pypy,pre-commit
-tox_pip_extensions_ext_venv_update = true
[testenv]
deps = -rrequirements-dev.txt
@@ -15,8 +14,5 @@ skip_install = true
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
-[flake8]
-max-line-length = 119
-
[pep8]
ignore = E265,E501,W504