SwordInStone@lemmy.world to Python@programming.dev · edit-221 days agoYSK: there is a library called pathlib with different methods for accessing files which you might like since they do not require a context manager message-squaremessage-square9fedilinkarrow-up115arrow-down11file-text
arrow-up114arrow-down1message-squareYSK: there is a library called pathlib with different methods for accessing files which you might like since they do not require a context manager SwordInStone@lemmy.world to Python@programming.dev · edit-221 days agomessage-square9fedilinkfile-text
https://docs.python.org/3/library/pathlib.html I’m creating this post mainly so that I don’t forget the name again.
minus-squareEager Eagle@lemmy.worldlinkfedilinkEnglisharrow-up1·edit-222 days agoyou can also enable this rule set to remind you https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
you can also enable this rule set to remind you https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
hell ye