.*_pb2.py|
.*_pb2_grpc.py
)$
additional_dependencies: [flake8-tidy-imports]
# "Local" hooks, see https://pre-commit.com/#repository-local-hooks
- repo: local
hooks:
import tensorflow as tf
# This should be the only place that we import tensorflow directly.
# Everywhere else is caught by the banned-modules setting for flake8
import tensorflow as tf # noqa I201
from distutils.version import LooseVersion
# Black tends to introduce things flake8 doesn't like, such as "line break before binary operator"
# or whitespace before ':'. Rather than fight with black, just ignore these for now.
W503, E203,
# flake-tidy-import adds this warning, which we don't really care about for now
I200
banned-modules = tensorflow = use mlagents.tf instead (it handles tf2 compat).