Run pre-commit autoupdate to bump versions of precommit hooks, then run them on all files (#913)

This commit is contained in:
Dan 2019-03-08 11:09:45 -08:00 committed by Eran Kampf
parent fd0bd0ccd7
commit 9ae2359b87
13 changed files with 25 additions and 20 deletions

View File

@ -1,24 +1,28 @@
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v1.3.0
rev: v2.1.0
hooks:
- id: check-merge-conflict
- id: check-json
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude: ^docs/.*$
- id: trailing-whitespace
exclude: README.md
- id: pretty-format-json
args:
- --autofix
- id: flake8
- id: trailing-whitespace
exclude: README.md
- repo: https://github.com/asottile/pyupgrade
rev: v1.4.0
rev: v1.12.0
hooks:
- id: pyupgrade
- repo: https://github.com/ambv/black
rev: 18.6b4
rev: 18.9b0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 3.7.7
hooks:
- id: flake8

View File

@ -707,7 +707,10 @@ class Signature(object):
break
elif param.name in kwargs:
if param.kind == _POSITIONAL_ONLY:
msg = "{arg!r} parameter is positional only, " "but was passed as a keyword"
msg = (
"{arg!r} parameter is positional only, "
"but was passed as a keyword"
)
msg = msg.format(arg=param.name)
raise TypeError(msg)
parameters_ex = (param,)

View File

@ -75,9 +75,7 @@ def to_arguments(args, extra_args=None):
arg_name = default_name or arg.name
assert (
arg_name not in arguments
), 'More than one Argument have same name "{}".'.format(
arg_name
)
), 'More than one Argument have same name "{}".'.format(arg_name)
arguments[arg_name] = arg
return arguments

View File

@ -1,5 +1,9 @@
from ..utils.subclass_with_meta import SubclassWithMeta
from ..utils.trim_docstring import trim_docstring
import six
if six.PY3:
from typing import Type
class BaseOptions(object):

View File

@ -4,6 +4,9 @@ from graphql.language.ast import BooleanValue, FloatValue, IntValue, StringValue
from .base import BaseOptions, BaseType
from .unmountedtype import UnmountedType
if six.PY3:
from typing import Any
class ScalarOptions(BaseOptions):
pass

View File

@ -1,5 +1,3 @@
from ..argument import Argument
from ..enum import Enum
from ..field import Field

View File

@ -1,4 +1,3 @@
from ..argument import Argument
from ..field import Field
from ..inputfield import InputField

View File

@ -1,4 +1,3 @@
from ..json import JSONString
from ..objecttype import ObjectType
from ..schema import Schema

View File

@ -1,4 +1,3 @@
from ..field import Field
from ..scalars import String

View File

@ -1,4 +1,3 @@
from ..resolver import (
attr_resolver,
dict_resolver,

View File

@ -1,4 +1,3 @@
from ..scalars import Scalar

View File

@ -18,4 +18,4 @@ def to_snake_case(name):
def to_const(string):
return re.sub("[\W|^]+", "_", string).upper() # noqa
return re.sub(r"[\W|^]+", "_", string).upper() # noqa