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

Convert function decorators to class decorators #290

Merged
merged 7 commits into from
Mar 6, 2020

Conversation

Peilonrayz
Copy link
Contributor

@Peilonrayz Peilonrayz commented Mar 4, 2020

Hey, sorry for the delay.
I have improved typing as discussed in #287. I have:

  • Updated the noxfile.py to include the --warn-unused-ignores flag.
  • Made a _decorators file, as the code started to call and inherit from multiple different files. This was causing some cyclical dependencies.
  • Changed _parametrize.generate_calls to a class decorator, Call.
  • Changed registry.session_decorator to delegate to a class decorator, Func.
  • Moved manifest._copy_func into _decorators and call it in Func.
  • Changed manifest.Manifest.make_session to use Func.copy rather than manifest._copy_func.
  • Made Call subclass Func.
  • Removed a large amount of # type: ignore.
  • Updated a few Callable to Func.
  • Updated tests.

Given the size of the existing PR I have decided to leave the typing of the attributes as is.

Copy link
Collaborator

@theacodes theacodes left a comment

Choose a reason for hiding this comment

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

Great work! Thank you so much!

@theacodes theacodes merged commit 8869bf2 into wntrblm:master Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants