Skip to content

Commit

Permalink
🎨 Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Mar 18, 2020
1 parent 91af02f commit 705933b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ doc = [
"mkdocs-material",
"markdown-include"
]
dev = [
"autoflake",
"flake8",
]
all = [
"colorama",
"shellingham"
Expand Down
7 changes: 3 additions & 4 deletions tests/test_others.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Optional
from unittest import mock

import click
import pytest
import shellingham
import typer
Expand All @@ -12,8 +13,6 @@
from typer.models import TyperInfo
from typer.testing import CliRunner

import click.exceptions

runner = CliRunner()


Expand Down Expand Up @@ -86,7 +85,7 @@ def name_callback(ctx, param, val1, val2):
def main(name: str = typer.Option(..., callback=name_callback)):
pass # pragma: nocover

with pytest.raises(click.exceptions.ClickException) as exc_info:
with pytest.raises(click.ClickException) as exc_info:
runner.invoke(app, ["--name", "Camila"])
assert (
exc_info.value.message == "Too many CLI parameter callback function parameters"
Expand Down Expand Up @@ -197,6 +196,6 @@ def name_callback(ctx, args, incomplete, val2):
def main(name: str = typer.Option(..., autocompletion=name_callback)):
pass # pragma: nocover

with pytest.raises(click.exceptions.ClickException) as exc_info:
with pytest.raises(click.ClickException) as exc_info:
runner.invoke(app, ["--name", "Camila"])
assert exc_info.value.message == "Invalid autocompletion callback parameters: val2"

1 comment on commit 705933b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.