Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
version as standart option
  • Loading branch information
andgineer committed Apr 1, 2024
1 parent a3497c3 commit f232f09
Show file tree
Hide file tree
Showing 15 changed files with 220 additions and 175 deletions.
78 changes: 9 additions & 69 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,80 +8,20 @@ exclude: |
version.py
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.4
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: ["--unsafe"]
- id: check-added-large-files
exclude: (site)

- repo: https://github.com/myint/autoflake
rev: v2.2.1
hooks:
- id: autoflake
name: Cleanup imports
args:
- --in-place
- --remove-all-unused-imports
- --expand-star-imports
- --ignore-init-module-imports

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
name: Sorts imports
args: [
# Align isort with black formatting
"--multi-line=3",
"--trailing-comma",
"--force-grid-wrap=0",
"--use-parentheses",
"--line-width=99",
]

- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
name: Fixes formatting
language_version: python3
args: ["--line-length=99"]

- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
name: Checks pep8 style
args:
- --max-line-length=99
# F405 - init imports * from module
# F401 - ignore imports used in init
# F403 - import * used in init
- --exclude=__init__.py
# ignore long comments (E501), as long lines are formatted by black
# ignore Whitespace before ':' (E203)
# ignore Line break occurred before a binary operator (W503)
# ignore module level import not at top of file (E402) to skip tests with uninstalled modules (pytest.importorskip)
- --ignore=E501,E203,W503,E402

- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
name: docstrings
entry: pydocstyle
language: python
args:
- --ignore=D100,D203,D405,D407,D213,D413
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format

- repo: local
hooks:
- id: mypy
name: MyPy
name: mypy
entry: |
mypy
--ignore-missing-imports
Expand Down
103 changes: 60 additions & 43 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#
# pip-compile requirements.dev.in
#
astroid==3.0.2
astroid==3.1.0
# via pylint
babel==2.14.0
# via mkdocs-material
bracex==2.4
# via wcmatch
build==1.0.3
build==1.2.1
# via pip-tools
certifi==2023.11.17
certifi==2024.2.2
# via requests
cfgv==3.4.0
# via pre-commit
Expand All @@ -22,58 +22,61 @@ click==8.1.7
# via
# mkdocs
# pip-tools
# typer
# typer-slim
colorama==0.4.6
# via mkdocs-material
coverage[toml]==6.5.0
# via
# coverage
# coveralls
# pytest-cov
coveralls==3.3.1
# via -r requirements.dev.in
dill==0.3.7
dill==0.3.8
# via pylint
distlib==0.3.8
# via virtualenv
docopt==0.6.2
# via coveralls
docutils==0.20.1
# via readme-renderer
filelock==3.13.1
filelock==3.13.3
# via virtualenv
ghp-import==2.1.0
# via mkdocs
identify==2.5.33
identify==2.5.35
# via pre-commit
idna==3.6
# via requests
importlib-metadata==7.0.1
importlib-metadata==7.1.0
# via
# keyring
# twine
iniconfig==2.0.0
# via pytest
isort==5.13.2
# via pylint
jaraco-classes==3.3.0
jaraco-classes==3.4.0
# via keyring
jaraco-context==4.3.0
# via keyring
jaraco-functools==4.0.0
# via keyring
jinja2==3.1.3
# via
# mkdocs
# mkdocs-material
keyring==24.3.0
keyring==25.0.0
# via twine
lazydocs==0.4.8
# via -r requirements.dev.in
markdown==3.5.2
markdown==3.6
# via
# mkdocs
# mkdocs-material
# pymdown-extensions
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.4
markupsafe==2.1.5
# via
# jinja2
# mkdocs
Expand All @@ -90,23 +93,25 @@ mkdocs==1.5.3
# mkdocs-material
mkdocs-awesome-pages-plugin==2.9.2
# via -r requirements.dev.in
mkdocs-material==9.5.5
mkdocs-material==9.5.16
# via -r requirements.dev.in
mkdocs-material-extensions==1.3.1
# via mkdocs-material
more-itertools==10.2.0
# via jaraco-classes
mypy==1.8.0
# via
# jaraco-classes
# jaraco-functools
mypy==1.9.0
# via -r requirements.dev.in
mypy-extensions==1.0.0
# via mypy
natsort==8.4.0
# via mkdocs-awesome-pages-plugin
nh3==0.2.15
nh3==0.2.17
# via readme-renderer
nodeenv==1.8.0
# via pre-commit
packaging==23.2
packaging==24.0
# via
# build
# mkdocs
Expand All @@ -115,42 +120,44 @@ paginate==0.5.6
# via mkdocs-material
pathspec==0.12.1
# via mkdocs
pip-tools==7.3.0
pip-tools==7.4.1
# via -r requirements.dev.in
pkginfo==1.9.6
pkginfo==1.10.0
# via twine
platformdirs==4.1.0
platformdirs==4.2.0
# via
# mkdocs
# pylint
# virtualenv
pluggy==1.4.0
# via pytest
pre-commit==3.6.0
pre-commit==3.7.0
# via -r requirements.dev.in
pygments==2.17.2
# via
# mkdocs-material
# readme-renderer
# rich
pylint==3.0.3
pylint==3.1.0
# via -r requirements.dev.in
pymdown-extensions==10.7
pymdown-extensions==10.7.1
# via
# -r requirements.dev.in
# mkdocs-material
pyproject-hooks==1.0.0
# via build
pytest==7.4.4
# via
# build
# pip-tools
pytest==8.1.1
# via
# -r requirements.dev.in
# pytest-asyncio
# pytest-cov
pytest-asyncio==0.23.3
pytest-asyncio==0.23.6
# via -r requirements.dev.in
pytest-cov==4.1.0
pytest-cov==5.0.0
# via -r requirements.dev.in
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via ghp-import
pyyaml==6.0.1
# via
Expand All @@ -160,7 +167,7 @@ pyyaml==6.0.1
# pyyaml-env-tag
pyyaml-env-tag==0.1
# via mkdocs
readme-renderer==42.0
readme-renderer==43.0
# via twine
regex==2023.12.25
# via mkdocs-material
Expand All @@ -174,33 +181,43 @@ requests-toolbelt==1.0.0
# via twine
rfc3986==2.0.0
# via twine
rich==13.7.0
# via twine
rich==13.7.1
# via
# twine
# typer-slim
shellingham==1.5.4
# via typer-slim
six==1.16.0
# via python-dateutil
tomlkit==0.12.3
tomlkit==0.12.4
# via pylint
twine==4.0.2
twine==5.0.0
# via -r requirements.dev.in
typer==0.9.0
typer==0.12.0
# via lazydocs
typing-extensions==4.9.0
typer-cli==0.12.0
# via typer
typer-slim[standard]==0.12.0
# via
# mypy
# typer
urllib3==2.1.0
# typer-cli
typing-extensions==4.10.0
# via
# mypy
# typer-slim
urllib3==2.2.1
# via
# requests
# twine
virtualenv==20.25.0
virtualenv==20.25.1
# via pre-commit
watchdog==3.0.0
watchdog==4.0.0
# via mkdocs
wcmatch==8.5
wcmatch==8.5.1
# via mkdocs-awesome-pages-plugin
wheel==0.42.0
wheel==0.43.0
# via pip-tools
zipp==3.17.0
zipp==3.18.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
Expand Down
26 changes: 13 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
beautifulsoup4==4.12.3
# via markdownify
certifi==2023.11.17
certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
Expand All @@ -20,40 +20,40 @@ jinja2==3.1.3
# via -r requirements.in
markdown-it-py==3.0.0
# via rich
markdownify==0.11.6
markdownify==0.12.1
# via -r requirements.in
markupsafe==2.1.4
markupsafe==2.1.5
# via jinja2
mdurl==0.1.2
# via markdown-it-py
numpy==1.26.3
numpy==1.26.4
# via pandas
pandas==2.2.0
pandas==2.2.1
# via -r requirements.in
pygments==2.17.2
# via rich
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via pandas
pytz==2023.3.post1
pytz==2024.1
# via pandas
requests==2.31.0
# via -r requirements.in
rich==13.7.0
rich==13.7.1
# via rich-click
rich-click==1.7.3
rich-click==1.7.4
# via -r requirements.in
six==1.16.0
# via
# markdownify
# python-dateutil
soupsieve==2.5
# via beautifulsoup4
tqdm==4.66.1
tqdm==4.66.2
# via -r requirements.in
typing-extensions==4.9.0
typing-extensions==4.10.0
# via rich-click
tzdata==2023.4
tzdata==2024.1
# via pandas
urllib3==2.1.0
urllib3==2.2.1
# via requests
tomli>=1.1.0; python_version < "3.11"

0 comments on commit f232f09

Please sign in to comment.