-
Notifications
You must be signed in to change notification settings - Fork 201
add ruff #290
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
base: master
Are you sure you want to change the base?
add ruff #290
Conversation
closes #287 |
The configuration defines defaults explicitly. Format rules are configured to work with google docstring format (has no formal spec, is de-facto standard). Single quotes are migrated to double-quotes (cause de-facto standard.) |
build-backend = "poetry.masonry.api" | ||
|
||
[tool.ruff] | ||
target-version = "py310" |
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.
Support for 3.9 will run out end of October 2025. https://devguide.python.org/versions/
@fkromer Thank you for the requested changes, A couple of comments on your pull request:
|
@colesmj Thanks for the review.
I'll comment in the PR for more fine-grained further explanation. |
|
||
def req_reply(src: Element, dest: Element, req_name: str, reply_name=None) -> (DF, DF): | ||
''' | ||
""" |
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.
Kind of de-facto standard. I don't know any project which is using ```. Default formatter config value.
logger-objects = [] | ||
per-file-ignores = {} | ||
preview = false | ||
select = ["E4", "E7", "E9", "F"] |
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.
ruff
rule set can be extended here. E.g. to add pylint
rules refer to here.
""" | ||
if not reply_name: | ||
reply_name = f'Reply to {req_name}' | ||
reply_name = f"Reply to {req_name}" |
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.
" is kind of-defacto standard (config default value).
from .pytm import ( | ||
TM, | ||
Boundary, | ||
Element, |
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.
Dead code not used, to showcase code cleanup capabilities (--fix
).
return result | ||
|
||
elif spec.startswith("call:"): | ||
# Example usage, format, exampple 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.
wrong comment indentation fixed.
import re | ||
import unittest | ||
import tempfile | ||
from contextlib import redirect_stdout |
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.
Dead code fixed (--fix
).
Relates to #294 |
No description provided.