Skip to content

Commit a01647c

Browse files
committed
🎨 add some more common error checking
- set line-length to black default of 88 characters
1 parent 3ba8502 commit a01647c

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/cicd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Lint with ruff
3535
run: |
3636
# stop the build if there are Python syntax errors or undefined names
37-
ruff check .
37+
ruff check src
3838
test:
3939
name: Test
4040
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,17 @@ dev = ["black[jupyter]", "ruff", "pytest"]
4646
# Configure the Ruff linter: Ignore error number 501
4747
[tool.ruff]
4848
# https://docs.astral.sh/ruff/rules/#flake8-bandit-s
49-
lint.ignore = ["E501"] # Ignore line length errors
50-
# Allow lines to be as long as:
51-
line-length = 90
49+
# lint.ignore = ["E501"] # Ignore line length errors
50+
# Allow lines to be as long as (default is 88 in black)
51+
# This is the same as the default in black, but we set it explicitly here.
52+
line-length = 88
53+
54+
[tool.ruff.lint]
55+
# https://docs.astral.sh/ruff/tutorial/#rule-selection
56+
# 1. Enable flake8-bugbear (`B`) rules
57+
# 2. Enable pycodestyle (`E`) errors and (`W`) warnings
58+
# 3. Pyflakes (`F`) errors
59+
extend-select = ["E", "W", 'F', 'B']
5260

5361
[build-system]
5462
build-backend = "setuptools.build_meta"
@@ -60,3 +68,6 @@ requires = ["setuptools>=64", "setuptools_scm>=8"]
6068

6169
[tool.isort]
6270
profile = "black"
71+
72+
[tool.black]
73+
line-length = 88

0 commit comments

Comments
 (0)