Skip to content

Commit

Permalink
Fix linting on Python 3.8 - @nsoranzo commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed Oct 11, 2024
1 parent d37af5e commit d00ddcb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ on: [push, pull_request_target]
jobs:
test-tools:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.8', '3.11']
environment: fetch-tools
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install requirement
run: python -m pip install -r requirements.txt
- name: Tool extraction
Expand All @@ -31,7 +34,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install requirement
run: python -m pip install -r requirements.txt
- name: Tutorial extraction
Expand All @@ -49,7 +52,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install requirement
run: python -m pip install -r requirements.txt
- name: Workflow extraction
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
15 changes: 8 additions & 7 deletions sources/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

0 comments on commit d00ddcb

Please sign in to comment.