-
Notifications
You must be signed in to change notification settings - Fork 21
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
[pre-commit.ci] pre-commit autoupdate #204
Conversation
updates: - [github.com/adamchainz/blacken-docs: 1.13.0 → 1.14.0](adamchainz/blacken-docs@1.13.0...1.14.0) - [github.com/charliermarsh/ruff-pre-commit: v0.0.260 → v0.0.275](astral-sh/ruff-pre-commit@v0.0.260...v0.0.275)
for more information, see https://pre-commit.ci
Looks like ruff upgrading string interpolation style leads to syntax errors when said interpolated strings are processed through |
The issue is that formatting methods are not equivalent for >>> import unyt as un
>>> a=1.0*un.cm
>>> print("%f" % a)
1.000000
>>> print("{:f}".format(a))
1.000000 cm Note that this isn't dependent on the Python version we just happen to not hit the broken code on Python>=3.10 because many tests still require |
I currently do not understand how to change the behaviour of |
7c958fe
to
1de1116
Compare
@@ -364,8 +364,7 @@ def write_source_files(self, sources, wavelengths): | |||
fhandle.write(str(source.radius) + " ") | |||
fhandle.write(str(source.mass) + " ") | |||
fhandle.write( | |||
"%f %f %f" | |||
% (source.position[0], source.position[1], source.position[2]) | |||
f"{source.position[0]:f} {source.position[1]:f} {source.position[2]: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.
I suspect this is a breaking change too and that this function isn't fully tested
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.
checked. It's not breaking because RadMC3DSource.position
is a list of floats, without explicit units.
updates: