Skip to content

Commit ed23f3a

Browse files
committed
removing about uneeded 'about me' text area
1 parent 4ea53bd commit ed23f3a

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

src/edit_python_pe/main.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def on_mount(self) -> None:
7676
self.city_input = Input(placeholder="Ciudad")
7777
self.homepage_input = Input(placeholder="Página personal")
7878

79-
self.about_me_area = TextArea(text="Sobre mí")
8079
self.who_area = TextArea(text="¿Quién eres y a qué te dedicas?")
8180
self.python_area = TextArea(text="¿Cómo programas en Python?")
8281
self.contributions_area = TextArea(
@@ -112,7 +111,6 @@ def on_mount(self) -> None:
112111

113112
self.form_container.mount(self.city_input)
114113
self.form_container.mount(self.homepage_input)
115-
self.form_container.mount(self.about_me_area)
116114
self.form_container.mount(self.who_area)
117115
self.form_container.mount(self.python_area)
118116
self.form_container.mount(self.contributions_area)
@@ -149,7 +147,6 @@ def clear_form(self) -> None:
149147
self.email_input.value = ""
150148
self.city_input.value = ""
151149
self.homepage_input.value = ""
152-
self.about_me_area.text = "Sobre mí"
153150
self.who_area.text = "¿Quién eres y a qué te dedicas?"
154151
self.python_area.text = "¿Cómo programas en Python?"
155152
self.contributions_area.text = "¿Tienes algún aporte a la comunidad de Python?"
@@ -246,13 +243,6 @@ def load_file_into_form(self, filename: str) -> None:
246243
self.homepage_input.value = homepage_match.group(1).strip()
247244

248245
# Extract markdown sections under headers
249-
sobre_mi_match = re.search(
250-
r"## Sobre mí\n(.*?)(?=^### |\Z)",
251-
content,
252-
re.DOTALL | re.MULTILINE,
253-
)
254-
if sobre_mi_match:
255-
self.about_me_area.text = sobre_mi_match.group(1).strip()
256246
who_match = re.search(
257247
r"### ¿Quién eres y a qué te dedicas\?\n(.*?)(?=^### |\Z)",
258248
content,
@@ -382,7 +372,6 @@ def save_member(self) -> None:
382372
email = self.email_input.value.strip()
383373
city = self.city_input.value.strip()
384374
homepage = self.homepage_input.value.strip()
385-
about_me = self.about_me_area.text.strip()
386375
who = self.who_area.text.strip()
387376
python_ = self.python_area.text.strip()
388377
contributions = self.contributions_area.text.strip()
@@ -456,11 +445,8 @@ def save_member(self) -> None:
456445
md_lines.append(f":Homepage: {homepage}")
457446
md_lines.append("")
458447

459-
if about_me:
460-
md_lines.append("## Sobre mí")
461-
md_lines.append("")
462-
md_lines.append(about_me)
463-
md_lines.append("")
448+
md_lines.append("## Sobre mí")
449+
md_lines.append("")
464450

465451
if who:
466452
md_lines.append("### ¿Quién eres y a qué te dedicas?")

tests/test_member_app.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def __init__(self):
4141
self.app.email_input = StubInput()
4242
self.app.city_input = StubInput()
4343
self.app.homepage_input = StubInput()
44-
self.app.about_me_area = StubTextArea()
4544
self.app.who_area = StubTextArea()
4645
self.app.python_area = StubTextArea()
4746
self.app.contributions_area = StubTextArea()
@@ -96,7 +95,6 @@ def test_add_list_button_clears_form(self):
9695
self.app.email_input.value = "filled@email.com"
9796
self.app.city_input.value = "Filled City"
9897
self.app.homepage_input.value = "https://filled-homepage.com"
99-
self.app.about_me_area.text = "Filled About me"
10098
self.app.who_area.text = "Filled Who am I"
10199
self.app.python_area.text = "Filled Python stuff"
102100
self.app.contributions_area.text = "Filled Contributions"
@@ -115,7 +113,6 @@ class DummyEvent:
115113
self.assertEqual(self.app.email_input.value, "")
116114
self.assertEqual(self.app.city_input.value, "")
117115
self.assertEqual(self.app.homepage_input.value, "")
118-
self.assertEqual(self.app.about_me_area.text, "Sobre mí")
119116
self.assertEqual(self.app.who_area.text, "¿Quién eres y a qué te dedicas?")
120117
self.assertEqual(self.app.python_area.text, "¿Cómo programas en Python?")
121118
self.assertEqual(self.app.contributions_area.text, "¿Tienes algún aporte a la comunidad de Python?")
@@ -176,7 +173,6 @@ def test_save_member_edit_no_pr(self):
176173
app.email_input.value = "test@email.com"
177174
app.city_input.value = "Test City"
178175
app.homepage_input.value = "https://homepage.com"
179-
app.about_me_area.text = "About me"
180176
app.who_area.text = "Who am I"
181177
app.python_area.text = "Python stuff"
182178
app.contributions_area.text = "Contributions"
@@ -235,7 +231,6 @@ def test_save_member_edit(self):
235231
app.email_input.value = "test@email.com"
236232
app.city_input.value = "Test City"
237233
app.homepage_input.value = "https://homepage.com"
238-
app.about_me_area.text = "About me"
239234
app.who_area.text = "Who am I"
240235
app.python_area.text = "Python stuff"
241236
app.contributions_area.text = "Contributions"
@@ -291,7 +286,6 @@ def test_save_member_new(self):
291286
app.email_input.value = "test@email.com"
292287
app.city_input.value = "Test City"
293288
app.homepage_input.value = "https://homepage.com"
294-
app.about_me_area.text = "About me"
295289
app.who_area.text = "Who am I"
296290
app.python_area.text = "Python stuff"
297291
app.contributions_area.text = "Contributions"
@@ -338,7 +332,6 @@ def test_save_member_error_handling(self):
338332
app.email_input.value = ""
339333
app.city_input.value = ""
340334
app.homepage_input.value = ""
341-
app.about_me_area.text = ""
342335
app.who_area.text = ""
343336
app.python_area.text = ""
344337
app.contributions_area.text = ""

0 commit comments

Comments
 (0)