appsembler / xblock-grade-fetcher

Grade Fetcher XBlock
MIT License
2 stars 1 forks source link

add tox/flake8 setup #12

Closed thraxil closed 2 years ago

thraxil commented 2 years ago

Run tox via github actions. Currently only runs flake8 to provide basic linting but will let us hook up other tests later.

To get flake8 to pass, I made a few small changes, but the main one that needs attention is that the i18n_service() method returns a DummyTranslationService() but no class with that name existed or was imported. That would almost certainly be a bug in production. I added a dummy class in there just to get flake8 to pass, but that needs to be replaced with the actual class that was originally intended.

I added a bandit config but haven't turned it on by default yet. I recommend running tox -e bandit to see its output as it indicates some potential XSS vulnerabilities. We should make sure those are fixed and then enable it.