Skip to content

Commit

Permalink
version 0.8 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillp authored Jan 19, 2024
1 parent 5858812 commit 46da201
Show file tree
Hide file tree
Showing 25 changed files with 1,780 additions and 1,650 deletions.
78 changes: 15 additions & 63 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,18 @@
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: debug-statements
- id: mixed-line-ending
- id: name-tests-test
args: [--pytest-test-first]
- id: trailing-whitespace
- id: end-of-file-fixer
args: [--markdown-linebreak-ext=md]
- id: check-merge-conflict
- id: check-yaml
args: [--unsafe]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-no-eval
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.3.1
- id: no-commit-to-branch
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-safety-dependencies-check
files: pyproject.toml
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
hooks:
- id: mdformat
args:
- --number
additional_dependencies:
- mdformat-black
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/myint/docformatter
rev: v1.7.5
hooks:
Expand All @@ -47,40 +21,18 @@ repos:
- --in-place
- --wrap-summaries=100
- --wrap-descriptions=100
- repo: https://github.com/hadialqattan/pycln
rev: v2.1.5
hooks:
- id: pycln
args: [--config=pyproject.toml]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-typing-imports==1.14.0
- repo: https://github.com/asottile/blacken-docs
rev: 1.15.0
rev: 1.16.0
hooks:
- id: blacken-docs
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.13
hooks:
- id: pydocstyle
args:
- --add-ignore=D107
additional_dependencies:
- toml
exclude: 'tests/'
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.8.0
hooks:
- id: mypy
args:
Expand All @@ -90,4 +42,4 @@ repos:
- --show-error-context
- --show-column-numbers
additional_dependencies:
- pytest-mypy
- pytest-mypy==0.10.3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ from binapy import BinaPy
bp = BinaPy("Hello, World!").to("deflate").to("b64u")
print(bp)
# b'80jNycnXUQjPL8pJUQQA'
bp.decode_from("b64u").decode_from("deflate").decode()
bp.decode_from("b64u").decode_from("deflate").ascii()
# "Hello, World!"
isinstance(bp, bytes)
# True
Expand Down
11 changes: 5 additions & 6 deletions binapy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
"""Top-level package for BinaPy."""


from .binapy import (
BinaPy,
InvalidExtensionMethod,
InvalidExtensionMethodError,
binapy_checker,
binapy_decoder,
binapy_encoder,
binapy_parser,
binapy_serializer,
)
from .compression import *
from .encoding import *
from .hashing import *
from .parsing import *

__all__ = [
"BinaPy",
Expand All @@ -21,5 +18,7 @@
"binapy_encoder",
"binapy_parser",
"binapy_serializer",
"InvalidExtensionMethod",
"InvalidExtensionMethodError",
]

from . import compression, encoding, hashing, parsing # noqa: F401
Loading

0 comments on commit 46da201

Please sign in to comment.