/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/bash_completion/bashcomp.py

  • Committer: Breezy landing bot
  • Author(s): Martin
  • Date: 2017-06-05 21:50:19 UTC
  • mfrom: (6656.1.3 dict_viewing)
  • Revision ID: breezy.the.bot@gmail.com-20170605215019-uw7s07tx11p194kh
Apply 2to3 dict fixer and clean up with sixish view methods

Merged from https://code.launchpad.net/~gz/brz/dict_viewing/+merge/325108

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
            brz_version += "."
190
190
        else:
191
191
            brz_version += " and the following plugins:"
192
 
            for name, plugin in sorted(self.data.plugins.iteritems()):
 
192
            for name, plugin in sorted(self.data.plugins.items()):
193
193
                brz_version += "\n# %s" % plugin
194
194
        return brz_version
195
195
 
314
314
                self.data.global_options.add(short)
315
315
 
316
316
    def aliases(self):
317
 
        for alias, expansion in config.GlobalConfig().get_aliases().iteritems():
 
317
        for alias, expansion in config.GlobalConfig().get_aliases().items():
318
318
            for token in cmdline.split(expansion):
319
319
                if not token.startswith("-"):
320
320
                    self.user_aliases.setdefault(token, set()).add(alias)
352
352
            if useralias not in cmd_data.aliases]))
353
353
 
354
354
        opts = cmd.options()
355
 
        for optname, opt in sorted(opts.iteritems()):
 
355
        for optname, opt in sorted(opts.items()):
356
356
            cmd_data.options.extend(self.option(opt))
357
357
 
358
358
        if 'help' == name or 'help' in cmd.aliases:
471
471
    if args:
472
472
        parser.error("script does not take positional arguments")
473
473
    kwargs = dict()
474
 
    for name, value in opts.__dict__.iteritems():
 
474
    for name, value in opts.__dict__.items():
475
475
        if value is not None:
476
476
            kwargs[name] = value
477
477