-
-
Notifications
You must be signed in to change notification settings - Fork 63
-
Sometimes i want it to be python, sometimes yaml, js, ts etc.
class SomeClass:
"""
Examples:
class MyThing(SomeClass):
def detect(self):
return True
def process(self):
yield Transaction(
date=datetime.date.today(),
narration="Test transaction",
amount=Decimal("10.00"),
currency="USD",
)
"""
should be python like:
class MyThing(SomeClass): def detect(self): return True def process(self): yield Transaction( date=datetime.date.today(), narration="Test transaction", amount=Decimal("10.00"), currency="USD", )
or this code block should be yaml
class Thing:
"""
Examples:
items:
- match: "data/*.csv"
"""
like:
items: - match: "data/*.csv"
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
You can use triple-backticks fences with the language name:
class SomeClass: """Summary. Examples: ```python print("this is some Python code") ``` ```yaml this: is some YAML ``` """
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment