From 261fb3d66c68a832477996b9dc71bee2faac67fa Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 24 Feb 2020 10:57:26 -0800 Subject: [PATCH] pre-commit-hooks: python3.6.1+ --- .pre-commit-config.yaml | 5 +++-- setup.cfg | 2 +- tests/sort_simple_yaml_test.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 464609b..f3aff06 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,12 +16,13 @@ repos: rev: 3.7.9 hooks: - id: flake8 + additional_dependencies: [flake8-typing-imports==1.7.0] - repo: https://github.com/pre-commit/mirrors-autopep8 rev: v1.5 hooks: - id: autopep8 - repo: https://github.com/pre-commit/pre-commit - rev: v2.0.1 + rev: v2.1.1 hooks: - id: validate_manifest - repo: https://github.com/asottile/reorder_python_imports @@ -30,7 +31,7 @@ repos: - id: reorder-python-imports args: [--py3-plus] - repo: https://github.com/asottile/pyupgrade - rev: v1.26.2 + rev: v2.0.1 hooks: - id: pyupgrade args: [--py36-plus] diff --git a/setup.cfg b/setup.cfg index 6b1a34d..c05ca0c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,7 +25,7 @@ install_requires = flake8 ruamel.yaml>=0.15 toml -python_requires = >=3.6 +python_requires = >=3.6.1 [options.entry_points] console_scripts = diff --git a/tests/sort_simple_yaml_test.py b/tests/sort_simple_yaml_test.py index 69ad388..77e95d5 100644 --- a/tests/sort_simple_yaml_test.py +++ b/tests/sort_simple_yaml_test.py @@ -46,7 +46,7 @@ def test_integration_good_bad_lines(tmpdir, bad_lines, good_lines, retval): assert main([file_path]) == retval - with open(file_path, 'r') as f: + with open(file_path) as f: assert [line.rstrip() for line in f.readlines()] == good_lines