Skip to content

Commit 38805db

Browse files
committed
Changed __dict__ in dictable to be a property so as not to interfere with vars(). Updated other files and fixed wrong version numbers.
1 parent a0c1053 commit 38805db

File tree

12 files changed

+120
-11
lines changed

12 files changed

+120
-11
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.3.1
2+
current_version = 0.3.2
33
commit = True
44
tag = True
55

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ wheels/
2525
*.egg-info/
2626
.installed.cfg
2727
*.egg
28+
*.egg*
29+
2830
MANIFEST
2931

3032
# PyInstaller
@@ -48,6 +50,8 @@ coverage.xml
4850
*.cover
4951
.hypothesis/
5052
.pytest_cache/
53+
cover/
54+
.coverage*
5155

5256
# Translations
5357
*.mo
@@ -67,6 +71,7 @@ instance/
6771

6872
# Sphinx documentation
6973
docs/_build/
74+
doc/build
7075

7176
# PyBuilder
7277
target/

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ domdf_python_tools
3636
:target: https://github.com/domdfcoding/domdf_python_tools/blob/master/LICENSE
3737
.. image:: https://img.shields.io/github/languages/top/domdfcoding/domdf_python_tools
3838
:alt: GitHub top language
39-
.. image:: https://img.shields.io/github/commits-since/domdfcoding/domdf_python_tools/v0.3.1
39+
.. image:: https://img.shields.io/github/commits-since/domdfcoding/domdf_python_tools/v0.3.2
4040
:target: https://github.com/domdfcoding/domdf_python_tools/pulse
4141
:alt: GitHub commits since tagged version
4242
.. image:: https://img.shields.io/github/last-commit/domdfcoding/domdf_python_tools

__pkginfo__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
2019-2020 Dominic Davis-Foster <[email protected]>
4747
"""
4848

49-
__version__ = "0.3.1"
49+
__version__ = "0.3.2"
5050

5151
modname = "domdf_python_tools"
5252
pypi_name = "domdf_python_tools"
@@ -73,7 +73,7 @@
7373
repo_root = pathlib.Path(__file__).parent
7474

7575
# Get info from files; set: long_description
76-
long_description = (repo_root / "README.rst").read_text().replace("0.3.1", __version__) + '\n'
76+
long_description = (repo_root / "README.rst").read_text().replace("0.3.2", __version__) + '\n'
7777
conda_description = """Helpful functions for Python
7878
7979

doc-source/_static/style.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.wy-nav-content {
22
max-width: 900px !important;
3-
}
3+
}
4+
5+
li p:last-child { margin-bottom: 12px !important;}

doc-source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,23 @@
2929
release = version = __version__
3030
copyright = "Copyright 2019-2020 Dominic Davis-Foster"
3131
language = 'en'
32+
package_root = "domdf_python_tools"
3233

3334
extensions = [
3435
'sphinx.ext.intersphinx',
3536
'sphinx.ext.autodoc',
3637
'sphinx.ext.mathjax',
3738
'sphinx.ext.viewcode',
3839
'sphinxcontrib.httpdomain',
40+
"sphinxcontrib.extras_require",
41+
"sphinx.ext.todo",
42+
"sphinxemoji.sphinxemojii",
3943

4044
]
4145

46+
sphinxemoji_style = 'twemoji'
47+
todo_include_todos = bool(os.environ.get("SHOW_TODOS", False))
48+
4249
templates_path = ['_templates']
4350
html_static_path = ['_static']
4451
source_suffix = '.rst'

doc-source/dates.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
.. contents:: Table of Contents
66

7+
78
.. warning:: This module has not been fully tested. Use with caution.
89

910
.. note:: This module requires the `pytz <https://pypi.org/project/pytz/>`_ package to be installed.

doc-source/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
extras_require
12
pytz >=2019.1
23
sphinx
34
sphinx_rtd_theme
45
sphinxcontrib-httpdomain
6+
sphinxemoji

domdf_python_tools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@
5757
__copyright__ = "2014-2020 Dominic Davis-Foster"
5858

5959
__license__ = "LGPLv3+"
60-
__version__ = "0.3.1"
60+
__version__ = "0.3.2"
6161
__email__ = "[email protected]"

domdf_python_tools/bases.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,29 @@ def __str__(self):
4747
return self.__repr__()
4848

4949
def __iter__(self):
50-
for key, value in self.__dict__().items():
50+
for key, value in self.__dict__.items():
5151
yield key, value
5252

5353
def __getstate__(self):
54-
return self.__dict__()
54+
return self.__dict__
5555

5656
def __setstate__(self, state):
5757
self.__init__(**state)
5858

5959
def __copy__(self):
60-
return self.__class__(**self.__dict__())
60+
return self.__class__(**self.__dict__)
6161

6262
def __deepcopy__(self, memodict={}):
6363
return self.__copy__()
6464

65+
@property
6566
@abstractmethod
6667
def __dict__(self):
6768
return dict()
6869

6970
def __eq__(self, other):
7071
if isinstance(other, self.__class__):
71-
return pydash.predicates.is_match(other.__dict__(), self.__dict__())
72+
return pydash.predicates.is_match(other.__dict__, self.__dict__)
7273

7374
return NotImplemented
7475

0 commit comments

Comments
 (0)