Inconsistent return statements PYL-R1710
Style
Minor
2 months ago2 years old
Either all return statements in a function should return an expression, or none of them should.
14574        return self.findallbyre(r'(?s)<p class="bronnen">(.*?)<', html,
14575                                'source')
14576
14577    def findtitles(self, html: str):14578        section = self.findbyre(r'(?s)Adelstitel:(.*?)<', html)
14579        if section:
14580            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.
14507            r'&dagger;\s*<span>[^<>]*</span>,\s*<span>(.*?)</span>', html,
14508            'city')
14509
14510    def findoccupations(self, html: str):14511        section = self.findbyre(r'<br>([^<>]*)</p>', html)
14512        if section:
14513            return self.findallbyre(r'([^,]*)', section, 'occupation')
Either all return statements in a function should return an expression, or none of them should.
14464            r'\(Person\)(?:\s|<[^<>]*>)*<div class="singleRow">(.*?)<', html,
14465            'gender')
14466
14467    def findnationalities(self, html: str):14468        section = self.findbyre('(?s)<h2>Nationality</h2>(.*?)<h2', html)
14469        if section:
14470            return self.findallbyre('([^,]*)', section, 'occupation')
Either all return statements in a function should return an expression, or none of them should.
14442    def finddescription(self, html: str):
14443        return self.findbyre('(?s)<h2>Occupation</h2>(.*?)<h2', html)
14444
14445    def findoccupations(self, html: str):14446        section = self.findbyre('(?s)<h2>Occupation</h2>(.*?)<h2', html)
14447        if section:
14448            return self.findallbyre('([^,]*)', section, 'occupation')
Either all return statements in a function should return an expression, or none of them should.
14380        if deathdata:
14381            return self.findbyre(r'(.*\d),', deathdata)
14382
14383    def finddeathplace(self, html: str):14384        deathdata = self.getvalue('Overleden', html)
14385        if deathdata:
14386            return self.findbyre(r'.*\d,(.*)', deathdata, 'city')