1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
.. _Developer Guides:
Developer Guides
================
Information about `ezdxf` internals.
Source Code Formatting
----------------------
Reformat code by `Black`_ with the default setting of 88 characters per line::
C:\> black <python-file>
Type Annotations
----------------
The use of type annotations is encouraged. New modules should pass `mypy`_
without errors in non-strict mode. Using ``# type: ignore`` is fine in tricky
situations - type annotations should be helpful in understanding the code
and not be a burden.
The following global options are required to pass `mypy`_ without error
messages:
.. code-block:: ini
[mypy]
python_version = 3.7
ignore_missing_imports = True
Read `this <https://mypy.readthedocs.io/en/stable/config_file.html>`_ to learn
where `mypy`_ searches for config files.
Use the `mypy`_ command line option ``--ignore-missing-imports`` and ``-p`` to
check the whole package from any location in the file system:
.. code-block:: Powershell
PS D:\Source\ezdxf.git> mypy --ignore-missing-imports -p ezdxf
Success: no issues found in 255 source files
Design
------
The :ref:`pkg-design` section shows the structure of the `ezdxf` package for
developers with more experience, which want to have more insight into the
package an maybe want to develop add-ons or want contribute to the `ezdxf`
package.
.. toctree::
:maxdepth: 2
pkg-design
Internal Data Structures
------------------------
.. toctree::
:maxdepth: 2
entitydb
dxftags
dxftag_collections
xdata
appdata
reactors
Documentation Guide
-------------------
.. toctree::
:maxdepth: 1
doc_formatting_guide
.. _Black: https://pypi.org/project/black/
.. _mypy: https://pypi.org/project/mypy/
|