Skip to content

Commit ebad43f

Browse files
committed
Lint fixes
1 parent 877f34b commit ebad43f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/robotlibcore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def add_library_components(self, library_components: List, translation: Optional
8383
self.attributes[name] = self.attributes[kw_name] = kw
8484

8585
def __get_keyword_name(self, func: Callable, name: str, translation: dict):
86-
if name in translation:
86+
if name in translation: # noqa: SIM102
8787
if new_name := translation[name].get("name"):
8888
return new_name
8989
return func.robot_name or name
@@ -236,7 +236,7 @@ def build(cls, function, translation: Optional[dict] = None):
236236

237237
@classmethod
238238
def get_doc(cls, function, translation: dict):
239-
if kw := cls._get_kw_transtation(function, translation):
239+
if kw := cls._get_kw_transtation(function, translation): # noqa: SIM102
240240
if "doc" in kw:
241241
return kw["doc"]
242242
return inspect.getdoc(function) or ""

utest/test_translations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def test_translations_docs(lib: SmallLibrary):
2828
kw = keywords["name_changed_again"]
2929
assert kw.documentation == "This is also replaced.\n\nnew line."
3030

31+
3132
def test_init_and_lib_docs(lib: SmallLibrary):
3233
keywords = lib.keywords_spec
3334
init = keywords["__init__"]

0 commit comments

Comments
 (0)