From 7757ebc0bc5b46cb3cfa41e5bebd4754978fd3b0 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 23 Oct 2017 14:57:46 +0200 Subject: flake8: no wildcards in core; only `import *` from spack in packages There are now separate flake8 configs for core vs. packages: - core has a smaller set of flake8 exceptions - packages allow `from spack import *` and module globals - Allows core to take advantage of static checking for undefined names - Allows packages to keep using Spack tricks like `from spack import *` and dependencies setting globals for dependents. --- .flake8 | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to '.flake8') diff --git a/.flake8 b/.flake8 index e697d5ea04..49199b35c8 100644 --- a/.flake8 +++ b/.flake8 @@ -1,8 +1,8 @@ # -*- conf -*- -# flake8 settings for Spack. +# flake8 settings for Spack core files. # -# Below we describe which flake8 checks Spack ignores and what the -# rationale is. +# These exceptions ar for Spack core files. We're slightly more lenient +# with packages. See .flake8_packages for that. # # Let people line things up nicely: # - E129: visually indented line with same indent as next logical line @@ -13,14 +13,9 @@ # Let people use terse Python features: # - E731: lambda expressions # -# Spack allows wildcard imports: -# - F403: disable wildcard import -# # These are required to get the package.py files to test clean: -# - F405: `name` may be undefined, or undefined from star imports: `module` -# - F821: undefined name `name` (needed for cmake, configure, etc.) # - F999: syntax error in doctest # [flake8] -ignore = E129,E221,E241,E272,E731,F403,F405,F821,F999 +ignore = E129,E221,E241,E272,E731,F999 max-line-length = 79 -- cgit v1.2.3-60-g2f50