Skip to content

Commit

Permalink
Added pre-commit, reformatted all code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knucklessg1 committed May 9, 2024
1 parent 4a8b922 commit 94f489a
Show file tree
Hide file tree
Showing 27 changed files with 1,210 additions and 506 deletions.
69 changes: 69 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
default_language_version:
python: python3
exclude: 'dotnet'
ci:
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
autoupdate_schedule: 'monthly'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-byte-order-marker
exclude: .gitignore
- id: check-merge-conflict
- id: detect-private-key
- id: trailing-whitespace
- id: end-of-file-fixer
- id: no-commit-to-branch
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: ruff
types_or: [ python, pyi, jupyter ]
args: ["--fix", "--ignore=E402"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: ["-L", "ans,linar,nam,tread,ot,"]
exclude: |
(?x)^(
pyproject.toml |
website/static/img/ag.svg |
website/yarn.lock |
website/docs/tutorial/code-executors.ipynb |
website/docs/topics/code-execution/custom-executor.ipynb |
website/docs/topics/non-openai-models/cloud-gemini.ipynb |
notebook/.*
)$
# See https://jaredkhan.com/blog/mypy-pre-commit
- repo: local
hooks:
- id: mypy
name: mypy
entry: "./scripts/pre-commit-mypy-run.sh"
language: python
# use your preferred Python version
# language_version: python3.8
additional_dependencies: []
types: [python]
# use require_serial so that script
# is only called once per commit
require_serial: true
# Print the number of files as a sanity-check
verbose: true
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
hooks:
- id: nbqa-black
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Click the arrows on the left of each of the items below to see more information
<details >
<summary style="text-align:left; font-size:111%; color:black;"><b> Geniusbot Chat </b></summary>
<br>
Chat with your friendly and extremely intelligent Geniusbot.
Chat with your friendly and extremely intelligent Geniusbot.

Powered by Artificial Intelligence scaled to your PC's performance!

Expand All @@ -45,7 +45,7 @@ Powered by Artificial Intelligence scaled to your PC's performance!
<details >
<summary style="text-align:left; font-size:111%; color:black;"><b> Media Downloader </b></summary>
<br>
Download videos from various websites!
Download videos from various websites!

Supports:

Expand Down Expand Up @@ -78,7 +78,7 @@ https://www.youtube.com/watch?v=7qRSAUb96wg
<summary style="text-align:left; font-size:111%; color:black;"><b> Media Manager </b></summary>
<br>
Manage your media library by:
- Cleaning up names of files and folders based off pre-built filters.
- Cleaning up names of files and folders based off pre-built filters.
- Apply subtitles located in "Sub" folder within each media directory
- Move files to final destination after processing

Expand Down
2 changes: 1 addition & 1 deletion build-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ subshift
rom-manager
report-manager
repository-manager
audio-transcriber
audio-transcriber
21 changes: 12 additions & 9 deletions geniusbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
# coding: utf-8
from geniusbot.version import __version__, __author__, __credits__
from geniusbot.geniusbot import geniusbot, GeniusBot
from geniusbot.plugins import \
geniusbot_chat_plugin, \
media_downloader_plugin, \
media_manager_plugin, \
report_manager_plugin, \
repository_manager_plugin, \
subshift_plugin, \
systems_manager_plugin, \
webarchiver_plugin
from geniusbot.plugins import (
geniusbot_chat_plugin,
media_downloader_plugin,
media_manager_plugin,
report_manager_plugin,
repository_manager_plugin,
subshift_plugin,
systems_manager_plugin,
webarchiver_plugin,
)
from geniusbot.qt.scrollable_widget import ScrollLabel
from geniusbot.qt import colors
from geniusbot.qt.colors import yellow, green, orange, blue, red, purple
Expand All @@ -32,3 +33,5 @@
blue = blue
red = red
purple = purple

__all__ = ["geniusbot", "GeniusBot"]
2 changes: 1 addition & 1 deletion geniusbot/documentation/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# All plugin documentation will be downloaded here
# All plugin documentation will be downloaded here
Loading

0 comments on commit 94f489a

Please sign in to comment.