-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Appeased the formatter
- Loading branch information
Showing
21 changed files
with
1,531 additions
and
546 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,33 +1,33 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "devcontainers" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
- package-ecosystem: "devcontainers" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
groups: | ||
ci-dependencies: | ||
patterns: | ||
- "*" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
groups: | ||
ci-dependencies: | ||
patterns: | ||
- "*" | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
groups: | ||
python-dependencies: | ||
patterns: | ||
- "*" | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
groups: | ||
python-dependencies: | ||
patterns: | ||
- "*" | ||
|
||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
groups: | ||
docker-dependencies: | ||
patterns: | ||
- "*" | ||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
groups: | ||
docker-dependencies: | ||
patterns: | ||
- "*" |
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
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 |
---|---|---|
|
@@ -130,3 +130,5 @@ dmypy.json | |
|
||
# JetBrains IDEs | ||
/.idea | ||
|
||
.pdm-python |
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,19 +1,48 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: check-json | ||
- id: trailing-whitespace | ||
args: [ --markdown-linebreak-ext=md ] | ||
- id: mixed-line-ending | ||
args: [ --fix=lf ] | ||
- id: end-of-file-fixer | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: "v0.2.0" | ||
hooks: | ||
- id: ruff | ||
- id: ruff-format | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: check-json | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: end-of-file-fixer | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: python-check-blanket-noqa | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.3.3 | ||
hooks: | ||
- id: ruff | ||
args: [--fix] | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-ast | ||
- id: trailing-whitespace | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
|
||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v3.1.0 | ||
hooks: | ||
- id: add-trailing-comma | ||
|
||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.12.0 | ||
hooks: | ||
- id: pretty-format-yaml | ||
args: | ||
- --autofix | ||
- --preserve-quotes | ||
- --indent=2 |
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,3 @@ | ||
{ | ||
"recommendations": ["ms-python.python", "charliermarsh.ruff"] | ||
} |
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,13 @@ | ||
{ | ||
"python.testing.pytestArgs": ["."], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"python.languageServer": "Pylance", | ||
"[python]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.ruff": "explicit", | ||
"source.organizeImports.ruff": "explicit" | ||
}, | ||
"editor.defaultFormatter": "charliermarsh.ruff" | ||
} | ||
} |
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,17 +1,19 @@ | ||
FROM python:3.11-slim@sha256:edaf703dce209d774af3ff768fc92b1e3b60261e7602126276f9ceb0e3a96874 | ||
FROM --platform=amd64 python:3.11-slim as builder | ||
|
||
# Define Git SHA build argument for Sentry | ||
ARG git_sha="development" | ||
ENV GIT_SHA=$git_sha | ||
RUN pip install -U pip setuptools wheel | ||
RUN pip install pdm | ||
|
||
COPY requirements/requirements.txt . | ||
RUN python -m pip install --requirement requirements.txt | ||
COPY pyproject.toml pdm.lock /project/ | ||
COPY bot/ /project/bot | ||
|
||
COPY pyproject.toml pyproject.toml | ||
COPY src/ src/ | ||
RUN python -m pip install . | ||
WORKDIR /project | ||
RUN mkdir __pypackages__ && pdm sync --prod --no-editable | ||
|
||
RUN adduser --disabled-password bot | ||
USER bot | ||
FROM python:3.11-slim | ||
|
||
CMD [ "python", "-m", "bot" ] | ||
ENV PYTHONPATH=/project/pkgs | ||
COPY --from=builder /project/__pypackages__/3.11/lib /project/pkgs | ||
COPY --from=builder /project/__pypackages__/3.11/bin/* /bin/ | ||
|
||
ENTRYPOINT ["python3", "-m"] | ||
CMD ["bot"] |
Oops, something went wrong.