Inconsistent return statements PYL-R1710
Style
Minor
a month ago2 years old
Either all return statements in a function should return an expression, or none of them should.
14577        return self.findallbyre(r'(?s)<p class="bronnen">(.*?)<', html,
14578                                'source')
14579
14580    def findtitles(self, html: str):14581        section = self.findbyre(r'(?s)Adelstitel:(.*?)<', html)
14582        if section:
14583            return self.findallbyre(r'([a-zA-Z][\w\s]*)', section, 'title')
Either all return statements in a function should return an expression, or none of them should.
14510            r'&dagger;\s*<span>[^<>]*</span>,\s*<span>(.*?)</span>', html,
14511            'city')
14512
14513    def findoccupations(self, html: str):14514        section = self.findbyre(r'<br>([^<>]*)</p>', html)
14515        if section:
14516            return self.findallbyre(r'([^,]*)', section, 'occupation')
Either all return statements in a function should return an expression, or none of them should.
14467            r'\(Person\)(?:\s|<[^<>]*>)*<div class="singleRow">(.*?)<', html,
14468            'gender')
14469
14470    def findnationalities(self, html: str):14471        section = self.findbyre('(?s)<h2>Nationality</h2>(.*?)<h2', html)
14472        if section:
14473            return self.findallbyre('([^,]*)', section, 'occupation')
Either all return statements in a function should return an expression, or none of them should.
14445    def finddescription(self, html: str):
14446        return self.findbyre('(?s)<h2>Occupation</h2>(.*?)<h2', html)
14447
14448    def findoccupations(self, html: str):14449        section = self.findbyre('(?s)<h2>Occupation</h2>(.*?)<h2', html)
14450        if section:
14451            return self.findallbyre('([^,]*)', section, 'occupation')
Either all return statements in a function should return an expression, or none of them should.
14383        if deathdata:
14384            return self.findbyre(r'(.*\d),', deathdata)
14385
14386    def finddeathplace(self, html: str):14387        deathdata = self.getvalue('Overleden', html)
14388        if deathdata:
14389            return self.findbyre(r'.*\d,(.*)', deathdata, 'city')