-
Notifications
You must be signed in to change notification settings - Fork 60
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
feat: update plugin overcomes conflicting parameter types #386
Conversation
e94c7b3
to
b8df029
Compare
2da0e1c
to
e39344f
Compare
75893d5
to
18cefdf
Compare
# As the following code snippet, the type of `foo` is `int` but the assigned value is `luigi.IntParameter()`. | ||
# foo: int = luigi.IntParameter() | ||
# TODO: infer mypy type from the parameter type. | ||
return AnyType(TypeOfAny.unannotated) |
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.
If no default value, a parameter handled as AnyType(TypeOfAny.unannotated)
Due to this, type annotation for the TaskOnKart
takes precedence.
18cefdf
to
cfbbcaa
Compare
ec0013c
to
08e2b74
Compare
cfbbcaa
to
448b4ae
Compare
a0768e9
to
51cd342
Compare
51cd342
to
a31a847
Compare
@@ -59,7 +59,7 @@ def set_task_lock(task_lock_params: TaskLockParams) -> redis.lock.Lock: | |||
|
|||
def set_lock_scheduler(task_lock: redis.lock.Lock, task_lock_params: TaskLockParams) -> BackgroundScheduler: | |||
scheduler = BackgroundScheduler() | |||
extend_lock = functools.partial(_extend_lock, task_lock=task_lock, redis_timeout=task_lock_params.redis_timeout) | |||
extend_lock = functools.partial(_extend_lock, task_lock=task_lock, redis_timeout=task_lock_params.redis_timeout or 0) |
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.
_extend_lock does not accept optional value
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.
LGTM
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.
Looks good!
What
update plugin overcomes conflicting parameter types
Any(unannotated)
and use type annotationsFuture Work
#387