ajenti / ajenti

Unnecessary None provided as default PTC-W0039
Anti-pattern
Minor
6 months ago3 years old
None as default value is redundant
155                    aj.config.ensure_structure()
156                    self.gateway_middleware.broadcast_config_data()
157                if resp.object['type'] == 'log':
158                    method = {159                        'info': logging.info,
160                        'warn': logging.warning,
161                        'warning': logging.warning,
None as default value is redundant
18        self.key = key
19        self.client_info = client_info or {}
20        self.data = {}
21        self.identity = kwargs.get('initial_identity', None)22        self.auth_info = auth_info
23        self.touch()
24        self.active = True
None as default value is redundant
 60
 61        self.command = command
 62        if not self.command:
 63            shell = os.environ.get('SHELL', None) 64            if not shell:
 65                for sh in ['zsh', 'bash', 'sh']:
 66                    try:
None as default value is redundant
 86                    props[key] = value.strip()
 87            adapter = {
 88                'name': d,
 89                'pluggedIn': props.get('state', None) == 'on-line', 90            }
 91            adapters.append(adapter)
 92        return adapters
None as default value is redundant
 60                'voltage': self.__parse_acpi_value(props.get('present rate', '0 V')),
 61                'type': props.get('battery type', 'Unknown'),
 62                'manufacturer': props.get('OEM info', 'Unknown'),
 63                'charging': props.get('charging state', None) == 'charging', 64            }
 65            batteries.append(battery)
 66        return batteries