Skip to content

Commit

Permalink
U/gblackadder/better ruff (#10)
Browse files Browse the repository at this point in the history
* ruff to sort imports

* unused variables, unused f strings, unused exceptions

* bugbears

* remove isort and black

* remove variable names matching builtins

* better list comprehensions

* simplify dict type model creation

* simplify unnecessary returns

* simplify isinstances

* fix todos

* delete commented out code

* pandas .values -> .to_numpy()

* don't overwrite the iterated var

* dont wrap the descriptions in the pydantic schemas

* use values not items in dict iteration

* check docstrings

* now with up
  • Loading branch information
gblackadder authored Dec 11, 2024
1 parent ff07496 commit f60e138
Show file tree
Hide file tree
Showing 27 changed files with 2,341 additions and 2,175 deletions.
17 changes: 5 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,10 @@ repos:
exclude: package.lock.json
args: ["--exclude-lines", "\\s*\"image/png\": \".+\""]

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1 # Use the latest version
hooks:
- id: isort

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.287 # Use the latest version
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2 # Use the latest version
hooks:
- id: ruff

- repo: https://github.com/psf/black
rev: 23.3.0 # Use the latest version
hooks:
- id: black
args: ["check", "--select", "I,F,B,A,C4,ICN,LOG,G,PIE,RET,SIM,TD,PD,PLW,NPY,DOC,UP", "--ignore", "TD003,PD901,UP006,UP035", "--fix"]
- id: ruff-format
args: ["--line-length", "120"]
52 changes: 26 additions & 26 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f60e138

Please sign in to comment.