Skip to content
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

Merged
merged 3 commits into from
Oct 11, 2023
Merged

Replaced Flake8 with Ruff #155

merged 3 commits into from
Oct 11, 2023

Conversation

agronholm
Copy link
Collaborator

Ruff made some stylistic changes. I hope that's not an issue.

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:
Copy link
Owner

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.

Copy link
Collaborator Author

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
Copy link
Owner

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.

Copy link
Collaborator Author

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?

Copy link
Owner

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.

@regebro
Copy link
Owner

regebro commented Oct 10, 2023

Except for that UP015 rule, this looks fine.

@regebro regebro merged commit 40893d5 into master Oct 11, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants