Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
pre-commit install-hooks
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46.0.5
uses: tj-actions/changed-files@v47.0.0
- name: Lint modified files
run: pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }}
4 changes: 2 additions & 2 deletions .github/workflows/reusable-ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ jobs:
- name: Get changed files
if: steps.check_skip.outputs.skip_tests == 'false'
id: changed-files
uses: tj-actions/changed-files@v46.0.5
uses: tj-actions/changed-files@v47.0.0

# =================================================================
# STAGE 2: OPS TESTS
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
- name: Get changed files
if: steps.check_skip.outputs.skip_tests == 'false'
id: changed-files
uses: tj-actions/changed-files@v46.0.5
uses: tj-actions/changed-files@v47.0.0

- name: Install/Update Dependencies
if: steps.check_skip.outputs.skip_tests == 'false'
Expand Down
16 changes: 5 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-symlinks
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-ast
- id: check-added-large-files
- id: check-merge-conflict
- id: detect-private-key
- id: debug-statements
- repo: https://github.com/pycqa/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
args: [--max-line-length=127]
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
39 changes: 36 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,46 @@ Repository = "https://github.com/fla-org/flash-linear-attention"
[build-system]
requires = ["setuptools>=45", "wheel"]

[tool.isort]
line_length = 127
multi_line_output = 3
[tool.ruff.lint.isort]
known-first-party = ["fla"]
force-sort-within-sections = false

[tool.pytest.ini_options]
log_cli = true
log_cli_level = "INFO"
pythonpath = [
"."
]

[tool.ruff]
target-version = "py310"
line-length = 127

[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"I", # isort
"C4", # flake8-comprehensions
"TCH", # flake8-type-checking
"COM", # flake8-commas
"T", # flake8-debugger
]
ignore = [
"E501",
"E741",
"B023",
"B008",
"SIM108",
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"fla/utils.py" = ["TCH004"]
"evals/harness.py" = ["I", "TCH"]
Loading