File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 3131 python -m pip install --upgrade pip
3232 pip install --pre -e '.[dev]'
3333 - name : Pre-commit hooks
34- if : ${{ matrix.python_version != 'pypy3' }}
34+ if : ${{ matrix.python_version != 'pypy3' && matrix.python_version != '3.6' }}
3535 run : pre-commit run --all-files
3636 - name : Test with pytest
3737 run : pytest
Original file line number Diff line number Diff line change 11repos :
22- repo : https://github.com/asottile/pyupgrade
3- rev : v2.7.4
3+ rev : v2.31.0 # Later versions do not support python 3.6
44 hooks :
55 - id : pyupgrade
66 args : ["--py36-plus"]
77- repo : https://github.com/python/black
8- rev : 20.8b1
8+ rev : 22.3.0
99 hooks :
1010 - id : black
1111 language_version : python3
1212- repo : https://gitlab.com/pycqa/flake8
13- rev : 3.8.4
13+ rev : 3.9.2
1414 hooks :
1515 - id : flake8
1616 additional_dependencies : ['flake8-bugbear==19.8.0']
1717- repo : https://github.com/pre-commit/mirrors-mypy
18- rev : v0.790
18+ rev : v0.931 # Later versions do not support python 3.6
1919 hooks :
2020 - id : mypy
2121 additional_dependencies : [marshmallow-enum,typeguard,marshmallow]
2222 args : [--show-error-codes]
2323- repo : https://github.com/asottile/blacken-docs
24- rev : v1.9.1
24+ rev : v1.12.0 # Later versions do not support python 3.6
2525 hooks :
2626 - id : blacken-docs
2727 additional_dependencies : [black==19.3b0]
Original file line number Diff line number Diff line change @@ -597,8 +597,8 @@ def field_for_schema(
597597
598598 # typing.NewType returns a function (in python <= 3.9) or a class (python >= 3.10) with a
599599 # __supertype__ attribute
600- if typing_inspect . is_new_type (typ ):
601- newtype_supertype = getattr ( typ , "__supertype__" , None )
600+ newtype_supertype = getattr (typ , "__supertype__" , None )
601+ if typing_inspect . is_new_type ( typ ) and newtype_supertype is not None :
602602 return _field_by_supertype (
603603 typ = typ ,
604604 default = default ,
Original file line number Diff line number Diff line change 1818EXTRAS_REQUIRE = {
1919 "enum" : ["marshmallow-enum" ],
2020 "union" : ["typeguard" ],
21+ "lint" : ["pre-commit~=2.17" ],
2122 ':python_version == "3.6"' : ["dataclasses" , "types-dataclasses<0.6.4" ],
22- "lint" : ["pre-commit~=1.18" ],
2323 "docs" : ["sphinx" ],
2424 "tests" : [
2525 "pytest>=5.4" ,
You can’t perform that action at this time.
0 commit comments