Skip to content

Commit

Permalink
Use mypy in lint
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Apr 27, 2024
1 parent ba7a2c9 commit 950cb7d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ fate-suite:
rsync -vrltLW rsync://fate-suite.ffmpeg.org/fate-suite/ tests/assets/fate-suite/

lint:
black --check av examples tests
black --check av examples tests setup.py
flake8 av examples tests
isort --check-only --diff av examples tests
mypy av tests

test:
$(PYTHON) setup.py test
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_config_from_pkg_config():
"""
Get distutils-compatible extension arguments using pkg-config.
"""
pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config')
pkg_config = os.environ.get("PKG_CONFIG", "pkg-config")
try:
raw_cflags = subprocess.check_output(
[pkg_config, "--cflags", "--libs"]
Expand Down Expand Up @@ -180,7 +180,9 @@ def parse_cflags(raw_flags):
exec(fp.read(), about)

package_folders = pathlib.Path("av").glob("**/")
package_data = {".".join(pckg.parts): ["*.pxd", "*.pyi", "*.typed"] for pckg in package_folders}
package_data = {
".".join(pckg.parts): ["*.pxd", "*.pyi", "*.typed"] for pckg in package_folders
}


with open("README.md") as f:
Expand Down
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ isort
flake8
flake8-pyproject
sphinx==5.1.0
mypy==1.10.0

0 comments on commit 950cb7d

Please sign in to comment.