From 2bc84ebc3dc23488109cfadd8b5cf8cb876b2341 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Fri, 3 Jan 2020 03:04:50 -0700 Subject: [PATCH] formatting --- hyperglass/configuration/models/branding.py | 5 ++++- hyperglass/constants.py | 2 ++ poetry.lock | 2 +- pyproject.toml | 1 + setup.cfg | 18 +++++++++++++----- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/hyperglass/configuration/models/branding.py b/hyperglass/configuration/models/branding.py index 275ad23..9187dd0 100644 --- a/hyperglass/configuration/models/branding.py +++ b/hyperglass/configuration/models/branding.py @@ -1,9 +1,12 @@ """Validate branding configuration variables.""" +# Standard Library Imports from typing import Optional # Third Party Imports -from pydantic import StrictStr, StrictInt, StrictBool +from pydantic import StrictBool +from pydantic import StrictInt +from pydantic import StrictStr from pydantic import constr from pydantic import validator from pydantic.color import Color diff --git a/hyperglass/constants.py b/hyperglass/constants.py index 8d4b2d5..f10d565 100644 --- a/hyperglass/constants.py +++ b/hyperglass/constants.py @@ -23,6 +23,8 @@ LOG_LEVELS = [ LOG_HANDLER = {"sink": sys.stdout, "format": LOG_FMT, "level": "INFO"} +LOG_HANDLER_FILE = {"format": LOG_FMT, "level": "INFO"} + class Supported: """Define items supported by hyperglass. diff --git a/poetry.lock b/poetry.lock index 8d6670f..cd5e167 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1147,7 +1147,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pathlib2", "contextlib2", "unittest2"] [metadata] -content-hash = "456456d2135e56c6669ef2c378df392d90f6ed3512076b32244cd383f94887b0" +content-hash = "7d1312826ff7571bc4864590d9428994768e179ea994fc7ee15e222bed8072ac" python-versions = "^3.7" [metadata.files] diff --git a/pyproject.toml b/pyproject.toml index b28f46e..1bf7b3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,7 @@ flake8-return = "^1.1.1" pep8-naming = "^0.9.1" flake8-docstrings = "^1.5.0" pre-commit = "^1.21.0" +mccabe = "^0.6.1" [tool.isort] line_length = 88 diff --git a/setup.cfg b/setup.cfg index 8e8a89a..7405e7c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,14 +7,22 @@ exclude=.git, __pycache__, filename=*.py per-file-ignores= # Disable string length warnings so I can actually read the commands - hyperglass/configuration/models/commands.py:E501 + hyperglass/configuration/models/commands.py:E501,C0301 # Disable string length warnings so I can actually read the messages - hyperglass/configuration/models/messages.py:E501 + hyperglass/configuration/models/messages.py:E501,C0301 # Disable classmethod warning for validator decorators - hyperglass/configuration/models/*.py:N805 -ignore=W503 -select=B, C, D, E, F, I, II, N, P, PIE, S, W + hyperglass/configuration/models/*.py:N805,E0213,R0903 +ignore=W503,C0330,R504 +select=B, BLK, C, D, E, F, I, II, N, P, PIE, S, R, W disable-noqa=False hang-closing=False max-complexity=10 # format=${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s + +[isort] +line_length = 88 +indent = ' ' +force_single_line = true +import_heading_stdlib = "Standard Library Imports" +import_heading_thirdparty = "Third Party Imports" +import_heading_firstparty = "Project Imports" \ No newline at end of file