Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .flake8

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ jobs:
run: |
poetry install

- name: Lint with flake8
- name: Format check (Ruff)
run: |
poetry run flake8 .
poetry run ruff format --check .

- name: Lint with Ruff
run: |
poetry run ruff check .

integration:
runs-on: ubuntu-latest
Expand Down
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Ruff: format then lint (same commands as CI / Poetry env).
repos:
- repo: local
hooks:
- id: ruff-format-poetry
name: ruff format (poetry run ruff format .)
entry: poetry run ruff format .
language: system
pass_filenames: false
always_run: true
require_serial: true
- repo: local
hooks:
- id: ruff-poetry
name: ruff check (poetry run ruff check .)
entry: poetry run ruff check --fix .
language: system
pass_filenames: false
always_run: true
require_serial: true
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Place your settings in this file to overwrite default and user settings.
{
"[python]": {
"formatting.provider": "black",
"editor.defaultFormatter": "charliermarsh.ruff",
"linting.pylintEnabled": false,
"linting.flake8Enabled": true,
"linting.flake8Enabled": false,
"ruff.enable": true,
"linting.enabled": true,
"linting.mypyEnabled": true,
// "editor.wordWrap": "wordWrapColumn",
Expand Down
1 change: 1 addition & 0 deletions basedir.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
# coding: utf-8

import os

basedir = os.path.abspath(os.path.dirname(__file__))
Loading
Loading