Skip to content

Commit

Permalink
Apply isort formatting rules and add format tox env
Browse files Browse the repository at this point in the history
  • Loading branch information
ely-as committed Jun 22, 2023
1 parent 9007bc7 commit 8600a04
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion envconfig/parser.py
@@ -1,6 +1,6 @@
from typing import Any, Union
import json
from json.decoder import JSONDecodeError
from typing import Any, Union

NoneType: type = type(None)

Expand Down
4 changes: 2 additions & 2 deletions envconfig/settings.py
@@ -1,14 +1,14 @@
import sys
from os import environ, getenv
from pathlib import Path
import sys

from django.core.exceptions import ImproperlyConfigured
from dotenv import load_dotenv

from envconfig import utils
from envconfig.dotenv import find_dotenv
from envconfig.parser import EnvParser
from envconfig.setting_types import get_setting_types
from envconfig import utils

# Based on the command line arguments try and infer the project name and
# the path to the base directory (to look for .env)
Expand Down
2 changes: 1 addition & 1 deletion envconfig/utils.py
@@ -1,6 +1,6 @@
from importlib import import_module
from importlib.machinery import SourceFileLoader
from importlib.util import spec_from_loader, module_from_spec
from importlib.util import module_from_spec, spec_from_loader
from pathlib import Path
from types import ModuleType
from typing import List, Optional, Union
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Expand Up @@ -31,9 +31,13 @@ select = [
"F", # Pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"B", # flake8-bugbear
"C901", # mccabe
]
fixable = [
"I", # isort
]
ignore = [
"E501", # line too long
]
Expand Down
1 change: 1 addition & 0 deletions tests/test_setting_types.py
@@ -1,6 +1,7 @@
import pytest

from envconfig.setting_types import get_setting_types

from .utils import get_global_settings_types

setting_types = get_setting_types()
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Expand Up @@ -34,12 +34,13 @@ deps =
py310-django32: Django>=3.2.9
py311-django41: Django>=4.1.3
static: mypy
static: ruff
{format,static}: ruff
test: -r{toxinidir}{/}requirements.txt
test: pytest
test: pytest-mock
test: pytest-cov
commands =
format: ruff check --fix-only {tox_root}
static: ruff check {tox_root}
static: mypy
test: pytest --cov={toxinidir}

0 comments on commit 8600a04

Please sign in to comment.