Skip to content

Commit

Permalink
Update PIE796 fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jan 17, 2023
1 parent 6e88c60 commit a486285
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 29 deletions.
22 changes: 14 additions & 8 deletions resources/test/fixtures/flake8_pie/PIE796.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
import enum
from enum import Enum, unique


class FakeEnum(enum.Enum):
A = "A"
B = "B"
C = "B" # PIE796
C = "B" # PIE796


class FakeEnum2(Enum):
A = 1
B = 2
C = 2 # PIE796
C = 2 # PIE796


class FakeEnum3(str, Enum):
A = "1"
B = "2"
C = "2" # PIE796
C = "2" # PIE796


class FakeEnum4(Enum):
A = 1.0
B = 2.5
C = 2.5 # PIE796
C = 2.5 # PIE796


class FakeEnum5(Enum):
A = 1.0
B = True
C = False
D = False # PIE796
D = False # PIE796


class FakeEnum6(Enum):
A = 1
B = 2
C = None
D = None # PIE796
D = None # PIE796


@enum.unique
Expand All @@ -41,14 +46,15 @@ class FakeEnum7(enum.Enum):
B = "B"
C = "C"


@unique
class FakeEnum8(Enum):
A = 1
B = 2
C = 2 # PIE796
C = 2 # PIE796


class FakeEnum9(enum.Enum):
A = "A"
B = "B"
C = "C"

Original file line number Diff line number Diff line change
Expand Up @@ -3,72 +3,79 @@ source: src/rules/flake8_pie/mod.rs
expression: diagnostics
---
- kind:
PreferUniqueEnums: "\"B\""
PreferUniqueEnums:
value: "\"B\""
location:
row: 4
row: 8
column: 4
end_location:
row: 4
row: 8
column: 11
fix: ~
parent: ~
- kind:
PreferUniqueEnums: "2"
PreferUniqueEnums:
value: "2"
location:
row: 10
row: 14
column: 4
end_location:
row: 10
row: 14
column: 9
fix: ~
parent: ~
- kind:
PreferUniqueEnums: "\"2\""
PreferUniqueEnums:
value: "\"2\""
location:
row: 16
row: 20
column: 4
end_location:
row: 16
row: 20
column: 11
fix: ~
parent: ~
- kind:
PreferUniqueEnums: "2.5"
PreferUniqueEnums:
value: "2.5"
location:
row: 21
row: 26
column: 4
end_location:
row: 21
row: 26
column: 11
fix: ~
parent: ~
- kind:
PreferUniqueEnums: "False"
PreferUniqueEnums:
value: "False"
location:
row: 28
row: 33
column: 4
end_location:
row: 28
row: 33
column: 13
fix: ~
parent: ~
- kind:
PreferUniqueEnums: None
PreferUniqueEnums:
value: None
location:
row: 35
row: 40
column: 4
end_location:
row: 35
row: 40
column: 12
fix: ~
parent: ~
- kind:
PreferUniqueEnums: "2"
PreferUniqueEnums:
value: "2"
location:
row: 48
row: 54
column: 4
end_location:
row: 48
row: 54
column: 9
fix: ~
parent: ~
Expand Down

0 comments on commit a486285

Please sign in to comment.