-
Notifications
You must be signed in to change notification settings - Fork 9
Migrate to pyproject.toml #93
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
Migrate to pyproject.toml #93
Conversation
ccdfafb
to
5d02089
Compare
5d02089
to
e79711c
Compare
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.
I like this unification!
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.
I in general like this change, however we cannot force black to always run in check mode in pyproject.toml
.
db565ba
to
87e53fc
Compare
a6f909a
to
2de8b20
Compare
kentik_api_library/pyproject.toml
Outdated
ignore_missing_imports = true | ||
exclude = "(generated|build)/" | ||
|
||
[[tool.mypy.overrides]] |
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.
Are the double square brackets required?
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.
I think the whole section is redundant. Removing
kentik_api_library/setup.py
Outdated
packages=PACKAGES, | ||
package_dir={pkg: os.path.join(*pkg.split(".")) for pkg in PACKAGES}, | ||
cmdclass={"pylint": PylintCmd, "mypy": MypyCmd}, | ||
cmdclass={"pylint": Pylint, "mypy": Mypy, "black": Black, "pytest": Pytest}, |
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.
Should we also have custom command for isort? Or maybe we could merge commands for black and isort into a single comand named (for example) format
.
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.
I will add "format" command to do black and isort in a single shot
2de8b20
to
ec51c5d
Compare
@@ -0,0 +1,268 @@ | |||
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.
What is the purpose of those 2 files?
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.
unintentionally committed; removing
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.
Done
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.
Good to go in. Consider the one non-critical comment at the earlies convenience.
I'll wait for @Fenthick to approve too.
|
||
assert library_found, "Can't import '" + library + "'" | ||
assert error is None, f'Can\'t import "{library}": {error}' |
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.
Let's keep double-quotes at the top level, like this:
assert error is None, f"Can't import '{library}': {error}"
It is more readable and black
has no problem with this (at least in my quick test).
KNTK-367