Skip to content

useless line in the _Quiver class definition #3490

Open

Description

@empet

In the _Quiver class definition (more precisely within the body of one of its methods) there is a useless line https://github.com/plotly/plotly.py/blob/master/packages/python/plotly/plotly/figure_factory/_quiver.py#L257 which just leads to repeating the calculations of the elements in the four lists under the for loop:

for index in range(len(self.end_x)):
    point1_x = [i - j * self.scaleratio for i, j in zip(self.end_x, seg1_x)]
    point1_y = [i - j for i, j in zip(self.end_y, seg1_y)]
    point2_x = [i - j * self.scaleratio for i, j in zip(self.end_x, seg2_x)]
    point2_y = [i - j for i, j in zip(self.end_y, seg2_y)]

The for line must be removed and the next four lines moved a tab at left.

Activity

  1. added a commit that references this issue on Dec 2, 2021
  2. self-assigned this
    on Jun 26, 2024
  3. removed their assignment
    on Aug 2, 2024
  4. changed the title [-]There is a useless line in the _Quiver class definition[/-] [+]useless line in the _Quiver class definition[/+] on Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions