Skip to content

Commit

Permalink
add ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
facundoolano committed Jul 18, 2024
1 parent 6299d96 commit 84610b9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ test:
$(venv) FLASK_ENV=testing pytest --disable-warnings -v $(if $(TEST),-k $(TEST))

lint:
$(venv) flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude venv,migrations
$(venv) flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude venv,migrations
$(venv) ruff check --exclude venv,migrations
# TODO uncomment in and apply formatting
$(venv) ruff format --exclude venv,migrations
# $(venv) flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude venv,migrations

# Serve the app in development mode
run:
Expand Down
10 changes: 5 additions & 5 deletions feedi/config/development.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ENV = 'development'
SECRET_KEY = b'\xffN\xcfX\xbc\xa9V\x8b*_zFB\xb9\xfa\x1d'
ENV = "development"
SECRET_KEY = b"\xffN\xcfX\xbc\xa9V\x8b*_zFB\xb9\xfa\x1d"
TEMPLATES_AUTO_RELOAD = True

FEEDI_EMAIL = ""
FEEDI_EMAIL_PASSWORD = ""
FEEDI_EMAIL_SERVER = ""
FEEDI_EMAIL = "[email protected]"
FEEDI_EMAIL_PASSWORD = "dtot dlmr isdy uwsi"
FEEDI_EMAIL_SERVER = "smtp.gmail.com"
FEEDI_EMAIL_PORT = 587
14 changes: 12 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "feedi"
description = "A personal news aggregator and Mastodon client"
description = "A personal news aggregator and Mastodon client "
version = "0.1.0"
requires-python = ">= 3.9"
authors = [
Expand Down Expand Up @@ -39,6 +39,16 @@ dev = [
"pytest",
"httpretty",
"feedgen",
"flake8"
"ruff"
]

[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
"venv",
"migrations"
]

line-length = 120
target-version = "py39"

10 changes: 2 additions & 8 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ feedgen==1.0.0
# via feedi (pyproject.toml)
feedparser==6.0.11
# via feedi (pyproject.toml)
flake8==7.1.0
# via feedi (pyproject.toml)
flask==3.0.3
# via
# feedi (pyproject.toml)
Expand Down Expand Up @@ -102,8 +100,6 @@ mastodon-py==1.8.1
# via feedi (pyproject.toml)
matplotlib-inline==0.1.7
# via ipython
mccabe==0.7.0
# via flake8
packaging==24.1
# via
# gunicorn
Expand All @@ -122,10 +118,6 @@ ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
# via stack-data
pycodestyle==2.12.0
# via flake8
pyflakes==3.2.0
# via flake8
pygments==2.18.0
# via ipython
pyopml==1.0.0
Expand All @@ -148,6 +140,8 @@ requests==2.32.3
# favicon
# feedi (pyproject.toml)
# mastodon-py
ruff==0.5.2
# via feedi (pyproject.toml)
sgmllib3k==1.0.0
# via feedparser
six==1.16.0
Expand Down

0 comments on commit 84610b9

Please sign in to comment.