Clean up Python implementation; enable all projects

This commit is contained in:
Zanie
2023-10-26 10:27:23 -05:00
parent 1f4e87f043
commit 1c820b0200
8 changed files with 293 additions and 346 deletions

View File

@@ -117,21 +117,3 @@ def parse_args() -> argparse.Namespace:
)
return parser.parse_args()
def get_executable_path(name: str) -> str | None:
# Add suffix for Windows executables
name += ".exe" if sys.platform == "win32" else ""
path = os.path.join(sysconfig.get_path("scripts"), name)
# The executable in the current interpreter's scripts directory.
if os.path.exists(path):
return path
# The executable in the global environment.
environment_path = shutil.which("ruff")
if environment_path:
return environment_path
return None