Initialize repo

This commit is contained in:
Zeva Rose 2022-02-05 17:07:54 -07:00
commit fbcafae466
9 changed files with 1156 additions and 0 deletions

14
.flake8 Normal file
View file

@ -0,0 +1,14 @@
[flake8]
extend-ignore =
Q0, E501, C812, E203, W503, # These default to arguing with Black. We might configure some of them eventually
ANN1, # Ignore self and cls annotations
ANN204, ANN206, # return annotations for special methods and class methods
D105, D107, # Missing Docstrings in magic method and __init__
S311, # Standard pseudo-random generators are not suitable for security/cryptographic purposes.
D401, # First line should be in imperative mood; try rephrasing
D400, # First line should end with a period
D101, # Missing docstring in public class
# Plugins we don't currently include: flake8-return
R503, # missing explicit return at the end of function ableto return non-None value.
max-line-length=100

49
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,49 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-toml
- id: check-yaml
args: [--unsafe]
- id: check-merge-conflict
- id: requirements-txt-fixer
- id: end-of-file-fixer
- id: debug-statements
language_version: python3.10
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-check-blanket-noqa
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
args: [--line-length=100, --target-version=py310]
language_version: python3.10
- repo: https://github.com/pre-commit/mirrors-isort
rev: V5.10.1
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies:
- flake8-annotations~=2.0
- flake8-bandit~=2.1
- flake8-docstrings~=1.5
- flake8-bugbear
- flake8-comprehensions
- flake8-quotes
- flake8-raise
- flake8-deprecated
- flake8-print
- flake8-return
language_version: python3.10

0
README.rst Normal file
View file

1
jarvis_core/__init__.py Normal file
View file

@ -0,0 +1 @@
__version__ = '0.1.0'

10
jarvis_core/filters.py Normal file
View file

@ -0,0 +1,10 @@
"""Regex filters for various content types."""
import re
invites = re.compile(
r"(?:https?://)?(?:www.)?(?:discord.(?:gg|io|me|li)|discord(?:app)?.com/invite)/([^\s/]+?)(?=\b)", flags=re.IGNORECASE)
custom_emote = re.compile(r"<:\w+:(\d+)>$", flags=re.IGNORECASE)
valid_text = re.compile(r"[\w\s\-\\/.!@#$%^*()+=<>,\u0080-\U000E0FFF]*", flags=re.IGNORECASE)

1059
poetry.lock generated Normal file

File diff suppressed because it is too large Load diff

18
pyproject.toml Normal file
View file

@ -0,0 +1,18 @@
[tool.poetry]
name = "jarvis-core"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = "^3.10"
dis-snek = "^5.0.0"
orjson = "^3.6.6"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
python-lsp-server = {extras = ["all"], version = "^1.3.3"}
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0
tests/__init__.py Normal file
View file

View file

@ -0,0 +1,5 @@
from jarvis_core import __version__
def test_version():
assert __version__ == '0.1.0'