-
Notifications
You must be signed in to change notification settings - Fork 0
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
Set up ruff
and fix trivial rules
#165
Conversation
…XL into milanmlft/issue-108-ruff
Docstrings feel like overkill for these functions
Specifying the `config=ruff.toml` ignores subdirectory `ruff.toml` files
…XL into milanmlft/issue-108-ruff
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
exclude: "tests|orthanc" | ||
- id: ruff | ||
args: | ||
- --fix |
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.
do you need to specify the config here as well?
Methods | ||
------- | ||
from_state_file(cls, filepath) | ||
Return messages from a state file path |
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.
Not sure if I'd put in the time to define the methods of a class here, as you've also got the public methods so its a bit of duplication
This module provides: | ||
- fetch_key_from_vault: fetch the hashing key from the Azure Key Vault instance | ||
- generate_hash: generate a keyed hash digest using the Blake2b algorithm | ||
- generate_salt: generate a random text string in hexadecimal to be used as a salt |
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.
Fine to keep in but also probably a duplication of what's documented at the function level and could get out of date
@@ -20,14 +22,14 @@ | |||
|
|||
|
|||
@router.get("/heart-beat", summary="Health Check") | |||
async def heart_beat() -> str: | |||
async def heart_beat() -> str: # noqa: D103 |
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.
why don't we just document these?
background_tasks = set() | ||
async with PixlConsumer(QUEUE_NAME, token_bucket=state.token_bucket) as consumer: | ||
asyncio.create_task(consumer.run(callback=process_message)) | ||
task = asyncio.create_task(consumer.run(callback=process_message)) | ||
background_tasks.add(task) | ||
task.add_done_callback(background_tasks.discard) |
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.
oh this is interesting that you had to add that
ruff.toml
files to configureruff
ruff
to the pre-commit configurationisort
andflake8
from pre-commitmypy
andruff
ruff
issuesruff
issues that require deeper investigation are ignored for now, but have been turned into new issues: #151, #152, #153, #154, #155, #156, #157Closes UCLH-Foundry/the-rolling-skeleton#108