Skip to content

Commit

Permalink
chore: added linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Adi8712 committed Oct 25, 2024
1 parent 8626fcd commit 2a9397d
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,5 @@ package-lock.json

.DS_Store
**/generated.pdf

.ruff_cache/
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ numpy==1.22.3
oauthlib==3.1.0
openpyxl==3.0.7
Pillow==8.1.0
pre-commit==3.5.0
prompt-toolkit==3.0.10
psycopg2-binary==2.8.6
pycparser==2.20
Expand Down
46 changes: 46 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]

line-length = 88
indent-width = 4
target-version = "py38"
show-fixes = true

[lint]
select = ["F", "E", "W", "UP", "I", "PL"]
ignore = ["F403", "F405"]
fixable = ["ALL"]
unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"

0 comments on commit 2a9397d

Please sign in to comment.