Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Added mypy and pydantic
Browse files Browse the repository at this point in the history
  • Loading branch information
Defelo committed Mar 8, 2022
1 parent afa09a2 commit 986c3de
Show file tree
Hide file tree
Showing 92 changed files with 1,990 additions and 1,759 deletions.
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[flake8]
max-line-length = 120
ignore = D,E800,F401,F403,F405,I,N818,Q000,RST210,RST213,RST304,WPS,W503
ignore = C812,C813,C815,C816,D,E800,F401,F403,F405,I,N818,Q000,RST210,RST213,RST304,WPS,W503
classmethod-decorators=classmethod,validator
28 changes: 26 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,30 @@ jobs:
- name: Check code formatting with black
run: black -l 120 . --diff --check

mypy:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: recursive

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install mypy
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install mypy types-python-dateutil types-requests
- name: Check typing with mypy
run: mypy PyCrypCli

linter:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -219,7 +243,7 @@ jobs:

pypi:
runs-on: ubuntu-latest
needs: [ codestyle, linter, build, docker_build ]
needs: [ codestyle, mypy, linter, build, docker_build ]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
environment: pypi

Expand All @@ -240,7 +264,7 @@ jobs:

docker_push_ghcr:
if: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }}
needs: [ codestyle, linter, build, docker_build ]
needs: [ codestyle, mypy, linter, build, docker_build ]
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ COPY requirements.txt /app/

RUN pip install -r requirements.txt

COPY pycrypcli.py /app/
COPY PyCrypCli /app/PyCrypCli

CMD ["python", "pycrypcli.py"]
CMD ["python", "-m", "PyCrypCli"]
3 changes: 1 addition & 2 deletions pycrypcli.py → PyCrypCli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

from PyCrypCli.pycrypcli import main

if __name__ == "__main__":
main()
main()
Loading

0 comments on commit 986c3de

Please sign in to comment.