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

Fix config(exclude=…) type annotations #368

Merged
merged 1 commit into from
Jul 1, 2023

Conversation

andersk
Copy link
Contributor

@andersk andersk commented Jul 12, 2022

  • The exclude callback takes one argument, not two.
  • Objects of type Exclude are not accepted. ALWAYS and NEVER have type Callable, not Exclude.
  • Class variables like Exclude.ALWAYS, Exclude.NEVER are not allowed to be generic, and they don’t need to be, since Callable[[object], bool] is convertible to Callable[[T], bool].

@andersk
Copy link
Contributor Author

andersk commented Jul 12, 2022

@george-zubrienko
Copy link
Collaborator

hi @andersk could you please update your PR so we can review and merge :)

• The exclude callback takes one argument, not two.

• Objects of type Exclude are not accepted.  ALWAYS and NEVER have
  type Callable, not Exclude.

• Class variables like Exclude.ALWAYS, Exclude.NEVER are not allowed
  to be generic, and they don’t need to be, since Callable[[object],
  bool] is convertible to Callable[[T], bool].

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@andersk
Copy link
Contributor Author

andersk commented Jul 1, 2023

@george-zubrienko Rebased.

@george-zubrienko george-zubrienko self-requested a review July 1, 2023 07:12
@george-zubrienko george-zubrienko merged commit 80cacce into lidatong:master Jul 1, 2023
@andersk andersk deleted the exclude-type branch November 28, 2023 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants