<div dir="ltr"><div dir="ltr"><div>Saludos señor. <br></div><div>So first, para la definición de metaclasses en Python3 la sintaxis deberías actualizarla (<a href="https://www.python.org/dev/peps/pep-3115/">https://www.python.org/dev/peps/pep-3115/</a>). En teoría en el PEP se dice que __metaclass__ va a seguir poder usándose pero puede ser que cualquier plugin o lo que sea ya no "entienda" la sintaxis antigua y la ignore, así que yo creo que mejor actualizar salvo que tengas python2 como dependencia (si es así mejor usar <a href="https://six.readthedocs.io/#six.add_metaclass">https://six.readthedocs.io/#six.add_metaclass</a>). <br></div><div><br></div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(86,156,214)">from abc import ABC, ABCMeta</span></div><div><span style="color:rgb(86,156,214)"><br></span></div><div><span style="color:rgb(86,156,214)">class</span><span style="color:rgb(212,212,212)"> </span><span style="color:rgb(78,201,176)">IRepository</span><span style="color:rgb(212,212,212)">(ABC):  # or </span><span style="color:rgb(86,156,214)">class</span><span style="color:rgb(212,212,212)"> </span><span style="color:rgb(78,201,176)">IRepository</span><span style="color:rgb(212,212,212)">(metaclass=ABCMeta):</span><span style="color:rgb(212,212,212)"></span></div></div></div><div><br></div><div>Lo segundo que te puedo decir es que la issue (que no sé si es issue) no es cosa de Pycharm si no de mypy, lo puedes comprobar rulando directamente mypy sobre el archivo en cuestión. Así que básicamente es una issue en cualquier IDE que conozca porque todos usan mypy como motor para el type checking.<br></div><div><br></div><div>Lo tercero es que creo que no es una issue. Creo que <br><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(86,156,214)">def</span><span style="color:rgb(212,212,212)"> </span><span style="color:rgb(220,220,170)">repository_provider</span><span style="color:rgb(212,212,212)">(</span><span style="color:rgb(156,220,254)">name</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(78,201,176)">str</span><span style="color:rgb(212,212,212)">) -> IRepository:</span></div></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">O mér., 9 de dec. de 2020 ás 02:47, Artur Costa (<<a href="mailto:acosta@alicebiometrics.com">acosta@alicebiometrics.com</a>>) escribiu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hola,<div><br></div><div>Primer mensaje a la lista, así que... encantado :)</div><div><br></div><div>Disclaimer, si este no es el canal para compartir estas dudas y es mejor el slack por ejemplo, disculpad.</div><div><br></div><div>Bueno, al lío. Uso el PyCharm como IDE y desde hace un tiempo me muestra un warning que mete un poco de ruido en los constructores semánticos con los que trabajo.</div><div><br></div><div><div><img src="cid:ii_ki5qcb5e0" alt="pycharm_warning.png" width="542" height="130"><br></div></div><div><br></div><div>Parece que es un tema de que PyCharm no es capaz de resolver una herencia doble. He creado un snippet rápido en github como ejemplo</div><div><br></div><div><a href="https://github.com/acostapazo/typing-inheritance-example" target="_blank">https://github.com/acostapazo/typing-inheritance-example</a><br></div><div><br></div><div>He buscado acerca del tema, pero quizás no estoy enfocando bien el tiro. Entiendo que es una limitación del IDE, pero no lo tengo claro. ¿Alguna recomendación de por dónde tirar? ¿Desactivo ese warning en PyCharm y me voy a descansar?</div><div><br></div><div>Un saludo,</div><div>Artur<br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><img src="https://lh5.googleusercontent.com/YFMV_g1g7ZPdll3RrQkXkOUxVOc2CFWWdBD85Qxrs7_SOBO17IBXWi3bZQhNHATr-U-GQVd8CZD0XvnwK0cLaHI1c_0TXwwgalpzY7UCZIzD5Nf5ZsZRBlv-0SW_T4ePZqEK9UYW" style="border: medium none;" width="267" height="80"></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:Arial;color:rgb(0,0,255);background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Artur Costa Pazo</span></p><p style="line-height:1.84896;margin-top:0pt;margin-bottom:0pt"><font face="Arial" color="#000000"><span style="font-size:12px;white-space:pre-wrap">Engineering Manager</span></font></p><p dir="ltr" style="line-height:1.84896;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9pt;font-family:Arial;color:rgb(0,0,255);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Ph.</span><span style="font-size:9pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> (+34) 986 120 430</span><span style="font-size:9pt;font-family:Arial;color:rgb(0,0,255);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> Ext</span><span style="font-size:9pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">. 3020</span></p><p dir="ltr" style="line-height:1.44;margin-top:0pt;margin-bottom:8pt"><span style="font-size:9.5pt;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><a href="mailto:acosta@alicebiometrics.com" target="_blank">acosta@alicebiometrics.com</a></span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:9pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> |  </span><a href="https://www.alicebiometrics.com/" style="text-decoration:none" target="_blank"><span style="font-size:9.5pt;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">www.alicebiometrics.com</span></a></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:7pt;font-family:Arial;color:rgb(166,166,166);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Take care of the environment. Try not to print this email.</span></p><p dir="ltr" style="font-size:12.8px;line-height:1.5408;margin-top:0pt;margin-bottom:0pt"><span></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:7pt;font-family:Arial;color:rgb(166,166,166);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">The information contained in this email message may be confidential information, and may also be the subject of legal professional privilege. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorized and prohibited. Please inform us immediately and destroy the email. Thank you for your cooperation.</span></p></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Asociación Python España: <a href="https://www.es.python.org/" rel="noreferrer" target="_blank">https://www.es.python.org/</a><br>
Python Vigo: <a href="https://www.python-vigo.es/" rel="noreferrer" target="_blank">https://www.python-vigo.es/</a><br>
Vigo mailing list<br>
<a href="mailto:Vigo@lists.es.python.org" target="_blank">Vigo@lists.es.python.org</a><br>
<a href="https://lists.es.python.org/listinfo/vigo" rel="noreferrer" target="_blank">https://lists.es.python.org/listinfo/vigo</a><br>
</blockquote></div></div>