~ubuntu-core-dev/update-manager/main

« back to all changes in this revision

Viewing changes to janitor/plugincore/core/missing_package_cruft.py

  • Committer: Benjamin Drung
  • Date: 2023-02-13 12:45:23 UTC
  • Revision ID: benjamin.drung@canonical.com-20230213124523-4f1nv2fyvsdl35jb
Fix pycodestyle complains by formatting Python code with black

```
black -C -l 79 .
```

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
from __future__ import absolute_import, print_function, unicode_literals
17
17
 
18
18
__metaclass__ = type
19
 
__all__ = [
20
 
    'MissingPackageCruft',
21
 
]
 
19
__all__ = ["MissingPackageCruft"]
22
20
 
23
21
 
24
22
from janitor.plugincore.cruft import Cruft
25
23
from janitor.plugincore.i18n import setup_gettext
 
24
 
26
25
_ = setup_gettext()
27
26
 
28
27
 
34
33
        self._description = description
35
34
 
36
35
    def get_prefix(self):
37
 
        return 'install-deb'
 
36
        return "install-deb"
38
37
 
39
38
    def get_prefix_description(self):
40
 
        return _('Install missing package.')
 
39
        return _("Install missing package.")
41
40
 
42
41
    def get_shortname(self):
43
42
        return self.package.name
47
46
            return self._description
48
47
        else:
49
48
            # 2012-06-08 BAW: i18n string; don't use {} or PEP 292.
50
 
            return _('Package %s should be installed.') % self.package.name
 
49
            return _("Package %s should be installed.") % self.package.name
51
50
 
52
51
    def cleanup(self):
53
52
        self.package.markInstall()