-
Notifications
You must be signed in to change notification settings - Fork 68
[PLT-1506] Added Ruff linting to SDK #1822
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
Changes from 9 commits
4286ec4
ed9ba18
99714dc
fd5c391
5f4f733
54909b4
da7aeaa
14a1d3d
2658a10
d9d4564
e5601a6
0c7d9be
82abf84
7209279
b8c3b30
e02640a
972b79a
bd8c4ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,10 @@ dev-dependencies = [ | |
[tool.ruff] | ||
line-length = 80 | ||
|
||
[tool.ruff.lint] | ||
ignore = ["F", "E722"] | ||
exclude = ["**/__init__.py"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be excluded for future rules (no unused imports) |
||
|
||
[tool.rye.scripts] | ||
unit = "pytest tests/unit" | ||
# https://github.com/Labelbox/labelbox-python/blob/7c84fdffbc14fd1f69d2a6abdcc0087dc557fa4e/Makefile | ||
|
@@ -89,9 +93,10 @@ unit = "pytest tests/unit" | |
# LABELBOX_TEST_BASE_URL="http://host.docker.internal:8080" \ | ||
integration = { cmd = "pytest tests/integration" } | ||
data = { cmd = "pytest tests/data" } | ||
rye-lint = "rye lint" | ||
rye-fmt-check = "rye fmt --check" | ||
mypy-lint = "mypy src --pretty --show-error-codes --non-interactive --install-types" | ||
lint = { chain = ["mypy-lint", "rye-fmt-check"] } | ||
lint = { chain = ["rye-fmt-check", "mypy-lint", "rye-lint"] } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we still need mypy here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea I think so Mypy is a type checker |
||
test = { chain = ["lint", "unit", "integration"] } | ||
|
||
[tool.hatch.metadata] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
from .ndjson import NDJsonConverter | ||
from .coco import COCOConverter |
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
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 have PyFlake and a bareexcept rule ignored here. Later we should look at not ignoring these rules and possiblly include more then just the defaults.