diff --git a/pandas/tests/io/generate_legacy_storage_files.py b/pandas/tests/io/generate_legacy_storage_files.py index b66631a7d943e..ba1c1cbea26f9 100644 --- a/pandas/tests/io/generate_legacy_storage_files.py +++ b/pandas/tests/io/generate_legacy_storage_files.py @@ -327,7 +327,7 @@ def write_legacy_file(): sys.path.insert(0, ".") if not 3 <= len(sys.argv) <= 4: - exit( + sys.exit( "Specify output directory and storage type: generate_legacy_" "storage_files.py " ) @@ -338,7 +338,7 @@ def write_legacy_file(): if storage_type == "pickle": write_legacy_pickles(output_dir=output_dir) else: - exit("storage_type must be one of {'pickle'}") + sys.exit("storage_type must be one of {'pickle'}") if __name__ == "__main__": diff --git a/pyproject.toml b/pyproject.toml index 761f3c687d08d..97f0df8495e2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,7 +107,6 @@ disable = [ "comparison-with-itself", "consider-merging-isinstance", "consider-using-min-builtin", - "consider-using-sys-exit", "consider-using-ternary", "consider-using-with", "cyclic-import",