Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Дублирование кода #9

Open
dakone22 opened this issue Nov 24, 2022 · 0 comments
Open

Дублирование кода #9

dakone22 opened this issue Nov 24, 2022 · 0 comments

Comments

@dakone22
Copy link

Сеттеры в BinaryRelation

for x in a:
if x not in self.__A:
self.__A.append(x)

@A.setter
def A(self, a):
self.__A = []
for x in a:
if x not in self.__A:
self.__A.append(x)

StyleSheet

Отличается лишь немного цветом, а остальное одинаково.
И, возможно, там необязательны переводы строк.

self.lbl_bin_class.setStyleSheet("color: #008000;\n"
"font-weight: bold;\n"
"font-size: 12;\n"
"font-family: Arial;")

self.lbl_bin_class.setStyleSheet("color: rgb(184, 0, 0);\n"
"font-weight: bold;\n"
"font-size: 12;\n"
"font-family: Arial;")

Установка случайного ввода

HasseDiagram/mainWindow.py

Lines 171 to 172 in 516bd62

self.edt_setA.setText(str(bin_rel.A)[1:-1])
self.edt_setR.setText(str(bin_rel.R)[1:-1])

HasseDiagram/mainWindow.py

Lines 176 to 177 in 516bd62

self.edt_setA.setText(str(bin_rel.A)[1:-1])
self.edt_setR.setText(str(bin_rel.R)[1:-1])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant