pip install pre-commit
2.Git init in the project
1.Create pre-commint config file - Use this already created config - This Configuration set MyPY and Ruff the check of pre commit
2.Create a ruff .toml config fil - Use this
3.Install the git hook scripts
pre-commit install
4.(optional) Run against all the files
pre-commit run --all-files