mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
IFT-510 Use example with shorter warning description in the Python Editor Coding Assistance lesson
GitOrigin-RevId: d61c65000f4438c5fb79299da60967702d141f6e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bfd585611d
commit
f8397c28f2
@@ -4,13 +4,17 @@ import random
|
||||
class Cat:
|
||||
happiness = math.exp(3)
|
||||
|
||||
def say_meow(self):
|
||||
print("meow")
|
||||
def meow(self, words):
|
||||
for word in words:
|
||||
print(word)
|
||||
|
||||
def eat(self):
|
||||
self.happiness += random.randint(5, 20)
|
||||
|
||||
|
||||
cat = Cat()
|
||||
cat.say_meow("meow")
|
||||
cat.eat()
|
||||
words = ("I'm", "very", "happy")
|
||||
if cat.happiness < 30:
|
||||
words[1] = "not"
|
||||
cat.meow(words)
|
||||
|
||||
@@ -22,10 +22,10 @@ class PythonEditorCodingAssistanceLesson(sample: LessonSample) :
|
||||
private val errorAlternateIntentionText: String
|
||||
get() = PyPsiBundle.message("QFIX.auto.import.import.this.name")
|
||||
override val warningIntentionText: String
|
||||
get() = PyPsiBundle.message("QFIX.NAME.remove.argument")
|
||||
get() = PyPsiBundle.message("QFIX.NAME.make.list")
|
||||
|
||||
override val errorFixedText: String = "import math"
|
||||
override val warningFixedText: String = "cat.say_meow()"
|
||||
override val warningFixedText: String = """["I'm", "very", "happy"]"""
|
||||
|
||||
override val variableNameToHighlight: String = "happiness"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user