We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
FURB103
FURB103 has a false positive if the 'newline' argument is used in python <3.10
consider the following code snippet:
with open(outfile, 'w', encoding='utf-8', newline=newline) as f: f.write(rendered_file)
the lint suggests using
Path(outfile).write_text(rendered_file, encoding='utf-8', newline=newline)
Path.write_text only supports the newline argument for python 3.10+, but this lint suggest the change even if you're targeting an earlier version of Python. This means the lint has to be manually suppressed. see https://github.com/cookiecutter/cookiecutter/pull/2061/files#diff-02c88bfba84f4a832d0e00474c6fac0000b940456bad66d925eaebf5839d94deR256
Path.write_text
The text was updated successfully, but these errors were encountered:
Feel free to assign this to me
Sorry, something went wrong.
newline
open()
Restrict fowarding newline argument in open() calls to Python ver…
1e04bd0
…sions >= 3.10 (#12244) Fixes #12222
evanrittenhouse
Successfully merging a pull request may close this issue.
FURB103
has a false positive if the 'newline' argument is used in python <3.10consider the following code snippet:
the lint suggests using
Path.write_text
only supports the newline argument for python 3.10+, but this lint suggest the change even if you're targeting an earlier version of Python. This means the lint has to be manually suppressed. see https://github.com/cookiecutter/cookiecutter/pull/2061/files#diff-02c88bfba84f4a832d0e00474c6fac0000b940456bad66d925eaebf5839d94deR256The text was updated successfully, but these errors were encountered: