From 609d6c0a48170e8eeefca2c6f0fd55c014c7ad65 Mon Sep 17 00:00:00 2001 From: sco1 Date: Wed, 18 Sep 2019 15:46:36 -0700 Subject: Update linting rules & partially relint --- .flake8 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to '.flake8') diff --git a/.flake8 b/.flake8 index 605bc46e..0f1a77e2 100644 --- a/.flake8 +++ b/.flake8 @@ -1,7 +1,11 @@ [flake8] +max-line-length=100 docstring-convention=all +import-order-style=pycharm +application_import_names=pydis_site +exclude=__pycache__, venv, .venv, **/migrations ignore= - P102,B311,W503,E226,S311, + B311,W503,E226,S311,T000 # Missing Docstrings D100,D104,D105,D107, # Docstring Whitespace @@ -10,11 +14,7 @@ ignore= D301,D302, # Docstring Content D400,D401,D402,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414,D416,D417 - + # Type Annotations + TYP002,TYP003,TYP101,TYP102,TYP204,TYP206 per-file-ignores = - **/tests/**:D101,D102,D103,D105,D106,S106 - -application_import_names=pydis_site -exclude=__pycache__, venv, .venv, **/migrations -import-order-style=pycharm -max-line-length=100 + **/tests/**:D101,D102,D103,D105,D106,S106,TYP -- cgit v1.2.3 From 9d550ec2ed6748d9abd05c4429cb180965b82d60 Mon Sep 17 00:00:00 2001 From: sco1 Date: Wed, 18 Sep 2019 18:36:55 -0700 Subject: Add manage.py to linting ignore Synchronize output of `pipenv run lint` and `python -m flake8` for the current project structure --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.flake8') diff --git a/.flake8 b/.flake8 index 0f1a77e2..66051658 100644 --- a/.flake8 +++ b/.flake8 @@ -3,7 +3,7 @@ max-line-length=100 docstring-convention=all import-order-style=pycharm application_import_names=pydis_site -exclude=__pycache__, venv, .venv, **/migrations +exclude=__pycache__, venv, .venv, manage.py, **/migrations ignore= B311,W503,E226,S311,T000 # Missing Docstrings -- cgit v1.2.3 From 7f799b6ee545a26c3ccc6f087946da54aea11430 Mon Sep 17 00:00:00 2001 From: "S. Co1" Date: Sun, 22 Sep 2019 06:51:55 -0700 Subject: Apply suggestions from code review Co-Authored-By: Mark Co-Authored-By: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com> --- .flake8 | 2 +- pydis_site/apps/api/models/bot/tag.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to '.flake8') diff --git a/.flake8 b/.flake8 index 66051658..e36c2eb1 100644 --- a/.flake8 +++ b/.flake8 @@ -17,4 +17,4 @@ ignore= # Type Annotations TYP002,TYP003,TYP101,TYP102,TYP204,TYP206 per-file-ignores = - **/tests/**:D101,D102,D103,D105,D106,S106,TYP + **/tests/**:D1,S106,TYP diff --git a/pydis_site/apps/api/models/bot/tag.py b/pydis_site/apps/api/models/bot/tag.py index 792e6b43..5435ee48 100644 --- a/pydis_site/apps/api/models/bot/tag.py +++ b/pydis_site/apps/api/models/bot/tag.py @@ -42,7 +42,7 @@ def validate_tag_embed_fields(fields: dict) -> None: validator(value) -def validate_tag_embed_footer(footer: Any) -> None: +def validate_tag_embed_footer(footer: Dict[str, str]) -> None: """Raises a ValidationError if the given footer is invalid.""" field_validators = { 'text': ( -- cgit v1.2.3