RunestoneInteractive / fopp

Foundations of Python Programming
https://runestone.academy/runestone/static/fopp/index.html
38 stars 120 forks source link

CodeLens enabled for Turtle activities in 5.5 #348

Open celinelatulipe opened 2 years ago

celinelatulipe commented 2 years ago

Describe the bug In Section 5.5, there are two activities that use the Turtle module. Since CodeLens/PythonTutor doesn't support it, the CodeLens button shouldn't be enabled/visible.

To Reproduce Steps to reproduce the behavior:

  1. Go to Section 5.5
  2. Scroll down to activity 5.5.2 and 5.5.3
  3. Click on the Show CodeLens
  4. Click on the 'Next' button in CodeLens
  5. CodeLens shows: ImportError: turtle not found or not supported Only these modules can be imported: future, abc, array, bisect, calendar, cmath, collections, copy, datetime, decimal, doctest, fractions, functools, hashlib, heapq, io, itertools, json, locale, math, operator, pickle, pprint, random, re, string, types, typing, unittest

Expected behavior A clear and concise description of what you expected to happen. The CodeLens button shouldn't be shown since it doesn't support the Turtle module

bnmnetp commented 2 years ago

This is easy to fix by just adding a :nocodelens: parameter to the activecode directive.