Skip to content

Commit

Permalink
version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
redruin1 committed Jan 24, 2024
1 parent 5a4eab0 commit e77a99e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

# 1.1.1
* Updated `factorio-data` to version `1.1.103`
* Merged RosieBaish's pull request:
* Added an `extend()` function to `EntityList` along with notes about it's performance
* Fixed issue #101 (finally)

# 1.1.0
* Added a number of missing prototype objects that are blueprintable:
* `SimpleEntityWithOwner`
Expand Down
4 changes: 2 additions & 2 deletions draftsman/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# version.py

__version__ = "1.1.0"
__version_info__ = (1, 1, 0)
__version__ = "1.1.1"
__version_info__ = (1, 1, 1)
4 changes: 2 additions & 2 deletions draftsman/classes/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ class named :py:class:`.EntityList`, which has all the normal properties
:ref:`here <handbook.blueprints.blueprint_differences>`.
.. NOTE ::
Currently, assigning to this always triggers a deep copy. To avoid
this, use :py:meth:`.EntityList.append()` or
this, use :py:meth:`.EntityList.append()` or
:py:meth:`EntityList.extend()` instead.
"""
return self._root["entities"]
Expand Down
3 changes: 1 addition & 2 deletions draftsman/classes/entitylist.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def extend(self, entities, copy=True, merge=False):
# type: (List[Union[str, EntityLike]], bool, bool) -> None
"""
Extends this list with the list provided. Computationally the same
as appending one element at a time.
as appending one element at a time.
:param copy: Whether or not to insert a copy of each element.
:param merge: Whether or not to merge each element, if possible.
Expand All @@ -152,7 +152,6 @@ def extend(self, entities, copy=True, merge=False):
for entity in entities:
self.append(entity, copy=copy, merge=merge)


@utils.reissue_warnings
def insert(self, idx, name, copy=True, merge=False, **kwargs):
# type: (int, Union[str, EntityLike], bool, bool, **dict) -> None
Expand Down
6 changes: 4 additions & 2 deletions test/test_entitylist.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ def test_extend(self):
# Test appending a list vs individually
blueprint1 = Blueprint()
blueprint2 = Blueprint()
entity_list = [new_entity("transport-belt", tile_position=(0, 0)),
new_entity("wooden-chest", tile_position=(1, 1))]
entity_list = [
new_entity("transport-belt", tile_position=(0, 0)),
new_entity("wooden-chest", tile_position=(1, 1)),
]
blueprint1.entities.extend(entity_list)
for e in entity_list:
blueprint2.entities.append(e)
Expand Down
4 changes: 2 additions & 2 deletions test/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@

class ValidateVersion(unittest.TestCase):
def test_versions(self):
self.assertEqual(draftsman.__version__, "1.1.0")
self.assertEqual(draftsman.__version_info__, (1, 1, 0))
self.assertEqual(draftsman.__version__, "1.1.1")
self.assertEqual(draftsman.__version_info__, (1, 1, 1))

0 comments on commit e77a99e

Please sign in to comment.