-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-generic-oauth
- Loading branch information
Showing
91 changed files
with
715 additions
and
490 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
max-line-length = 99 | ||
select = E9,F7,F82 | ||
extend-exclude=.venv/,.stubs/ |
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
{ | ||
"__comment": "Credits to: https://github.com/home-assistant/core/blob/d32c364d7f9e138e0dd9363b34b3cb39f4afcd06/.github/workflows/matchers/check-json.json", | ||
"problemMatcher": [ | ||
{ | ||
"owner": "check-json", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+):\\s(Failed to json decode\\s.+\\sline\\s(\\d+)\\scolumn\\s(\\d+).+)$", | ||
"file": 1, | ||
"message": 2, | ||
"line": 3, | ||
"column": 4 | ||
} | ||
] | ||
} | ||
] | ||
} |
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,16 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "check-toml", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+\\.toml):\\s(.+line\\s(\\d+)\\scolumn\\s(\\d+).+)$", | ||
"file": 1, | ||
"message": 2, | ||
"line": 3, | ||
"column": 4 | ||
} | ||
] | ||
} | ||
] | ||
} |
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,19 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "check-yaml", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+)$", | ||
"message": 1 | ||
}, | ||
{ | ||
"regexp": "^ in \"(.+\\.ya?ml)\", line (\\d+), column (\\d+)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3 | ||
} | ||
] | ||
} | ||
] | ||
} |
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,32 @@ | ||
{ | ||
"__comment": "Credits to: https://github.com/home-assistant/core/blob/d32c364d7f9e138e0dd9363b34b3cb39f4afcd06/.github/workflows/matchers/flake8.json", | ||
"problemMatcher": [ | ||
{ | ||
"owner": "flake8-error", | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+):(\\d+):(\\d+):\\s(([EF]\\d{3})\\s.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4, | ||
"code": 5 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "flake8-warning", | ||
"severity": "warning", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+):(\\d+):(\\d+):\\s(([CDNW]\\d{3})\\s.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4 | ||
} | ||
] | ||
} | ||
] | ||
} |
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,41 @@ | ||
name: Run pre-commit | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
run_precommit: | ||
name: Run pre-commit | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout repository | ||
- uses: actions/checkout@v3 | ||
|
||
# Setup Python and install pre-commit | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- name: Install pre-commit | ||
run: | | ||
pip install -U pre-commit | ||
# Load cached pre-commit environment | ||
- name: set PY | ||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
||
# Register problem matchers | ||
- name: Register problem matchers | ||
run: | | ||
echo "::add-matcher::.github/workflows/matchers/check-json.json" | ||
echo "::add-matcher::.github/workflows/matchers/check-toml.json" | ||
echo "::add-matcher::.github/workflows/matchers/check-yaml.json" | ||
echo "::add-matcher::.github/workflows/matchers/flake8.json" | ||
# Run pre-commit | ||
- name: Run pre-commit | ||
run: | | ||
pre-commit run --show-diff-on-failure --color=never --all-files --verbose |
This file was deleted.
Oops, something went wrong.
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,55 @@ | ||
default_language_version: | ||
python: python3.8 | ||
exclude: ^.stubs/ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 'refs/tags/23.7.0:refs/tags/23.7.0' | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/Pierre-Sassoulas/black-disable-checker | ||
rev: 'v1.1.3' | ||
hooks: | ||
- id: black-disable-checker | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: '6.1.0' | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
# `.gitattributes` should technically already handle this | ||
# but autocrlf can result in local files keeping the CRLF | ||
# which is problematic for codespell | ||
- id: end-of-file-fixer | ||
# normally you would want this but Neuro is not very consistent :P | ||
# - id: mixed-line-ending | ||
# args: | ||
# - "--fix=lf" | ||
|
||
# Trailing whitespace is evil | ||
- id: trailing-whitespace | ||
|
||
# Require literal syntax when initializing builtin types | ||
- id: check-builtin-literals | ||
|
||
# Ensure that links to code on GitHub use the permalinks | ||
- id: check-vcs-permalinks | ||
|
||
# Syntax validation | ||
- id: check-ast | ||
- id: check-json | ||
- id: check-toml | ||
# can be switched to yamllint when this issue gets resolved: | ||
# https://github.com/adrienverge/yamllint/issues/238 | ||
- id: check-yaml | ||
|
||
# JSON auto-formatter | ||
- id: pretty-format-json | ||
args: | ||
- "--autofix" | ||
- "--indent=4" | ||
- "--no-sort-keys" | ||
|
||
# Checks for git-related issues | ||
- id: check-case-conflict | ||
- id: check-merge-conflict |
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from .authgg import AuthGG | ||
|
||
|
||
def setup(bot): | ||
bot.add_cog(AuthGG(bot)) | ||
async def setup(bot): | ||
await bot.add_cog(AuthGG(bot)) |
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 |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
], | ||
"requirements": [], | ||
"hidden": false | ||
} | ||
} |
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 |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
) | ||
|
||
|
||
def setup(bot): | ||
bot.add_cog(Color(bot)) | ||
async def setup(bot): | ||
await bot.add_cog(Color(bot)) |
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.