From feedd83ee2535da614557b4daf6eb9b53b9a36f7 Mon Sep 17 00:00:00 2001 From: janezd Date: Sun, 6 Oct 2024 21:06:29 +0200 Subject: [PATCH] Preprocess: Don't use private attributes in f-strings --- Orange/widgets/data/owpreprocess.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Orange/widgets/data/owpreprocess.py b/Orange/widgets/data/owpreprocess.py index 7a6e7342699..d771b11436f 100644 --- a/Orange/widgets/data/owpreprocess.py +++ b/Orange/widgets/data/owpreprocess.py @@ -738,9 +738,12 @@ def createinstance(params): def __repr__(self): if self.__strategy == self.Fixed: - return f"select {self.__k} {pl(self.__k,'feature')}" + # private attributes may not appear translated strings + num = self.__k + return f"select {num} {pl(num,'feature')}" else: - return f"select {self.__p} % features" + perc = self.__p + return f"select {perc} % features" def index_to_enum(enum, i):