Skip to content

fix udf_tools.py

fix udf_tools.py #44

Workflow file for this run

name: lint-code
on: [push]
jobs:
ruff-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: ruff --> Check for style violations
# E402: Module level import not at top of file
# E722: Do not use bare 'except'
run: ruff check --ignore E402,E722 --unsafe-fixes .
isort-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install isort
- name: isort --> Check for best-practice sorting of imports
run: isort --check . \
ruff-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: ruff --> Check code formatting
run: ruff format --check .
mypy-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy
- name: mypy --> Install stubs
run: echo -e "y" | mypy --install-types --ignore-missing-imports --follow-imports=skip --exclude build . || exit 0
- name: mypy --> Static type checking
run: mypy --ignore-missing-imports --follow-imports=skip --exclude build .