Skip to content

Commit

Permalink
Use @enum.unique
Browse files Browse the repository at this point in the history
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
Eric-Arellano committed Oct 16, 2020
1 parent 36637de commit 407e1c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/python/pants/backend/python/goals/setup_py.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

import enum
import io
import itertools
import logging
Expand All @@ -9,7 +10,6 @@
from abc import ABC, abstractmethod
from collections import abc, defaultdict
from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, List, Mapping, Set, Tuple, cast

from pants.backend.python.macros.python_artifact import PythonArtifact
Expand Down Expand Up @@ -310,7 +310,8 @@ class RunSetupPyResult:
output: Digest # The state of the chroot after running setup.py.


class FirstPartyDependencyVersionScheme(Enum):
@enum.unique
class FirstPartyDependencyVersionScheme(enum.Enum):
EXACT = "exact" # i.e., ==
COMPATIBLE = "compatible" # i.e., ~=
ANY = "any" # i.e., no specifier
Expand Down

0 comments on commit 407e1c8

Please sign in to comment.