Skip to content

Commit

Permalink
flake8 add
Browse files Browse the repository at this point in the history
  • Loading branch information
search5 committed Mar 10, 2024
1 parent b8cc12c commit a911776
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: check-json
- id: debug-statements
- id: mixed-line-ending
args: [--fix=lf]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: [--profile=black]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ requires-python = ">= 3.7"
Repository = 'https://github.com/python-social-auth/social-app-cherrypy'
Documentation = 'http://python-social-auth.readthedocs.org'
Issues = 'https://github.com/python-social-auth/social-app-cherrypy/issues'
Changelog = 'https://github.com/python-social-auth/social-app-cherrypy/blob/master/CHANGELOG.md
Changelog = 'https://github.com/python-social-auth/social-app-cherrypy/blob/master/CHANGELOG.md'

[options]
zip_safe = false
Expand All @@ -51,3 +51,8 @@ find = {}

[tool.setuptools.dynamic]
version = {attr = "social_cherrypy.__version__"}

[tool.flake8]
max-line-length = 120
# Ignore some well known paths
exclude = ['.venv','.tox','dist','doc','build','*.egg','db/env.py','db/versions/*.py','site','Pipfile','Pipfile.lock']
1 change: 1 addition & 0 deletions social_cherrypy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
class SocialBase(DeclarativeBase):
pass


DB_SESSION_ATTR = cherrypy.config.get(setting_name('DB_SESSION_ATTR'), 'db')
UID_LENGTH = cherrypy.config.get(setting_name('UID_LENGTH'), 255)
User = module_member(cherrypy.config[setting_name('USER_MODEL')])
Expand Down

0 comments on commit a911776

Please sign in to comment.