First time here? Check out the FAQ!

Revision history  [back]

Obtain the pycharm style block comment.

In Wing, I want to obtain the pycharm style block comment, say, for the following code block snippet in a class:

def measure_strain(self) -> float:
    """Measures the average strain on bond lengths on both substructures."""
    bond_lengths = self.bond_lengths
    bottom_strain = []
    top_strain = []
    for (k1, b1) in bond_lengths.items():
        for k3, b3 in self.bbl.items():
            if (k3 == k1) or (k3[::-1] == k1):
                d = np.abs((b3 - b1)) / b1 * 100
                bottom_strain.append(d)
        for k3, b3 in self.tbl.items():
            if (k3 == k1) or (k3[::-1] == k1):
                d = np.abs((b3 - b1)) / b1 * 100
                top_strain.append(d)
    strain = np.average(bottom_strain) + np.average(top_strain)
    return strain

In wing, the result is as following with the # Indented PEP 8 Style Comment

# def measure_strain(self) -> float:
    # """Measures the average strain on bond lengths on both substructures."""
    # bond_lengths = self.bond_lengths
    # bottom_strain = []
    # top_strain = []
    # for (k1, b1) in bond_lengths.items():
        # for k3, b3 in self.bbl.items():
            # if (k3 == k1) or (k3[::-1] == k1):
                # d = np.abs((b3 - b1)) / b1 * 100
                # bottom_strain.append(d)
        # for k3, b3 in self.tbl.items():
            # if (k3 == k1) or (k3[::-1] == k1):
                # d = np.abs((b3 - b1)) / b1 * 100
                # top_strain.append(d)
    # strain = np.average(bottom_strain) + np.average(top_strain)
    # return strain

But I want to obtain the pycharm style block comment as follows:

# def measure_strain(self) -> float:
#     """Measures the average strain on bond lengths on both substructures."""
#     bond_lengths = self.bond_lengths
#     bottom_strain = []
#     top_strain = []
#     for (k1, b1) in bond_lengths.items():
#         for k3, b3 in self.bbl.items():
#             if (k3 == k1) or (k3[::-1] == k1):
#                 d = np.abs((b3 - b1)) / b1 * 100
#                 bottom_strain.append(d)
#         for k3, b3 in self.tbl.items():
#             if (k3 == k1) or (k3[::-1] == k1):
#                 d = np.abs((b3 - b1)) / b1 * 100
#                 top_strain.append(d)
#     strain = np.average(bottom_strain) + np.average(top_strain)
#     return strain

Obtain the pycharm style block comment.

In Wing, I want to obtain the pycharm style block comment, say, for the following code block snippet in a class:

def measure_strain(self) -> float:
    """Measures the average strain on bond lengths on both substructures."""
    bond_lengths = self.bond_lengths
    bottom_strain = []
    top_strain = []
    for (k1, b1) in bond_lengths.items():
        for k3, b3 in self.bbl.items():
            if (k3 == k1) or (k3[::-1] == k1):
                d = np.abs((b3 - b1)) / b1 * 100
                bottom_strain.append(d)
        for k3, b3 in self.tbl.items():
            if (k3 == k1) or (k3[::-1] == k1):
                d = np.abs((b3 - b1)) / b1 * 100
                top_strain.append(d)
    strain = np.average(bottom_strain) + np.average(top_strain)
    return strain

In wing, the result is as following with the # Indented PEP 8 Style Comment

# def measure_strain(self) -> float:
    # """Measures the average strain on bond lengths on both substructures."""
    # bond_lengths = self.bond_lengths
    # bottom_strain = []
    # top_strain = []
    # for (k1, b1) in bond_lengths.items():
        # for k3, b3 in self.bbl.items():
            # if (k3 == k1) or (k3[::-1] == k1):
                # d = np.abs((b3 - b1)) / b1 * 100
                # bottom_strain.append(d)
        # for k3, b3 in self.tbl.items():
            # if (k3 == k1) or (k3[::-1] == k1):
                # d = np.abs((b3 - b1)) / b1 * 100
                # top_strain.append(d)
    # strain = np.average(bottom_strain) + np.average(top_strain)
    # return strain

But I want to obtain the pycharm style block comment as follows:

# def measure_strain(self) -> float:
#     """Measures the average strain on bond lengths on both substructures."""
#     bond_lengths = self.bond_lengths
#     bottom_strain = []
#     top_strain = []
#     for (k1, b1) in bond_lengths.items():
#         for k3, b3 in self.bbl.items():
#             if (k3 == k1) or (k3[::-1] == k1):
#                 d = np.abs((b3 - b1)) / b1 * 100
#                 bottom_strain.append(d)
#         for k3, b3 in self.tbl.items():
#             if (k3 == k1) or (k3[::-1] == k1):
#                 d = np.abs((b3 - b1)) / b1 * 100
#                 top_strain.append(d)
#     strain = np.average(bottom_strain) + np.average(top_strain)
#     return strain

Obtain the pycharm style block comment.

In Wing, I want to obtain the pycharm style block comment, say, for the following code block snippet in a class:

def measure_strain(self) -> float:
    """Measures the average strain on bond lengths on both substructures."""
    bond_lengths = self.bond_lengths
    bottom_strain = []
    top_strain = []
    for (k1, b1) in bond_lengths.items():
        for k3, b3 in self.bbl.items():
            if (k3 == k1) or (k3[::-1] == k1):
                d = np.abs((b3 - b1)) / b1 * 100
                bottom_strain.append(d)
        for k3, b3 in self.tbl.items():
            if (k3 == k1) or (k3[::-1] == k1):
                d = np.abs((b3 - b1)) / b1 * 100
                top_strain.append(d)
    strain = np.average(bottom_strain) + np.average(top_strain)
    return strain

In wing, the result is as following with the # Indented PEP 8 Style Comment

# def measure_strain(self) -> float:
    # """Measures the average strain on bond lengths on both substructures."""
    # bond_lengths = self.bond_lengths
    # bottom_strain = []
    # top_strain = []
    # for (k1, b1) in bond_lengths.items():
        # for k3, b3 in self.bbl.items():
            # if (k3 == k1) or (k3[::-1] == k1):
                # d = np.abs((b3 - b1)) / b1 * 100
                # bottom_strain.append(d)
        # for k3, b3 in self.tbl.items():
            # if (k3 == k1) or (k3[::-1] == k1):
                # d = np.abs((b3 - b1)) / b1 * 100
                # top_strain.append(d)
    # strain = np.average(bottom_strain) + np.average(top_strain)
    # return strain

But I want to obtain the pycharm style block comment as follows:

# def measure_strain(self) -> float:
#     """Measures the average strain on bond lengths on both substructures."""
#     bond_lengths = self.bond_lengths
#     bottom_strain = []
#     top_strain = []
#     for (k1, b1) in bond_lengths.items():
#         for k3, b3 in self.bbl.items():
#             if (k3 == k1) or (k3[::-1] == k1):
#                 d = np.abs((b3 - b1)) / b1 * 100
#                 bottom_strain.append(d)
#         for k3, b3 in self.tbl.items():
#             if (k3 == k1) or (k3[::-1] == k1):
#                 d = np.abs((b3 - b1)) / b1 * 100
#                 top_strain.append(d)
#     strain = np.average(bottom_strain) + np.average(top_strain)
#     return strain

Obtain the pycharm style block comment.

In Wing, I want to obtain the pycharm style block comment, say, for the following code block snippet in a class:

def measure_strain(self) -> float:
    """Measures the average strain on bond lengths on both substructures."""
    bond_lengths = self.bond_lengths
    bottom_strain = []
    top_strain = []
    for (k1, b1) in bond_lengths.items():
        for k3, b3 in self.bbl.items():
            if (k3 == k1) or (k3[::-1] == k1):
                d = np.abs((b3 - b1)) / b1 * 100
                bottom_strain.append(d)
        for k3, b3 in self.tbl.items():
            if (k3 == k1) or (k3[::-1] == k1):
                d = np.abs((b3 - b1)) / b1 * 100
                top_strain.append(d)
    strain = np.average(bottom_strain) + np.average(top_strain)
    return strain

In wing, the result is as following with the # Indented PEP 8 Style Comment

# def measure_strain(self) -> float:
    # """Measures the average strain on bond lengths on both substructures."""
    # bond_lengths = self.bond_lengths
    # bottom_strain = []
    # top_strain = []
    # for (k1, b1) in bond_lengths.items():
        # for k3, b3 in self.bbl.items():
            # if (k3 == k1) or (k3[::-1] == k1):
                # d = np.abs((b3 - b1)) / b1 * 100
                # bottom_strain.append(d)
        # for k3, b3 in self.tbl.items():
            # if (k3 == k1) or (k3[::-1] == k1):
                # d = np.abs((b3 - b1)) / b1 * 100
                # top_strain.append(d)
    # strain = np.average(bottom_strain) + np.average(top_strain)
    # return strain

But I want to obtain the pycharm style block comment as follows:

# def measure_strain(self) -> float:
#     """Measures the average strain on bond lengths on both substructures."""
#     bond_lengths = self.bond_lengths
#     bottom_strain = []
#     top_strain = []
#     for (k1, b1) in bond_lengths.items():
#         for k3, b3 in self.bbl.items():
#             if (k3 == k1) or (k3[::-1] == k1):
#                 d = np.abs((b3 - b1)) / b1 * 100
#                 bottom_strain.append(d)
#         for k3, b3 in self.tbl.items():
#             if (k3 == k1) or (k3[::-1] == k1):
#                 d = np.abs((b3 - b1)) / b1 * 100
#                 top_strain.append(d)
#     strain = np.average(bottom_strain) + np.average(top_strain)
#     return strain