Skip to content

Commit

Permalink
chore: lint and format with ruff (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylejb committed Mar 31, 2024
1 parent e28f037 commit 23e295a
Show file tree
Hide file tree
Showing 18 changed files with 86 additions and 227 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
__pycache__
.coverage
.docker
.DS_Store
.git
.github
.gitignore
Expand All @@ -9,8 +10,8 @@ __pycache__
.mypy_cache
.pytest_cache
.python-version
.ruff_cache
.vscode
.DS_Store

coverage
htmlcov
Expand Down
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

23 changes: 12 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,39 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
coverage
htmlcov/
.tox/
.nox/
nosetests.xml
.cache
.coverage
.coverage.*
.cache
nosetests.xml
*.cover
*.py,cover
.hypothesis/
.nox/
.pytest_cache/
.ruff_cache
.tox/
*.cover
*.py,cover

## Misc
__pypackages__/
.DS_Store
.idea
.idea_modules
.python-version
__pypackages__/

## mypy
.mypy_cache/
.dmypy.json
.mypy_cache/
dmypy.json

## Sphinx documentation
docs/_build/

## VSCode
.vscode/*
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.vscode/*
*.code-workspace

## Exceptions
Expand Down
33 changes: 8 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: branch-validate
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
rev: v3.21.3
hooks:
- id: commitizen
stages: [commit-msg]
Expand All @@ -17,34 +17,17 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
rev: v1.5.5
hooks:
- id: forbid-tabs
- id: remove-tabs
- repo: https://github.com/lovesegfault/beautysh
rev: v6.2.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: beautysh
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-black>=0.3.6
args: ["--config=.flake8"]
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
1 change: 1 addition & 0 deletions migrations/versions/6fc1a99cefd5_create_coastlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-05-21 14:48:54.624485
"""

import sqlalchemy as sa
from alembic import op
from geoalchemy2.types import Geography # type: ignore
Expand Down
1 change: 1 addition & 0 deletions migrations/versions/d632ea3490c4_create_buoys.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-12-25 20:31:21.052080
"""

import sqlalchemy as sa
from alembic import op
from geoalchemy2.types import Geography # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-08-20 14:01:00.212730
"""

import sqlalchemy as sa
from alembic import op

Expand Down
3 changes: 2 additions & 1 deletion migrations/versions/ed4ad564e77b_add_forecasts.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
""" Add Forecasts
"""Add Forecasts
Revision ID: 0d4ad564e77b
Revises: d63493af0a71
Create Date: 2023-03-26 12:46:10.999340
"""

import sqlalchemy as sa
from alembic import op

Expand Down
146 changes: 27 additions & 119 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 23e295a

Please sign in to comment.