Skip to content

Commit

Permalink
Merge pull request #306 from qequ/feature-type-hint
Browse files Browse the repository at this point in the history
feat: Add type hints and mypy support
  • Loading branch information
skorokithakis authored Jan 6, 2024
2 parents 3acd081 + 1fb7503 commit c25f41e
Show file tree
Hide file tree
Showing 6 changed files with 272 additions and 170 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/black-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Python Linting

on:
push:
branches:
- master
paths:
- 'schema.py'
pull_request:
branches:
- master
paths:
- 'schema.py'

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install Black
run: pip install black

- name: Run Black on schema.py
run: black --check schema.py
28 changes: 28 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Python Test on Pull Requests

on:
pull_request:
branches:
- master

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run tests
run: pytest
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Schema validation just got Pythonic
Schema validation just got Pythonic
===============================================================================

**schema** is a library for validating Python data structures, such as those
Expand Down
Empty file added py.typed
Empty file.
Loading

0 comments on commit c25f41e

Please sign in to comment.