-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[SIM906] Merge nested os.path.join calls #101
Comments
I didn't know that this was possible! I'll add this when I have more time for sure - this should also be easy / have little potential for false-positives. Very nice suggestion! |
Side-note: pathlib.Path should be used more often. If a, b, and c were Path objects, you could simply do:
|
Many usages of os.path can be replaced by |
@MartinThoma True, but there can be performance issues with using Pathlib. For instance, I think the black formatter removed / reworked a lot of their Pathlib usage back to os.path in their library due to performance issues. |
|
Credits to Skylion007 for defining this rule! Closes #101
Credits to Skylion007 for defining this rule! Closes #101
Credits to Skylion007 for defining this rule! Closes #101
Explanation
Explain briefly why you think this makes the code simpler.
Example
The text was updated successfully, but these errors were encountered: