From 510222b44d74d9ab11e9b8073965adb46606e85f Mon Sep 17 00:00:00 2001 From: Hugo Rodger-Brown Date: Tue, 28 Jan 2020 14:23:21 +0000 Subject: [PATCH] Update linting config files and project classifiers --- .flake8 | 4 ---- .gitignore | 8 ++++---- .pylintrc | 29 ++++++++++------------------- LICENSE | 2 +- README.rst | 2 +- mypy.ini | 11 ----------- pyproject.toml | 8 ++++---- tox.ini | 8 +++----- 8 files changed, 23 insertions(+), 49 deletions(-) diff --git a/.flake8 b/.flake8 index 690f011..da455e7 100644 --- a/.flake8 +++ b/.flake8 @@ -17,7 +17,3 @@ ignore = S308 # [bandit] Use of mark_safe S311 # [bandit] Use of random S703 # [bandit] Use of django_mark_safe - -[bandit] -exclude_dirs = - **/tests/* diff --git a/.gitignore b/.gitignore index 9740714..e118187 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -*.pyc -*.egg-info .coverage .tox -poetry.lock -Pipfile.lock +.venv +*.egg-info +*.lock +*.pyc diff --git a/.pylintrc b/.pylintrc index c8d9a46..933f772 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,26 +1,17 @@ -# This pylintrc exists for the purpose of enforcing a certain style guide across our Python code. - [MASTER] init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc()));" -ignore=CVS,.git,.tox,.cache,.venv,frontend +ignore = .git,.tox,.cache,.venv [MESSAGES CONTROL] -disable=all -enable= - anomalous-backslash-in-string - assert-false - assert-outside-tests - bare-except - broad-except - dangerous-default-value - direct-logging - import-pdb - import-silk +disable = all +enable = + broad-except, + dangerous-default-value, + relative-beyond-top-level, + anomalous-backslash-in-string, logging-not-lazy - relative-beyond-top-level - unused-import [REPORTS] -output-format=text -reports=no -score=no +output-format = text +reports = no +score = no diff --git a/LICENSE b/LICENSE index 6f37e60..413a516 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT Licence (MIT) -Copyright (c) 2017 YunoJuno Ltd +Copyright (c) 2020 YunoJuno Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.rst b/README.rst index 1862fd7..1bb1e80 100644 --- a/README.rst +++ b/README.rst @@ -12,7 +12,7 @@ Django app for managing external side effects. Python2/3 --------- -**This project now supports Python37/38 and Django 2.2+ only on master.** +**This project now supports Python 3.7+ and Django 2.2+ only on master.** Legacy versions are tagged. diff --git a/mypy.ini b/mypy.ini index ba2188f..46e0d70 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,11 +1,4 @@ -# This file is not yet enforced on CI but exists -# here so that we can test our type hinting every -# now and then. When Django and other tooling has -# caught up, the idea is that we block on type -# checking failures via CI. - [mypy] -; python_version=3.7 strict_optional=True ignore_missing_imports=True follow_imports=silent @@ -15,10 +8,6 @@ warn_unreachable = true disallow_untyped_defs = true disallow_incomplete_defs = true -# Disable mypy for admin.py files -[mypy-*.admin] -ignore_errors=True - # Disable mypy for migrations [mypy-*.migrations.*] ignore_errors=True diff --git a/pyproject.toml b/pyproject.toml index f9b7a99..64d53f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [tool.poetry] name = "django-side-effects" -version = "1.6" +version = "1.6.1" description = "Django app for managing external side effects." license = "MIT" authors = ["YunoJuno "] maintainers = ["YunoJuno "] readme = "README.rst" -homepage = "https://github.com/yunojuno/poetry-template" -repository = "https://github.com/yunojuno/poetry-template" +homepage = "https://github.com/yunojuno/django-side-effects" +repository = "https://github.com/yunojuno/django-side-effects" classifiers = [ "Environment :: Web Environment", "Framework :: Django :: 2.2", @@ -20,7 +20,7 @@ classifiers = [ packages = [{ include = "side_effects" }] [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" django = "^2.2 || ^3.0" python-env-utils = "*" diff --git a/tox.ini b/tox.ini index 95cde5e..1937403 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,9 @@ [tox] isolated_build = True -envlist = fmt, lint, mypy, py{36,37,38}-django{22,30} +envlist = fmt, lint, mypy, py{37,38}-django{22,30} [travis] python = - 3.6: lint, mypy, py36 3.7: lint, mypy, py37 3.8: lint, mypy, py38 @@ -26,14 +25,13 @@ deps = black commands = - isort --recursive side_effects - black side_effects + isort --recursive --check-only side_effects + black --check side_effects [testenv:lint] description = 'Source file linting' deps = pylint - pylint-django flake8 flake8-bandit flake8-docstrings