Skip to content

Commit

Permalink
add linting
Browse files Browse the repository at this point in the history
  • Loading branch information
haarcuba committed Sep 13, 2024
1 parent 6d01702 commit 39bf584
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Enforce Conventions

on:
push:

jobs:
linters-and-formatters:
runs-on: ubuntu-latest
environment: prod
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Enforce Conventions
uses: pre-commit/action@v3.0.1
with:
extra_args:
--all-files
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: template.yml
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
args:
- --line-length=150
- --target-version=py311
- --skip-string-normalization
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
args:
- --ignore=E203,E501,E266,F541,W503,F405
- "--exclude=docs/*"
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.3
hooks:
- id: check-github-workflows
args: [ "--verbose" ]
- repo: https://github.com/PracticeFoxyCode/practice
rev: releases/1.0.0
hooks:
- id: foxylint-imports
#args:
#- "--exclude=./etoro-emails/**/*.py"
#- "--accept=/from logger import logger/"
#- "--accept=/from xm_livechat.*import/"
#- "--accept=/from testix import/"

0 comments on commit 39bf584

Please sign in to comment.