Skip to content

Commit e19ea45

Browse files
authored
PR: Implement support for pyright and typing annotations. (#116)
* Implement initial support for "pyright". Signed-off-by: Thomas Mansencal <[email protected]> * Fix initial static typing issues. Define a good baseline without errors or warnings. Signed-off-by: Thomas Mansencal <[email protected]> * Add typing annotations to `opencolorio_config_aces.clf.discover` sub-package. Signed-off-by: Thomas Mansencal <[email protected]> --------- Signed-off-by: Thomas Mansencal <[email protected]>
1 parent 8f1a27b commit e19ea45

File tree

12 files changed

+315
-246
lines changed

12 files changed

+315
-246
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Continuous Integration - Static Type Checking
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
continuous-integration-static-type-checking:
7+
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
8+
strategy:
9+
matrix:
10+
os: [macOS-latest]
11+
python-version: [3.11]
12+
fail-fast: false
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Environment Variables
17+
run: |
18+
echo "CI_PACKAGE=opencolorio_config_aces" >> $GITHUB_ENV
19+
shell: bash
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v1
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install Dependencies (macOS)
25+
if: matrix.os == 'macOS-latest'
26+
run: |
27+
brew install graphviz
28+
export GRAPHVIZ_DIR="/usr/local/Cellar/graphviz/<VERSION>"
29+
pip install pygraphviz --global-option=build_ext --global-option="-I$GRAPHVIZ_DIR/include" --global-option="-L$GRAPHVIZ_DIR/lib"
30+
- name: Install Package Dependencies
31+
run: |
32+
pip install -r requirements.txt
33+
- name: Static Type Checking
34+
run: |
35+
pyright --skipunannotated

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ Development Dependencies
146146
- `invoke <https://pypi.org/project/invoke>`__
147147
- `pre-commit <https://pypi.org/project/pre-commit>`__
148148
- `pydata-sphinx-theme <https://pypi.org/project/pydata-sphinx-theme>`__
149+
- `pyright <https://pypi.org/project/pyright>`__
149150
- `pytest <https://pypi.org/project/pytest>`__
150151
- `pytest-cov <https://pypi.org/project/pytest-cov>`__
151152
- `restructuredtext-lint <https://pypi.org/project/restructuredtext-lint>`__

docs/installation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Development Dependencies
9494
- `invoke <https://pypi.org/project/invoke>`__
9595
- `pre-commit <https://pypi.org/project/pre-commit>`__
9696
- `pydata-sphinx-theme <https://pypi.org/project/pydata-sphinx-theme>`__
97+
- `pyright <https://pypi.org/project/pyright>`__
9798
- `pytest <https://pypi.org/project/pytest>`__
9899
- `pytest-cov <https://pypi.org/project/pytest-cov>`__
99100
- `restructuredtext-lint <https://pypi.org/project/restructuredtext-lint>`__

opencolorio_config_aces/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
"print_aces_taxonomy",
109109
"unclassify_ctl_transforms",
110110
"version_aces_dev",
111-
"version_config_mapping_file",
112111
]
113112
__all__ += [
114113
"DescriptionStyle",

0 commit comments

Comments
 (0)