Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
uniqueg committed May 20, 2024
1 parent 11d9d78 commit 16c7901
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ jobs:
python-version: ${{ matrix.py-version-img[0] }}
- name: Install requirements
run: |
pip install -e .
pip install -r requirements_dev.txt
pip install -e .[dev]
- name: Lint with flake8
run: flake8
- name: Run mypy
Expand Down
8 changes: 4 additions & 4 deletions foca/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
)


def _validate_log_level_choices(level: int) -> int:
def _validate_log_level_choices(cls, level: int) -> int:
"""Custom validation function for Pydantic to ensure that a valid
logging level is configured.
Expand All @@ -32,9 +32,9 @@ def _validate_log_level_choices(level: int) -> int:
Raises:
ValueError: Raised if validation fails.
"""
choices = [0, 10, 20, 30, 40, 50]
if level not in choices:
raise ValueError("illegal log level specified")
CHOICES = [0, 10, 20, 30, 40, 50]
if level not in CHOICES:
raise ValueError(f"illegal log level specified: {level}")
return level


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
],
install_requires=install_requires,
extras_require={
"docs": docs_require,
"dev": dev_requires,
"docs": docs_require,
},
include_package_data=True,
package_data={
Expand Down

0 comments on commit 16c7901

Please sign in to comment.