-
Notifications
You must be signed in to change notification settings - Fork 58
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
Replaced Flake8 with Ruff #155
Conversation
tzlocal/unix.py
Outdated
@@ -94,7 +94,7 @@ def _get_localzone_name(_root="/"): | |||
for filename in ("etc/sysconfig/clock", "etc/conf.d/clock"): | |||
tzpath = os.path.join(_root, filename) | |||
try: | |||
with open(tzpath, "rt") as tzfile: |
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.
Can we skip that UP015 rule? I like having the parameters there even if they are default.
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.
Updated.
@@ -5,13 +5,12 @@ | |||
get_localzone, | |||
get_localzone_name, | |||
reload_localzone, | |||
) # pragma: no cover |
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.
OK; I found a syntax for this both black and ruff like, I'll add that back later.
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 really want to ignore coverage here rather than just collect and combine from runs on multiple operating systems?
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.
We can try that, IIRC coverage didn't handle that correctly. Then again I don't have 100% coverage anyway so I guess it doesn't really matter.
Except for that UP015 rule, this looks fine. |
Ruff made some stylistic changes. I hope that's not an issue.