/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: Martin
  • Date: 2017-06-05 20:48:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6658.
  • Revision ID: gzlist@googlemail.com-20170605204831-20accykspjcrx0a8
Apply 2to3 dict fixer and clean up resulting mess using view helpers

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