-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcome
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcome