-
Notifications
You must be signed in to change notification settings - Fork 162
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
Static Typing profilers/profiler_options.py #644
Static Typing profilers/profiler_options.py #644
Conversation
@@ -1,9 +1,12 @@ | |||
#!/usr/bin/env python | |||
"""Specify the options when running the data profiler.""" | |||
from __future__ import annotations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On line 36, I added
if TYPE_CHECKING:
from .profile_builder import BaseProfiler
because BaseProfiler has a circular dependency with utils. Adding this means that I need to postpone the evaluation of type annotations, since BaseProfiler is not defined until later. In Python 3.7, this can be done by importing annotations from __future__
or by using "BaseProfiler"
instead of BaseProfiler
for types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I thought this was for the utils PR. For this one, it's because the class types aren't defined until later. PEP 563
@tonywu315 FYI, I think your code is out of date. You will likely need to rebase this branch onto |
1 similar comment
@tonywu315 FYI, I think your code is out of date. You will likely need to rebase this branch onto |
No description provided.