Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-37602

Upgrade yapf to 0.24.0

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.10
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Dev Tools 2019-03-11, Dev Tools 2019-03-25, Dev Tools 2019-04-08, Dev Tools 2019-04-22

      I think that there are definite readability benefits to yapf==0.24.0. e.g.

      left 0.24.0, right 0.21.0
      2025,2028c2003,2005
      <     program_options.add_option(
      <         "--logLevel", dest="log_level", choices=log_levels,
      <         help="The log level. Accepted values are: {}."
      <         " [default: '%default'].".format(log_levels), default="info")
      ---
      >     program_options.add_option("--logLevel", dest="log_level", choices=log_levels,
      >                                help="The log level. Accepted values are: {}."
      >                                " [default: '%default'].".format(log_levels), default="info")
      2260,2262c2237,2239
      <     ssh_connection_options = "{} {}".format(
      <         default_ssh_connection_options,
      <         options.ssh_connection_options if options.ssh_connection_options else "")
      ---
      >     ssh_connection_options = "{} {}".format(default_ssh_connection_options,
      >                                             options.ssh_connection_options
      >                                             if options.ssh_connection_options else "")
      

      That said, the changes to the python code are quite a few lines of trivial differences. It also probably means converting percent sign format lines to format function calls. Hence this is a separate ticket.

            Assignee:
            mathew.robinson@mongodb.com Mathew Robinson (Inactive)
            Reporter:
            ben.caimano@mongodb.com Benjamin Caimano (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: