hackforla / peopledepot

A project to setup a datastore for people and projects at HackforLA. The link below takes you to the code documentation
https://hackforla.github.io/peopledepot/
GNU General Public License v2.0
5 stars 24 forks source link

Fix hooks in macOS 247 #248

Closed fyliu closed 5 months ago

fyliu commented 5 months ago

What changes did you make?

Why did you make the changes (we will use this info to test)?

How to test

change this line in app/peopledepot/settings.py from

"NAME": os.environ.get("SQL_DATABASE", BASE_DIR / "db.sqlite3"),

to

"NAME": os.environ.get("SQL_DATABASE", os.path.join(BASE_DIR, "db.sqlite3")),

and run pre-commit run --all-files, and it should complain about the rule.

ruff.....................................................................Failed
- hook id: ruff
- exit code: 1

app/peopledepot/settings.py:121:48: PTH118 `os.path.join()` should be replaced by `Path` with `/` operator
Found 1 error.