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

Simplify typehints #248

Open
deathowl opened this issue Oct 2, 2020 · 0 comments
Open

Simplify typehints #248

deathowl opened this issue Oct 2, 2020 · 0 comments
Labels
easy enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@deathowl
Copy link
Member

deathowl commented Oct 2, 2020

As per @fornellas comments on #246 do these:

  • Unions of BaseException & other exception types (eg: Exception). Shouldn't BaseException be enough? All Python exception are subclasses of it, I think it should work just fine with only it.

  • There are lots of Callable types (no args, no return) or Callable[[a,b,c...], d], mostly related to DSL hooks, such as examples, before / after hooks etc. TBH, this PR is awesome as it is, but I was thinking about having custom types such as ExampleFunction = Callable[[_ContextData], None] (non-blocking here to be clear).

@deathowl deathowl added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers easy labels Oct 2, 2020
facebook-github-bot pushed a commit that referenced this issue Aug 16, 2021
Summary:
<!--
Thank you for your interest in this project. Bugs filed and PRs submitted are appreciated!

Please make sure that you are familiar with and follow the Code of Conduct of this project which can be found at https://github.com/facebookincubator/TestSlide/blob/master/CODE_OF_CONDUCT.md

Also, please make sure you're familiar with and follow the instructions in the contributing guidelines which can  be found at https://github.com/facebookincubator/TestSlide/blob/master/CONTRIBUTING.md

-->

**What:**
#248

**Why:**
Simplifying type hints by removal of subclasses of BaseExceptions.

**How:**

**Risks:**

**Checklist**:

<!--
Have you done all of these things?
To check an item, place an "x" in the box like so: "- [x] Tests"
Add "N/A" to the end of each line that's irrelevant to your changes
-->

- [x] Added tests, if you've added code that should be tested
- [x] Updated the documentation, if you've changed APIs
- [x] Ensured the test suite passes
- [x] Made sure your code lints
- [x] Completed the Contributor License Agreement ("CLA")

Pull Request resolved: #312

Reviewed By: macisamuele

Differential Revision: D30336675

Pulled By: deathowl

fbshipit-source-id: 87fbf1d074c051683e0b72159aa0136af026e6a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant