From 00aa9ef6fc679d29870fdc406e937e0180754d31 Mon Sep 17 00:00:00 2001 From: Cole Haus Date: Thu, 18 Aug 2022 10:30:51 -0700 Subject: [PATCH] Configure tools to work with .venv --- .gitignore | 1 + scripts/update_headers.py | 2 +- setup.cfg | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4259586b1..11292796f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ numpyro.egg-info __pycache__/ .ipynb_checkpoints/ build +.venv/ # built / compiled *.pyc diff --git a/scripts/update_headers.py b/scripts/update_headers.py index 45438019a..31e634da4 100644 --- a/scripts/update_headers.py +++ b/scripts/update_headers.py @@ -7,7 +7,7 @@ import sys root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -blacklist = ["/build/", "/dist/", "/pyro_api.egg"] +blacklist = ["/build/", "/dist/", "/pyro_api.egg", "/.venv/"] file_types = [("*.py", "# {}"), ("*.cpp", "// {}")] parser = argparse.ArgumentParser() diff --git a/setup.cfg b/setup.cfg index 1864aa10f..b9f460d17 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [flake8] max-line-length = 120 -exclude = docs/src, build, dist, .ipynb_checkpoints +exclude = docs/src, build, dist, .ipynb_checkpoints, .venv ignore = W503,E203 per-file-ignores = numpyro/contrib/tfp/distributions.py:F811 @@ -17,6 +17,7 @@ force_sort_within_sections = true combine_as_imports = true multi_line_output = 3 skip=docs +extend_skip = .venv [tool:pytest] filterwarnings = error