Skip to content
This repository has been archived by the owner on Aug 18, 2022. It is now read-only.

Commit

Permalink
3.5 does not have auto()
Browse files Browse the repository at this point in the history
  • Loading branch information
tmontaigu committed Feb 22, 2019
1 parent b3d3a89 commit 8335a1a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions pylas/extradims.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from enum import Enum

from . import errors
from enum import Enum, auto

_extra_dims_base_style_1 = (
"",
Expand Down Expand Up @@ -43,10 +44,10 @@
)

_extra_dims_style_1 = (
_extra_dims_base_style_1 + _extra_dims_style_1_array_2 + _extra_dims_style_1_array_3
_extra_dims_base_style_1 + _extra_dims_style_1_array_2 + _extra_dims_style_1_array_3
)
_extra_dims_style_2 = (
_extra_dims_base_style_2 + _extra_dims_style_1_array_2 + _extra_dims_style_2_array_3
_extra_dims_base_style_2 + _extra_dims_style_1_array_2 + _extra_dims_style_2_array_3
)

_type_to_extra_dim_id_style_1 = {
Expand All @@ -56,11 +57,11 @@
type_str: i for i, type_str in enumerate(_extra_dims_style_2)
}

class DimensionSignedness(Enum):
FLOATING = auto(),
SIGNED = auto(),
UNSIGNED = auto()

class DimensionSignedness(Enum):
FLOATING = 0,
SIGNED = 1,
UNSIGNED = 2


def get_signedness_for_extra_dim(type_index):
Expand Down Expand Up @@ -88,8 +89,6 @@ def get_signedness_for_extra_dim(type_index):
raise errors.UnknownExtraType(type_index)




def get_type_for_extra_dim(type_index):
""" Returns the type str ('u1" or "u2", etc) for the given type index
Parameters
Expand Down

0 comments on commit 8335a1a

Please sign in to comment.