explorerhq / explorerhq/sql-explorer
`EXPLORER_PERMISSION_VIEW` and `EXPLORER_PERMISSION_CHANGE` violate PEP8
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 373
- PR merge metrics
- No merged PRs in 30d
Description
I got a flake8 error when setting up the permission variables as the docs recommend:
https://django-sql-explorer.readthedocs.io/en/latest/settings.html#permission-view
Seems like it violates E731:
https://www.flake8rules.com/rules/E731.html
Instead, I did this:
```
def EXPLORER_PERMISSION_VIEW(r: HttpRequest) -> bool:
return r.user.has_perm("meshapi.explorer_access")
def EXPLORER_PERMISSION_CHANGE(r: HttpRequest) -> bool:
return r.user.has_perm("meshapi.explorer_access")
```
https://github.com/nycmeshnet/meshdb/blob/6f1d00a68e9b26ac5ffa9fb48386b0e23d26dcff/src/meshdb/settings.py#L413-L418
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.