-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from lemonyte/update-2024
- Loading branch information
Showing
9 changed files
with
154 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# GitHub Action Workflow enforcing our code style. | ||
# GitHub Action workflow enforcing our code style. | ||
|
||
name: Lint | ||
|
||
|
@@ -9,6 +9,7 @@ on: | |
branches: | ||
- main | ||
pull_request: | ||
|
||
# Brand new concurrency setting! This ensures that not more than one run can be triggered for the same commit. | ||
# It is useful for pull requests coming from the main repository since both triggers will match. | ||
concurrency: lint-${{ github.sha }} | ||
|
@@ -19,18 +20,16 @@ jobs: | |
|
||
env: | ||
# The Python version your project uses. Feel free to change this if required. | ||
PYTHON_VERSION: "3.10" | ||
PYTHON_VERSION: "3.12" | ||
|
||
steps: | ||
# Checks out the repository in the current folder. | ||
- name: Checks out repository | ||
uses: actions/checkout@v3 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Set up the right version of Python | ||
- name: Set up Python ${{ env.PYTHON_VERSION }} | ||
uses: actions/setup-python@v3 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Run pre-commit hooks | ||
uses: pre-commit/[email protected].0 | ||
uses: pre-commit/[email protected].1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,18 @@ | ||
## Pre-commit setup | ||
# Pre-commit configuration. | ||
# See https://github.com/python-discord/code-jam-template/tree/main#pre-commit-run-linting-before-committing | ||
|
||
# Make sure to edit the `additional_dependencies` list if you want to add plugins | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.5.0 | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.5.1 | ||
hooks: | ||
- id: python-check-blanket-noqa | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 4.0.1 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.5.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-docstrings~=1.6.0 | ||
- id: ruff | ||
- id: ruff-format |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[tool.ruff] | ||
# Increase the line length. This breaks PEP8 but it is way easier to work with. | ||
# The original reason for this limit was a standard vim terminal is only 79 characters, | ||
# but this doesn't really apply anymore. | ||
line-length = 119 | ||
# Target Python 3.12. If you decide to use a different version of Python | ||
# you will need to update this value. | ||
target-version = "py312" | ||
# Automatically fix auto-fixable issues. | ||
fix = true | ||
# The directory containing the source code. If you choose a different project layout | ||
# you will need to update this value. | ||
src = ["src"] | ||
|
||
[tool.ruff.lint] | ||
# Enable all linting rules. | ||
select = ["ALL"] | ||
# Ignore some of the most obnoxious linting errors. | ||
ignore = [ | ||
# Missing docstrings. | ||
"D100", | ||
"D104", | ||
"D105", | ||
"D106", | ||
"D107", | ||
# Docstring whitespace. | ||
"D203", | ||
"D213", | ||
# Docstring punctuation. | ||
"D415", | ||
# Docstring quotes. | ||
"D301", | ||
# Builtins. | ||
"A", | ||
# Print statements. | ||
"T20", | ||
# TODOs. | ||
"TD002", | ||
"TD003", | ||
"FIX", | ||
# Annotations. | ||
"ANN101", | ||
"ANN102", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.