From 361d765f52938b0226bfed858fe906aa9d4ebb65 Mon Sep 17 00:00:00 2001 From: Ravencentric <78981416+Ravencentric@users.noreply.github.com> Date: Wed, 20 Nov 2024 04:39:27 +0530 Subject: [PATCH] fix --- .github/workflows/lint-and-type-check.yml | 1 + .github/workflows/release.yml | 5 ++++- src/stringenum/__init__.py | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint-and-type-check.yml b/.github/workflows/lint-and-type-check.yml index 774bca1..4db7269 100644 --- a/.github/workflows/lint-and-type-check.yml +++ b/.github/workflows/lint-and-type-check.yml @@ -16,6 +16,7 @@ on: - 'tests/**' - '.github/workflows/lint-and-type-check.yml' workflow_dispatch: + workflow_call: defaults: run: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee0ac26..6e91102 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,9 +9,12 @@ jobs: tests: name: Tests uses: ./.github/workflows/tests.yml + lint: + name: Lint + uses: ./.github/workflows/lint-and-type-check.yml release: name: Release - needs: [tests] + needs: [tests, lint] environment: name: release url: https://pypi.org/project/stringenum/ diff --git a/src/stringenum/__init__.py b/src/stringenum/__init__.py index 3563119..b31dbc0 100644 --- a/src/stringenum/__init__.py +++ b/src/stringenum/__init__.py @@ -11,10 +11,10 @@ else: from enum import Enum from enum import EnumMeta as EnumType - + # Copy of StrEnum for Python < 3.11 # https://github.com/python/cpython/blob/bb98a0afd8598ce80f0e6d3f768b128eab68f40a/Lib/enum.py#L1351-L1382 - class StrEnum(str, Enum): # pragma: no cover + class StrEnum(str, Enum): # pragma: no cover """Enum where members are also (and must be) strings.""" def __new__(cls, *values: str) -> Self: