summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonny Pfannschmidt <opensource@ronnypfannschmidt.de>2020-11-28 11:58:15 +0100
committerGitHub <noreply@github.com>2020-11-28 11:58:15 +0100
commitf1a35885d8c098fdb9742a5677d41908427c7c8c (patch)
tree358875bb27faf8a61d79971af04b8f451805235c
parent303defef04aa1a60dc74a4e52fef0bcf05c3d6be (diff)
parent7204399f20c634f7d1315e33b9dca7aa566c0ecd (diff)
downloadsetuptools-scm-f1a35885d8c098fdb9742a5677d41908427c7c8c.tar.gz
Merge pull request #493 from RonnyPfannschmidt/pre-commit-update
pre-commit update
-rw-r--r--.pre-commit-config.yaml9
-rw-r--r--testing/conftest.py7
-rw-r--r--testing/test_git.py3
-rw-r--r--testing/test_mercurial.py5
-rw-r--r--tox.ini2
5 files changed, 13 insertions, 13 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a417dec..0063a11 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,19 +1,22 @@
exclude: setuptools_scm/win_py31_compat.py
repos:
- repo: https://github.com/ambv/black
- rev: 19.10b0
+ rev: 20.8b1
hooks:
- id: black
args: [--safe, --quiet]
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v2.5.0
+ rev: v3.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
+- repo: https://gitlab.com/pycqa/flake8
+ rev: 3.8.4
+ hooks:
- id: flake8
- repo: https://github.com/asottile/pyupgrade
- rev: v2.3.0
+ rev: v2.7.4
hooks:
- id: pyupgrade
diff --git a/testing/conftest.py b/testing/conftest.py
index 38e358c..5f6cdd5 100644
--- a/testing/conftest.py
+++ b/testing/conftest.py
@@ -1,7 +1,6 @@
import os
import itertools
import pytest
-import six
# 2009-02-13T23:31:30+00:00
os.environ["SOURCE_DATE_EPOCH"] = "1234567890"
@@ -42,10 +41,10 @@ class Wd(object):
filename = self.cwd / name
if kw:
value = value.format(**kw)
- if isinstance(value, six.text_type):
- filename.write_text(value)
- else:
+ if isinstance(value, bytes):
filename.write_bytes(value)
+ else:
+ filename.write_text(value)
return filename
def _reason(self, given_reason):
diff --git a/testing/test_git.py b/testing/test_git.py
index 3980281..6f5246c 100644
--- a/testing/test_git.py
+++ b/testing/test_git.py
@@ -286,8 +286,7 @@ def test_non_dotted_tag_no_version_match(wd):
@pytest.mark.issue("https://github.com/pypa/setuptools_scm/issues/381")
def test_gitdir(monkeypatch, wd):
- """
- """
+ """"""
wd.commit_testfile()
normal = wd.version
# git hooks set this and break subsequent setuptools_scm unless we clean
diff --git a/testing/test_mercurial.py b/testing/test_mercurial.py
index 29370c1..815ca00 100644
--- a/testing/test_mercurial.py
+++ b/testing/test_mercurial.py
@@ -152,8 +152,7 @@ def test_version_bump_from_merge_commit(wd):
@pytest.mark.usefixtures("version_1_0")
def test_version_bump_from_commit_including_hgtag_mods(wd):
- """ Test the case where a commit includes changes to .hgtags and other files
- """
+ """Test the case where a commit includes changes to .hgtags and other files"""
with wd.cwd.joinpath(".hgtags").open("ab") as tagfile:
tagfile.write(b"0 0\n")
wd.write("branchfile", "branchtext")
@@ -166,7 +165,7 @@ def test_version_bump_from_commit_including_hgtag_mods(wd):
@pytest.mark.issue(229)
@pytest.mark.usefixtures("version_1_0")
def test_latest_tag_detection(wd):
- """ Tests that tags not containing a "." are ignored, the same as for git.
+ """Tests that tags not containing a "." are ignored, the same as for git.
Note that will be superceded by the fix for pypa/setuptools_scm/issues/235
"""
wd('hg tag some-random-tag -u test -d "0 0"')
diff --git a/tox.ini b/tox.ini
index 8b27a88..4e38757 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist=py{27,34,35,36,37,38}-test,flake8,check_readme,py{27,37}-selfcheck
+envlist=py{27,34,35,36,37,38,39}-test,flake8,check_readme,py{27,37}-selfcheck
[pytest]
testpaths=testing