mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-16 00:15:18 +00:00
Added
This commit is contained in:
1 parent
8761d25a18
commit
6510329388
4 files changed
-39
No files matched your search
@@ -1,25 +0,0 @@
|
||||
"""Top-level module."""
|
||||
|
||||
|
||||
class SampleClass:
|
||||
"""Sample docstring. Note that init docstrings should be underneath the class and not the init method itself
|
||||
(this looks prettier in sphinx). They still will be rendered correctly in pycharm's quick documentation.
|
||||
|
||||
:param param: some parameter
|
||||
"""
|
||||
|
||||
def __init__(self, param: str | None = None):
|
||||
self.hello = "hello "
|
||||
self.param = param
|
||||
|
||||
def sample_method(self, name: str) -> str:
|
||||
""">>> from serena.sample_module import SampleClass
|
||||
>>>
|
||||
>>> greeter = SampleClass()
|
||||
>>> greeter.sample_method("Oraios AI")
|
||||
'hello Oraios AI'.
|
||||
|
||||
:param name:
|
||||
:return:
|
||||
"""
|
||||
return self.hello + name
|
||||
Whitespace-only changes.
@@ -1,6 +0,0 @@
|
||||
"""Module in a separate package."""
|
||||
|
||||
|
||||
def hello_stranger() -> None:
|
||||
"""Hello."""
|
||||
print("Hello from a separate package!")
|
||||
@@ -1,8 +0,0 @@
|
||||
from serena.sample_module import SampleClass
|
||||
|
||||
|
||||
# the suggested naming convention for unit tests is test_method_name_testDescriptionInCamelCase
|
||||
# this leads to a nicely readable output of pytest
|
||||
def test_sample_class_attributes_greeterSaysHello():
|
||||
greeter = SampleClass()
|
||||
assert greeter.hello == "hello "
|
||||
Reference in new issue
Block a user