Skip to content

Commit

Permalink
Tox check fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
subhashb committed Aug 24, 2021
1 parent a2e23fb commit 773322b
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Release History
===============

0.6.2
-----

* Bugfixes for `protean start` command
* Use `_entity` as the field identifier for Element-level errors

0.6.1
-----

Expand Down
2 changes: 1 addition & 1 deletion src/protean/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__version__ = "0.6.1"

from .utils import get_version
from .domain import Domain
from .domain.config import Config as Config
from .utils import get_version

__all__ = ["get_version", "Domain", "Config"]
1 change: 1 addition & 0 deletions src/protean/adapters/cache/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from threading import RLock
from typing import Optional, Union

from protean.core.view import BaseView

try:
Expand Down
1 change: 1 addition & 0 deletions src/protean/adapters/cache/redis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json

from typing import Optional, Union

import redis
Expand Down
3 changes: 2 additions & 1 deletion src/protean/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration
"""
import ast
import click
import os
import re
import sys
import traceback

import click


class NoDomainException(click.UsageError):
"""Raised if a domain cannot be found or loaded."""
Expand Down
3 changes: 1 addition & 2 deletions src/protean/domain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
from protean.core.command import BaseCommand
from protean.core.command_handler import BaseCommandHandler
from protean.core.event import BaseEvent
from protean.core.field.basic import Boolean
from protean.core.model import BaseModel
from protean.domain.registry import _DomainRegistry
from protean.exceptions import (
ConfigurationError,
IncorrectUsageError,
NotSupportedError,
)
from protean.infra.eventing import EventLog, EventLogRepository, Message, MessageType
from protean.infra.eventing import EventLog, EventLogRepository, MessageType
from protean.infra.job import Job, JobRepository
from protean.utils import (
CommandProcessingType,
Expand Down
4 changes: 2 additions & 2 deletions src/protean/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ def _find_uow():
# context locals
_domain_context_stack = LocalStack()
_uow_context_stack = LocalStack()
current_domain: "Domain" = LocalProxy(_find_domain) # type: ignore
current_uow: "UnitOfWork" = LocalProxy(_find_uow) # type: ignore
current_domain: "Domain" = LocalProxy(_find_domain) # type: ignore # noqa: F821
current_uow: "UnitOfWork" = LocalProxy(_find_uow) # type: ignore # noqa: F821
g = LocalProxy(partial(_lookup_domain_object, "g")) # type: ignore
1 change: 0 additions & 1 deletion tests/entity/test_entity_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
DifferentDbPerson,
Person,
PersonAutoSSN,
PersonExplicitID,
Relative,
SqlDifferentDbPerson,
SqlPerson,
Expand Down
1 change: 1 addition & 0 deletions tests/event/tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import uuid

import pytest

from protean.core.aggregate import BaseAggregate
Expand Down
3 changes: 2 additions & 1 deletion tests/eventing/tests.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import pytest
import logging
import sys

from datetime import datetime
from typing import Dict

import pytest

from protean.core.aggregate import BaseAggregate
from protean.core.application_service import BaseApplicationService
from protean.core.event import BaseEvent
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
from pathlib import Path

import pytest

from click.testing import CliRunner

from protean import Domain
from protean.cli import find_best_domain, derive_domain
from protean.cli import NoDomainException
from protean.cli import NoDomainException, derive_domain, find_best_domain


@pytest.fixture
Expand Down
1 change: 0 additions & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import protean


# config keys used for the TestConfig
TEST_KEY = "foo"
SECRET_KEY = "config"
Expand Down

0 comments on commit 773322b

Please sign in to comment.