-
Notifications
You must be signed in to change notification settings - Fork 701
More lint #43
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
More lint #43
Conversation
Why would we ignore our line length limits in setup.py? Also use more mypy checks for test code (without check_untyped_defs it's really useless).
docs/conf.py
Outdated
@@ -18,7 +18,7 @@ | |||
# -- Project information ----------------------------------------------------- | |||
|
|||
project = 'OpenTelemetry' | |||
copyright = '2019, OpenTelemetry Authors' | |||
copyright = '2019, OpenTelemetry Authors' #pylint:disable=redefined-builtin |
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.
We should probably just not lint docs/
.
Looks good, but why not disable type checking for unit tests altogether? |
We could disable type checking but I think it might be good to enable it, also to find issues with type hints in the API (for example, it might be possible to define a type hint that works for the function definition but is actually too strict for typical usages) |
To find issues with the types in the API I think it would be great to have run time type checking during tests, that way we could write tests without type annotations but still benefit from the checks. But I don't see any non-hacky way to do this. |
The static type (the one that the type checker infers) could still be different from the runtime type. The typical usage for type hints that I would expect is that users run Also, I hope that even without explicit type hints |
@reyang, @carlosalberto let me know if this LGTY and we can merge it. |
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
that got lost in master merge.
Building on #42 (which in turn builds on #29, sorry): lint code in setup.py, docs/conf.py.
This does not add linting to the stub
opentelemetry-sdk
package.