Last analyzed e7ecab1 2 days ago
Default analysis branch is
Currently analyzing run
Inconsistent return statements PYL-R1710
Style
a month agoa year old
Either all return statements in a function should return an expression, or none of them should.
15018    def finddeathdate(self, html: str):
15019        return self.findbyre(r'"deathDate":"(.*?)"', html)
15020
15021    def finddeathplace(self, html: str):15022        section = self.findbyre(r'"deathPlace":{(.*?)}', html)
15023        if section:
15024            return self.findbyre(r'"name":"(.*?)"', section, 'city')
Either all return statements in a function should return an expression, or none of them should.
13931                            fr'([^{splitters}]+)', section, dtype)
13932        return result
13933
13934    def getinfo(self, names, html, dtype=None, splitters=None, alt=None) -> str:13935        if not alt:
13936            alt = []
13937        for name in names:
Either all return statements in a function should return an expression, or none of them should.
13809    def finddeathdate(self, html: str):
13810        return self.getvalue('Date of Death', html)
13811
13812    def findoccupations(self, html: str):13813        section = self.findbyre('(?s)<div class="field-label">Occupations</div(>.*?<)/div>', html)
13814        if section:
13815            return self.findallbyre('>([^<>]*)<', section, 'occupation')
Either all return statements in a function should return an expression, or none of them should.
13488                result += self.findallbyre('([^,]*)', subsection, 'country')
13489            return result
13490
13491    def findwebpages(self, html: str):13492        section = self.getvalue('Links', html)
13493        if section:
13494            return self.findallbyre('"([^<>"]*://[^<>"]*)"', section)
Either all return statements in a function should return an expression, or none of them should.
13479                result += self.findallbyre('([^,]*)', subsection, 'occupation')
13480            return result
13481
13482    def findnationalities(self, html: str):13483        section = self.getvalue('Nationality', html)
13484        if section:
13485            result = []