Skip to content

Commit

Permalink
feat: dev pr (#77)
Browse files Browse the repository at this point in the history
* chore(deps): `poetry up`
* ci(pre-commit): autoupdate
* ci(pre-commit): replace `mdformat` with `prettier`
* ci(pre-commit): update config
* ci(renovate): replace `dependabot` with `renovate`
* feat(iuc): add hosting `lensdump`
* feat(iuc): add hosting `tixte`
* feat(vscode): update configs
  • Loading branch information
DeadNews authored Apr 30, 2023
1 parent 896e0e0 commit 9b3e7a6
Show file tree
Hide file tree
Showing 11 changed files with 180 additions and 138 deletions.
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ jobs:
if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.PYTHON_VERSION
uses: codecov/codecov-action@v3


publish_pypi:
name: Build and release to PyPI
if: github.event_name == 'release' && github.event.action == 'created'
Expand Down
30 changes: 16 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
ci:
autofix_commit_msg: "chore: auto fixes from `pre-commit` hooks"
autoupdate_commit_msg: "chore(pre-commit): autoupdate"
autoupdate_schedule: quarterly

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand All @@ -14,16 +19,13 @@ repos:
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.22.0
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-renovate

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
hooks:
- id: mdformat
additional_dependencies:
- mdformat-toc
- mdformat-gfm
- id: prettier

- repo: https://github.com/asottile/yesqa
rev: v1.4.0
Expand All @@ -44,7 +46,7 @@ repos:
- pep8-naming

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.3.2
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand Down Expand Up @@ -86,9 +88,9 @@ repos:
additional_dependencies:
- bandit[toml] # python_version < "3.11"

# - repo: https://github.com/python-poetry/poetry
# rev: 1.4.2
# hooks:
# - id: poetry-check
# - id: poetry-lock
# args: [--check]
- repo: https://github.com/python-poetry/poetry
rev: 1.4.2
hooks:
- id: poetry-check
- id: poetry-lock
args: [--check]
1 change: 1 addition & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
printWidth: 80
24 changes: 24 additions & 0 deletions .renovaterc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"automerge": true,
"automergeStrategy": "squash",
"commitMessageAction": "update",
"dependencyDashboard": true,
"extends": ["config:base"],
"labels": ["deps"],
"packageRules": [
{
"addLabels": ["main", "major"],
"automerge": false,
"description": "Disable automerge for major updates in Poetry main dependency group",
"matchDepTypes": ["dependencies"],
"matchManagers": ["poetry"],
"matchUpdateTypes": ["major"]
}
],
"platformAutomerge": true,
"pre-commit": {
"enabled": true
},
"semanticCommits": "enabled"
}
10 changes: 6 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-python.python",
]
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-python.python",
"ms-python.black-formatter",
"ms-python.isort"
]
}
42 changes: 16 additions & 26 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
// Workspace settings override user settings.
{
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
},
// black
"python.formatting.provider": "black",
"python.formatting.blackArgs": [],
// isort
"python.sortImports.args": [],
// mypy
"python.linting.mypyEnabled": true,
"python.linting.mypyArgs": [],
// flake8
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [],
// bandit
"python.linting.banditEnabled": true,
"python.linting.banditArgs": [
"-c",
"pyproject.toml"
],
// pytest
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
// mypy
"python.linting.mypyEnabled": true,
// flake8
"python.linting.flake8Enabled": true,
// bandit
"python.linting.banditEnabled": true,
"python.linting.banditArgs": ["-c", "pyproject.toml"],
// pytest
"python.testing.pytestEnabled": true
}
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ yay -S python-images-upload-cli
| [imgbb](https://imgbb.com/) | + | `https://i.ibb.co/{id}/image.png` |
| [imgchest](https://imgchest.com/) | + | `https://cdn.imgchest.com/files/{id}.png` |
| [imgur](https://imgur.com/) | - | `https://i.imgur.com/{id}.png` |
| [lensdump](https://lensdump.com/) | + | `https://i.lensdump.com/i/{id}.png` |
| [pictshare](https://pictshare.net/) | - | `https://pictshare.net/{id}.png` |
| [pixeldrain](https://pixeldrain.com/) | - | `https://pixeldrain.com/api/file/{id}` |
| [pixhost](https://pixhost.to/) | - | `https://img75.pixhost.to/images/69/{id}_img.png` |
Expand All @@ -47,6 +48,7 @@ yay -S python-images-upload-cli
| [sxcu](https://sxcu.net/) | - | `https://sxcu.net/{id}.png` |
| [telegraph](https://telegra.ph/) | - | `https://telegra.ph/file/{id}.png` |
| [thumbsnap](https://thumbsnap.com/) | + | `https://thumbsnap.com/i/{id}.png` |
| [tixte](https://tixte.com/) | + | `https://{domain}.tixte.co/r/{id}.png` |
| [up2sha](https://up2sha.re/) | + | `https://up2sha.re/media/raw/{id}.png` |
| [uplio](https://upl.io/) | + | `https://upl.io/i/{id}.png` |
| [uploadcare](https://uploadcare.com/) | + | `https://ucarecdn.com/{id}/img.png` |
Expand All @@ -60,7 +62,7 @@ Usage: images-upload-cli [OPTIONS] IMAGES...
Upload images via APIs.

Options:
-h, --hosting [beeimg|catbox|fastpic|filecoffee|freeimage|gyazo|imageban|imagebin|imgbb|imgchest|imgur|pictshare|pixeldrain|pixhost|ptpimg|smms|sxcu|telegraph|thumbsnap|up2sha|uplio|uploadcare|vgy]
-h, --hosting [beeimg|catbox|fastpic|filecoffee|freeimage|gyazo|imageban|imagebin|imgbb|imgchest|imgur|lensdump|pictshare|pixeldrain|pixhost|ptpimg|smms|sxcu|telegraph|thumbsnap|tixte|up2sha|uplio|uploadcare|vgy]
[default: imgur]
-b, --bbcode Add bbcode tags.
-t, --thumbnail Add caption thumbnail and bbcode tags.
Expand All @@ -81,9 +83,11 @@ IMAGEBAN_TOKEN=
IMGBB_KEY=
IMGCHEST_KEY=
IMGUR_CLIENT_ID=
LENSDUMP_KEY=
PTPIMG_KEY=
SMMS_KEY=
THUMBSNAP_KEY=
TIXTE_KEY=
UP2SHA_KEY=
UPLIO_KEY=
UPLOADCARE_KEY=
Expand Down
Loading

0 comments on commit 9b3e7a6

Please sign in to comment.