Skip to content

Commit

Permalink
Fix linting on Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Aug 2, 2024
1 parent 9cb366b commit 4dcc114
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ concurrency:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.11']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install tox
run: python -m pip install 'tox>=1.8.0'
- name: Lint
Expand Down
15 changes: 8 additions & 7 deletions bin/extract_galaxy_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import argparse
from typing import (
Any,
Dict,
List,
)

Expand All @@ -20,16 +21,16 @@ def __init__(self) -> None:
self.id = 0
self.link = ""
self.name = ""
self.creators: list[str] = []
self.tags: list[str] = []
self.creators: List[str] = []
self.tags: List[str] = []
self.create_time = ""
self.update_time = ""
self.latest_version = 0
self.versions = 0
self.number_of_steps = 0
self.tools: list[str] = []
self.edam_operation: list[str] = []
self.edam_topic: list[str] = []
self.tools: List[str] = []
self.edam_operation: List[str] = []
self.edam_topic: List[str] = []
self.license = ""
self.doi = ""

Expand Down Expand Up @@ -122,8 +123,8 @@ class Workflows:
"""

def __init__(self, test: bool = False) -> None:
self.workflows: list[Workflow] = []
self.tools: dict[Any, Any] = {}
self.workflows: List[Workflow] = []
self.tools: Dict[Any, Any] = {}
self.test = test

def init_by_searching(self, tool_fp: str) -> None:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ include = '\.pyi?$'
isort = true

[tool.ruff]
target-version = "py38"

[tool.ruff.lint]
# Enable: pycodestyle errors (E), Pyflakes (F), flake8-bugbear (B),
# flake8-logging-format (G) and pyupgrade (UP)
select = ["E", "F", "B", "G", "UP"]
target-version = "py38"
# Exceptions:
# B008 Do not perform function calls in argument defaults (for FastAPI Depends and Body)
# B9 flake8-bugbear opinionated warnings
Expand Down

0 comments on commit 4dcc114

Please sign in to comment.