Ruff
903 rules ruff@0.17.0
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
PTH121os.path.samefile()should be replaced byPath.samefile() -
PTH122os.path.splitext()should be replaced byPath.suffix,Path.stem, andPath.parent -
PTH123open()should be replaced byPath.open() -
PTH124py.pathis in maintenance mode, usepathlibinstead -
PTH201Do not pass the current directory explicitly to
Path -
PTH202os.path.getsizeshould be replaced byPath.stat().st_size -
PTH203os.path.getatimeshould be replaced byPath.stat().st_atime -
PTH204os.path.getmtimeshould be replaced byPath.stat().st_mtime -
PTH205os.path.getctimeshould be replaced byPath.stat().st_ctime -
PTH206Replace
.split(os.sep)withPath.parts -
PTH207Replace
{function}withPath.globorPath.rglob -
PTH208Use
pathlib.Path.iterdir()instead. -
PTH210Invalid suffix passed to
.with_suffix() -
PTH211os.symlinkshould be replaced byPath.symlink_to -
PYI001Name of private
{kind}must start with_ -
PYI002iftest in a stub file must be a simple comparison againstsys.platformorsys.version_info -
PYI003Unrecognized
sys.version_infocheck -
PYI004Version comparison must use only major and minor version
-
PYI005Version comparison must be against a length-{expected_length} tuple
-
PYI006Use
<or>=forsys.version_infocomparisons -
PYI007Unrecognized
sys.platformcheck -
PYI008Unrecognized platform
{platform} -
PYI009Empty body should contain
..., notpass -
PYI010Function body must contain only
... -
PYI011Only simple default values allowed for typed arguments
-
PYI012Class body must not contain
pass -
PYI013Non-empty class body must not contain
... -
PYI014Only simple default values allowed for arguments
-
PYI015Only simple default values allowed for assignments
-
PYI016Duplicate union member
{} -
PYI017Stubs should not contain assignments to attributes or multiple targets
-
PYI018Private {type_var_like_kind}
{type_var_like_name}is never used