-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add pre-commit and mypy to the project (#28)
* chore: add pre-commit and mypy to the project * fix: refactor base64type to new file to break circular import * chore: add unittests to pre-commit
- Loading branch information
1 parent
d2ec936
commit 556c28a
Showing
22 changed files
with
453 additions
and
130 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
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,31 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: ruff-fmt | ||
name: ruff-fmt | ||
entry: poetry run ruff format --config=pyproject.toml . | ||
types_or: [python, pyi] | ||
language: system | ||
pass_filenames: false | ||
|
||
- id: ruff-check | ||
name: ruff-check | ||
entry: poetry run ruff check --config=pyproject.toml --fix . | ||
types_or: [python, pyi] | ||
language: system | ||
pass_filenames: false | ||
|
||
- id: mypy | ||
name: mypy | ||
entry: poetry run mypy . --config-file=pyproject.toml | ||
types_or: [python, pyi] | ||
language: system | ||
pass_filenames: false | ||
|
||
- id: unittest | ||
name: unittest | ||
entry: poetry run pytest --cov=encord_agents --junitxml encord-agents-unit-test-report.xml -s tests | ||
types_or: [python, pyi] | ||
language: system | ||
pass_filenames: false | ||
default_stages: [pre-push] |
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,4 +1,4 @@ | ||
from .core.data_model import FrameData | ||
|
||
__version__ = "v0.1.2" | ||
__ALL__ = ["FrameData"] | ||
__all__ = ["FrameData"] |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .models import Depends | ||
|
||
__ALL__ = ["Depends"] | ||
__all__ = ["Depends"] |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from typing import Literal | ||
|
||
Base64Formats = Literal[".jpeg", ".jpg", ".png"] | ||
|
||
|
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
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
from .wrappers import editor_agent | ||
|
||
__ALL__ = ["editor_agent", "Depends"] | ||
__all__ = ["editor_agent", "Depends"] |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
from .runner import Runner | ||
|
||
__ALL__ = ["Runner", "Depends"] | ||
__all__ = ["Runner", "Depends"] |
Oops, something went wrong.