Ruff
902 rules ruff@0.16.8
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
PT029Set the expected warning in
pytest.warns() -
PT030pytest.warns({warning})is too broad, set thematchparameter or use a more specific warning -
PT031pytest.warns()block should contain a single simple statement -
PTH100os.path.abspath()should be replaced byPath.resolve() -
PTH101os.chmod()should be replaced byPath.chmod() -
PTH102os.mkdir()should be replaced byPath.mkdir() -
PTH103os.makedirs()should be replaced byPath.mkdir(parents=True) -
PTH104os.rename()should be replaced byPath.rename() -
PTH105os.replace()should be replaced byPath.replace() -
PTH106os.rmdir()should be replaced byPath.rmdir() -
PTH107os.remove()should be replaced byPath.unlink() -
PTH108os.unlink()should be replaced byPath.unlink() -
PTH109os.getcwd()should be replaced byPath.cwd() -
PTH110os.path.exists()should be replaced byPath.exists() -
PTH111os.path.expanduser()should be replaced byPath.expanduser() -
PTH112os.path.isdir()should be replaced byPath.is_dir() -
PTH113os.path.isfile()should be replaced byPath.is_file() -
PTH114os.path.islink()should be replaced byPath.is_symlink() -
PTH115os.readlink()should be replaced byPath.readlink() -
PTH116os.stat()should be replaced byPath.stat(),Path.owner(), orPath.group() -
PTH117os.path.isabs()should be replaced byPath.is_absolute() -
PTH118os.{module}.join()should be replaced byPathwith/operator -
PTH119os.path.basename()should be replaced byPath.name -
PTH120os.path.dirname()should be replaced byPath.parent -
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 must be a simple comparison againstsys.platformorsys.version_info