-
Notifications
You must be signed in to change notification settings - Fork 77
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
Adds ruff, a drop-in replacement for black #423
Conversation
Can you work out the CI kinks? Make sure the app lints and tests all complete properly. Can mark as draft while you work through them. |
@@ -41,7 +41,7 @@ types-protobuf = ">=3.20" | |||
typing-extensions = "^4.2.0" | |||
|
|||
[tool.poetry.dev-dependencies] | |||
black = "^23.1.0" | |||
ruff = "^0.1.5" | |||
cibuildwheel = "^2.11.0" | |||
grpcio-tools = "^1.48.0" | |||
isort = "^5.11.5" |
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.
isort = "^5.11.5" |
@@ -1,3 +1,4 @@ | |||
# isort: skip_file |
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.
# isort: skip_file |
I don't think this is 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.
I am worried a lot of things changed in here inadvertently and am also worried that by not using an older version of Poetry we may be forcing users to upgrade (which has its own issues at the moment)
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 | ||
|
||
from temporalio.api.common.v1 import ( | ||
message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, | ||
) | ||
from temporalio.api.dependencies.gogoproto import ( | ||
gogo_pb2 as dependencies_dot_gogoproto_dot_gogo__pb2, | ||
) | ||
from temporalio.api.enums.v1 import ( | ||
batch_operation_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_batch__operation__pb2, | ||
) | ||
from temporalio.api.enums.v1 import ( | ||
reset_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_reset__pb2, | ||
) |
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.
These imports are intentionally side effects and should not be removed. I wonder if we need to make ruff ignore the entire temporalio/api
folder
@@ -13,7 +13,6 @@ | |||
|
|||
import temporalio.bridge.runtime | |||
import temporalio.bridge.temporal_sdk_bridge | |||
from temporalio.bridge.temporal_sdk_bridge import RPCError |
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.
This is imported for side effecting reasons as are some others in some other files. Feel free to find ways to workaround.
What was changed
Added
isort: skip_file
in the.gitignore
file, because ruff will followisort
s commands.Replaced
black
withruff in the
.pyproject.toml` file.poe format
&&poe lint
There were a lot of changes made.
If this is too much, let me know and I close this PR and find a way later to make less changes.
Looking for a quick win.
Why?
#421
Checklist
Closes
How was this tested: