Ignore:
Timestamp:
Dec 26, 2018, 8:00:40 PM (8 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Remove positional argument specifiers for `format`

In strings for `format` calls, remove the digits for positional
arguments. For example, "{0}, {1}" becomes "{}, {}".
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test_public_servers.py

    r1718 r1723  
    4848                                 stdout=subprocess.PIPE,
    4949                                 universal_newlines=True)
    50     commands = ["user anonymous {0}".format(EMAIL), "dir", "bye"]
     50    commands = ["user anonymous {}".format(EMAIL), "dir", "bye"]
    5151    if directory:
    5252        # Change to this directory before calling "dir".
    53         commands.insert(1, "cd {0}".format(directory))
     53        commands.insert(1, "cd {}".format(directory))
    5454    input_ = "\n".join(commands)
    5555    stdout, unused_stderr = ftp_popen.communicate(input_)
     
    151151                                name == "mscomtest"
    152152                              )]
    153                 failure_message = ("For server {0}, directory {1}: {2} != {3}".
     153                failure_message = ("For server {}, directory {}: {} != {}".
    154154                                   format(server, initial_directory, names,
    155155                                          canonical_names))
Note: See TracChangeset for help on using the changeset viewer.