fossunited / monschool-website

Repository of all courses on mon.school
24 stars 10 forks source link

Support for mypy strict mode #55

Closed anandology closed 2 years ago

anandology commented 2 years ago

The mypy-primer course requires optionally enabling strict mode.

Possible Options

Option 1: One a dropdown to switch between regular mode and strict mode and ability to set the default.

Option 2: No need to give the option to the user, it will hard coded for the example and will be prominently visible.

Looks like option2 is good enough for now.

Suggested interface

```{.python .example .mypy-strict}
....
```

Ideas for implementation

Add JS code in course.js and add an emnvironment variable MYPY_STRICT=true when running it. Also add a label to the controls bar to show that the strict mode is on.