You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `xcp` directory contains the Common XenServer and XCP-ng Python packages.
9
9
They are intented for use in XenServer and XCP-ng Dom0 only and deal with logging,
10
10
Hardware/PCI, networking, and other Dom0 tasks.
@@ -18,6 +18,8 @@ It depends on `six`, and on Python 2.7, also `configparser` and `pyliblzma`.
18
18
19
19
## Test-driven Development (TDD) Model
20
20
21
+
Please see [CONTRIBUTING.md] for installing a local development environment.
22
+
21
23
This package has CI which can be run locally but is also run in GitHub CI to ensure
22
24
Test-driven development.
23
25
@@ -81,7 +83,7 @@ For the installation of the general development dependencies, visit [INSTALL.md]
81
83
82
84
The list of `virtualenvs` configured in tox can be shown using this command: `tox -av`
83
85
84
-
```yaml
86
+
```ml
85
87
$ tox -av
86
88
default environments:
87
89
py36-lint -> Run in a py36 virtualenv: Run pylint and fail on warnings remaining on lines in the diff to master
@@ -114,17 +116,20 @@ The goal or final benefit would be to have it to ensure internal type correctnes
114
116
and code quality but also to use static analysis to check the interoperability with
115
117
the calling code.
116
118
117
-
## Type annotations: Use Type comments for now!
119
+
## Type annotations: Use Type comments for now
118
120
119
121
Python2.7 can't support the type annotation syntax, but until all users are migrated,
120
122
annotations in comments (type comments) can be used. They are supported by
121
123
tools like `mypy` and `pyright` (VS Code):
122
124
123
-
Quoting from https://stackoverflow.com/questions/53306458/python-3-type-hints-in-python-2:
125
+
Quoting from <https://stackoverflow.com/questions/53306458/python-3-type-hints-in-python-2>:
124
126
125
127
> Function annotations were introduced in [PEP 3107](https://www.python.org/dev/peps/pep-3107/) for Python 3.0. The usage of annotations as type hints was formalized in in [PEP 484](https://www.python.org/dev/peps/pep-0484/) for Python 3.5+.
126
128
>
127
-
> Any version before 3.0 then will not support the syntax you are using for type hints at all. However, PEP 484 [offers a workaround](https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code), which some editors may choose to honor. In your case, the hints would look like this:
129
+
> Python < 3.0 does support the type hints syntax, but
0 commit comments