Skip to content

Commit

Permalink
Update docs (close #34)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwermelinger committed Jan 10, 2024
1 parent 2b6c6c6 commit ed809ba
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ notebook.ipynb:cell_2:4: type()
```
The message only shows the statement, operator, function, method that isn't allowed.
For example, if the line of code is `from random import choice`,
then the possible flagged constructs are:
then the message may be:
- `from import`: the `from ... import ...` statement isn't allowed
- `random`: importing the `random` module isn't allowed
- `choice`: importing the `random.choice()` function isn't allowed.
Expand Down Expand Up @@ -75,9 +75,15 @@ For example, the following two commands are equivalent:
python allowed.py -m file1.py file2.py
python allowed.py file1.py --methods file2.py
```
Note that the second command also checks the method calls in _both_ files,
Note that the second command checks the method calls in _both_ files,
not just in the second file.

### Ignoring specific lines

If a code line ends with the comment `# allowed`, then no violations are flagged for that line.
This is useful for assessment or examples that exceptionally use constructs not taught.
This feature should of course be used sparingly, as it bypasses the checks by `allowed`.

### Organising by units

`allowed` assumes that your course is organised in 'units'
Expand Down

0 comments on commit ed809ba

Please sign in to comment.