diff options
| -rw-r--r-- | python/.flake8 | 7 | ||||
| -rw-r--r-- | python/Makefile | 3 | ||||
| -rw-r--r-- | python/pyproject.toml | 6 | 
3 files changed, 6 insertions, 10 deletions
diff --git a/python/.flake8 b/python/.flake8 index 4dd17b7..9c9aabe 100644 --- a/python/.flake8 +++ b/python/.flake8 @@ -4,14 +4,15 @@ select = C,E,F,W,ANN  # ANN101 is annotation on 'self' (why would that be wanted?)  # ANN204 is annotation on '__init__()'  # E265,E266 are restrictions on comments ('#') -# E501 is line-too-long, which we enforce with yapf +# E501 is line-too-long, which we enforce with black +# W503,E203 are allowed by black  # TODO: C901 is complexity, should be re-enabled at some point -# TODO: E251,W504,E126,E125,W503 are unfortunate yapf behaviors; could try to work around them? -ignore = ANN003,ANN101,ANN204,E265,E266,E501,C901,E251,W504,E126,E125,W503 +ignore = ANN003,ANN101,ANN204,E265,E266,E501,C901,W503,E203  per-file-ignores =      sandcrawler/__init__.py: F401      sandcrawler/ia.py: E402      tests/*.py: ANN201,ANN001,F403,F405 +    # TODO: add more annotations to CLI scripts      *_tool.py,sandcrawler_worker.py: ANN201,ANN001,ANN202,ANN206,ANN205,F403,F405      scripts:  ANN201,ANN001,ANN202,ANN206,ANN205  exclude = .git,__pycache__,.venv,scripts/ diff --git a/python/Makefile b/python/Makefile index 4cef708..940a7eb 100644 --- a/python/Makefile +++ b/python/Makefile @@ -17,12 +17,11 @@ lint: ## Run lints (eg, flake8, mypy)  	pipenv run flake8 . --exit-zero  	pipenv run isort -q -c . || true  	pipenv run mypy *.py sandcrawler/ tests/ --ignore-missing-imports -	pipenv run pylint --rcfile=.pylintrc -E --jobs=4 sandcrawler tests/*.py *.py  .PHONY: fmt  fmt: ## Run code formating on all source code  	pipenv run isort --atomic . -	pipenv run yapf -p -i -r sandcrawler tests scripts *.py +	pipenv run black --line-length 96 sandcrawler/ tests/ scripts/ *.py  .PHONY: test  test: ## Run all tests and lints diff --git a/python/pyproject.toml b/python/pyproject.toml index e85b234..2cef007 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -2,10 +2,6 @@  requires = ["setuptools", "wheel"]  build-backend = "setuptools.build_meta:__legacy__" -[tool.yapf] -COLUMN_LIMIT = 96 -INDENT_DICTIONARY_VALUE=true -ALLOW_SPLIT_BEFORE_DICT_VALUE=false -  [tool.isort] +profile = "black"  line_length = 96  | 
