Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #235

Merged
merged 3 commits into from
Jul 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.0.1
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v2.15.0
rev: v2.20.0
hooks:
- id: pyupgrade
- repo: https://github.com/myint/autoflake
Expand All @@ -14,15 +14,15 @@ repos:
- id: autoflake
args: ["--in-place", "--remove-all-unused-imports"]
- repo: https://github.com/PyCQA/isort
rev: 5.8.0
rev: 5.9.1
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v2.15.0
rev: v2.20.0
hooks:
- id: pyupgrade
- repo: https://github.com/psf/black
rev: 21.5b1
rev: 21.6b0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
Expand All @@ -33,7 +33,7 @@ repos:
pass_filenames: true
exclude: (examples|_mpl_image)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
rev: v0.910
hooks:
- id: mypy
additional_dependencies: [tokenize-rt==3.2.0]
Expand Down
5 changes: 1 addition & 4 deletions magicgui/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,7 @@ def connect(
criteria = [criteria]
for c in criteria:
count = sum(
[
(c == cn or c == cc)
for cn, cc in zip(callback_refs, callbacks)
]
(c == cn or c == cc) for cn, cc in zip(callback_refs, callbacks)
)
if count != 1:
raise ValueError(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ ignore_missing_imports = True
[mypy-.examples/,magicgui._mpl_image.*]
ignore_errors = True

[mypy-.examples,numpy.*,_pytest.*,packaging.*,importlib_metadata.*]
[mypy-.examples,numpy.*,_pytest.*,packaging.*,importlib_metadata.*,docstring_parser.*]
ignore_errors = True


Expand Down
28 changes: 14 additions & 14 deletions typesafety/test_decorator_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
reveal_type(magicgui(main_window=True)(f)())

out: |
main:5:13: note: Revealed type is 'def [_R] (def (*Any, **Any) -> _R`-1) -> magicgui.widgets._function_gui.FunctionGui[_R`-1]'
main:6:13: note: Revealed type is 'magicgui.widgets._function_gui.FunctionGui[builtins.str*]'
main:7:13: note: Revealed type is 'builtins.str*'
main:8:13: note: Revealed type is 'def [_R] (def (*Any, **Any) -> _R`-1) -> magicgui.widgets._function_gui.MainFunctionGui[_R`-1]'
main:9:13: note: Revealed type is 'magicgui.widgets._function_gui.MainFunctionGui[builtins.str*]'
main:10:13: note: Revealed type is 'builtins.str*'
main:5:13: note: Revealed type is "def [_R] (def (*Any, **Any) -> _R`-1) -> magicgui.widgets._function_gui.FunctionGui[_R`-1]"
main:6:13: note: Revealed type is "magicgui.widgets._function_gui.FunctionGui[builtins.str*]"
main:7:13: note: Revealed type is "builtins.str*"
main:8:13: note: Revealed type is "def [_R] (def (*Any, **Any) -> _R`-1) -> magicgui.widgets._function_gui.MainFunctionGui[_R`-1]"
main:9:13: note: Revealed type is "magicgui.widgets._function_gui.MainFunctionGui[builtins.str*]"
main:10:13: note: Revealed type is "builtins.str*"

- case: magic_factory_return_types
skip: os.name == 'nt'
Expand All @@ -37,11 +37,11 @@
reveal_type(magic_factory(main_window=True)(f)()())

out: |
main:5:13: note: Revealed type is 'def [_R] (def (*Any, **Any) -> _R`-1) -> magicgui._magicgui.MagicFactory[magicgui.widgets._function_gui.FunctionGui[_R`-1]]'
main:6:13: note: Revealed type is 'magicgui._magicgui.MagicFactory[magicgui.widgets._function_gui.FunctionGui[builtins.str*]]'
main:7:13: note: Revealed type is 'magicgui.widgets._function_gui.FunctionGui*[builtins.str*]'
main:8:13: note: Revealed type is 'builtins.str*'
main:9:13: note: Revealed type is 'def [_R] (def (*Any, **Any) -> _R`-1) -> magicgui._magicgui.MagicFactory[magicgui.widgets._function_gui.MainFunctionGui[_R`-1]]'
main:10:13: note: Revealed type is 'magicgui._magicgui.MagicFactory[magicgui.widgets._function_gui.MainFunctionGui[builtins.str*]]'
main:11:13: note: Revealed type is 'magicgui.widgets._function_gui.MainFunctionGui*[builtins.str*]'
main:12:13: note: Revealed type is 'builtins.str*'
main:5:13: note: Revealed type is "def [_R] (def (*Any, **Any) -> _R`-1) -> magicgui._magicgui.MagicFactory[magicgui.widgets._function_gui.FunctionGui[_R`-1]]"
main:6:13: note: Revealed type is "magicgui._magicgui.MagicFactory[magicgui.widgets._function_gui.FunctionGui[builtins.str*]]"
main:7:13: note: Revealed type is "magicgui.widgets._function_gui.FunctionGui*[builtins.str*]"
main:8:13: note: Revealed type is "builtins.str*"
main:9:13: note: Revealed type is "def [_R] (def (*Any, **Any) -> _R`-1) -> magicgui._magicgui.MagicFactory[magicgui.widgets._function_gui.MainFunctionGui[_R`-1]]"
main:10:13: note: Revealed type is "magicgui._magicgui.MagicFactory[magicgui.widgets._function_gui.MainFunctionGui[builtins.str*]]"
main:11:13: note: Revealed type is "magicgui.widgets._function_gui.MainFunctionGui*[builtins.str*]"
main:12:13: note: Revealed type is "builtins.str*"