@@ -41,7 +41,10 @@ Some popular linters include:
4141- `flake8 <https://flake8.pycqa.org/en/latest/ >`__
4242
4343In the following example lets use ``pylint `` to check the following
44- script (:download: `lint_example.py <../resources/code/productivity/lint_example.py >`):
44+ script (:download: `lint_example.py
45+ <../resources/code/productivity/lint_example.py>`: to easily download
46+ to JupyterLab, use File → Open from URL → Paste URL → It will download
47+ and open in a window.):
4548
4649.. code-block :: python
4750
@@ -55,6 +58,10 @@ script (:download:`lint_example.py <../resources/code/productivity/lint_example.
5558
5659 plt.show()
5760
61+ To run ``pylint `` from the terminal in JupyterLab, File → New →
62+ Terminal. Make sure you are in the right directory, then you can run
63+ ``pylint ``:
64+
5865.. code-block :: console
5966
6067 $ pylint lint_example.py
@@ -125,7 +132,8 @@ Exercise 1
125132
126133 The following code uses scikit-learn to fit a simple linear
127134 model to randomly generated data with some error. You can download it
128- :download: `here <../resources/code/productivity/exercise1.py >`.
135+ :download: `here <../resources/code/productivity/exercise1.py >` (see
136+ above for how to easily download and run in JupyterLab).
129137
130138 It has four mistakes in it. One of these cannot be found by
131139 Pylint.
@@ -360,7 +368,7 @@ After running ``black code_style_example.py`` the code looks like this:
360368Much cleaner. If we want to check for variable naming syntax we can still run
361369`` flake8 code_style_example.py`` :
362370
363- .. code- block:: bash
371+ .. code- block:: console
364372
365373 $ flake8 code_style_example.py
366374 code_style_example.py:4 :6 : N802 function name ' PI_estimate' should be lowercase
0 commit comments