Protected member accessed from outside the class PYL-W0212
Bug risk
Minor
19 days ago2 years old
Access to a protected member _exceptions of a client class
1072        if replacement_set:
1073            replacements.extend(replacement_set)
1074            if replacement_set._exceptions is not None:
1075                for k, v in replacement_set._exceptions.items():1076                    if k in exceptions:
1077                        exceptions[k] = list(set(exceptions[k]) | set(v))
1078                    else:
Access to a protected member _exceptions of a client class
1071        # Exceptions specified via 'fix' shall be merged to those via CLI.
1072        if replacement_set:
1073            replacements.extend(replacement_set)
1074            if replacement_set._exceptions is not None:1075                for k, v in replacement_set._exceptions.items():
1076                    if k in exceptions:
1077                        exceptions[k] = list(set(exceptions[k]) | set(v))
Access to a protected member _compile_exceptions of a client class
 383    def _compile(self, use_regex, flags) -> None:
 384        """Compile the search regex and the fix's exceptions."""
 385        super()._compile(use_regex, flags)
 386        self.fix_set._compile_exceptions(use_regex, flags) 387
 388    def get_inside_exceptions(self):
 389        """Get exceptions on text (inside exceptions)."""
Access to a protected member _paraminfo of a client class
153    site = pywikibot.Site()
154    specialpages = site.siteinfo['specialpagealiases']
155    specialpagelist = {item['realname'] for item in specialpages}
156    allowedlanguages = site._paraminfo.parameter(module='setpagelanguage',157                                                 param_name='lang')['type']
158    # Check if the special page PageLanguage is enabled on the wiki
159    # If it is not, page languages can't be set, and there's no point in
Access to a protected member _protection of a client class
2758                ptype, level = d.popitem()
2759                if level:
2760                    protection[ptype] = (level, expiry)
2761            page._protection = protection2762        finally:
2763            self.unlock_page(page)
2764