Skip to content

Commit

Permalink
tox passes (at least on py 3.10)
Browse files Browse the repository at this point in the history
  • Loading branch information
redruin1 committed Jan 2, 2025
1 parent 7948bf9 commit e2fe324
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion draftsman/classes/mixins/stack_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from draftsman.data.signals import signal_dict

from pydantic import BaseModel, Field
import six
# import six
from typing import Optional

from typing import TYPE_CHECKING
Expand Down
3 changes: 3 additions & 0 deletions draftsman/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Manages the Factorio environment. Primarily holds :py:func:`draftsman.env.update()`,
which runs through the Factorio data lifecycle and updates the data in
:py:mod:`draftsman.data`.
.. NOTE:: Deprecated as of Draftsman 2.0
"""

# TODO:
Expand Down
2 changes: 2 additions & 0 deletions draftsman/prototypes/reactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class ControlBehavior(DraftsmanBaseModel):
description="""What signal to broadcast the reactors temperature on, if "read_temperature" is true.""",
)

control_behavior: Optional[ControlBehavior] = ControlBehavior()

model_config = ConfigDict(title="Reactor")

def __init__(
Expand Down
7 changes: 3 additions & 4 deletions draftsman/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import json
import math
from functools import wraps
import six
# import six
from thefuzz import process
from typing import Optional, Union, TYPE_CHECKING
import warnings
Expand All @@ -29,8 +29,7 @@
# =============================================================================


@six.add_metaclass(ABCMeta)
class Shape:
class Shape(metaclass=ABCMeta):
"""
Abstract Shape class. Must be overwritten with an implementation. Contains a
single attribute, a PrimitiveVector :py:attr:`position`.
Expand Down Expand Up @@ -488,7 +487,7 @@ def version_tuple_to_string(version_tuple: tuple[int, ...]) -> str:
:returns: A str of the format ``"a.b.c"`` from ``(a, b, c)``
"""
return ".".join(six.text_type(x) for x in version_tuple)
return ".".join(str(x) for x in version_tuple)


# =============================================================================
Expand Down
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def package_files(*directories):
'draftsman',
'draftsman.classes',
'draftsman.classes.mixins',
'draftsman.environment',
'draftsman.data',
'draftsman.prototypes'
],
Expand All @@ -62,10 +63,11 @@ def package_files(*directories):
"GitPython >= 3.1.43",
"typing",
"typing_extensions; python_version < '3.8'",
"importlib-resources; python_version < '3.7'",
"enum34; python_version < '3.4'",
"future; python_version < '3.0'",
"unittest2 >= 1.1.0; python_version < '3.0'",
"thefuzz",
# "importlib-resources; python_version < '3.7'",
# "enum34; python_version < '3.4'",
# "future; python_version < '3.0'",
# "unittest2 >= 1.1.0; python_version < '3.0'",
],
entry_points = {
'console_scripts': [
Expand All @@ -75,7 +77,7 @@ def package_files(*directories):
},
classifiers=[
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 2",
# "Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ deps =
cython # for lupa
changedir = test
commands =
draftsman-update --verbose --no-mods
python -m unittest discover
draftsman -v update --no-mods
python -m pytest . -Werror -vv

0 comments on commit e2fe324

Please sign in to comment.