Commit Graph

17 Commits

Author SHA1 Message Date
Eric Harney 99f6f2b734 import pylint tooling from cinder
Make "tox -e pylint" useful.

Change-Id: Ia67670dffbfd000dd8056b0ae89eb9cdb6471bcb
2023-04-25 09:09:38 -04:00
Eric Harney d5820f5319 mypy: work around mypy bug #13214
Turn off in-project stubs for now until this bug
is fixed and in a mypy release we can consume.

https://github.com/python/mypy/issues/13214

Change-Id: Ica954cffd760d7a9d48ba38d01e0e01e84553ff8
2022-08-18 14:04:26 -04:00
Brian Rosmaita 98c0916336 Update mypy infrastructure
Port cinder change Id69cb519ee7300b33ff087de4e7d46cdad67d162
to os-brick.

Change-Id: I57ce2aea95fa0d307a2cab89366f8f780a109535
2021-07-15 14:08:28 -04:00
Zuul 1d444f0842 Merge "Ussuri+ is python3 only" 2021-06-23 14:59:10 +00:00
Eric Harney f18a33b322 Introduce mypy
This adds the "tox -e mypy" environment which works
the same way we have introduced mypy in Cinder.

Files added to mypy-files.txt are validated with mypy.

Change-Id: I6d09422dbdf5ea58661aad7a63c4d4d7a2839833
2021-05-21 16:58:22 -04:00
dengzhaosen 496c7226fa Ussuri+ is python3 only
update python to python3

Change-Id: Ia5c645704ab366b8691f3ca3e7920e87c6279171
2021-05-06 09:21:08 +08:00
xuanyandong a9011e5558 Remove six
Replace to Python 3 style code.

Change-Id: Ieaeb7b0dc4dceb519778ec8d7e45f53a070d34e2
2021-03-03 14:41:22 +08:00
Hervé Beraud 6ed805abe4 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I2ed84bb5a16968ff453a5411b8eaa54e0a58c15a
2020-06-02 20:35:29 +02:00
Lucian Petrut 9e8657dd6e Split connector list by platform
We'll keep separate lists of connectors for each of the supported
operating systems so that we don't end up trying to use unsupported
connectors.

Since Cinder is explicitly trying to use the iSCSI/FC connectors,
we'll have to include those as well, for now.

Change-Id: Ibec2b798e8c5c3457cebea12cfd2f5813e62fb9e
Closes-Bug: #1850109
2019-11-12 13:18:32 +02:00
Walter A. Boring IV f6761989e8 Add generate_connector_list
This patch adds a new tool that generates a list of connectors
that exist in os-brick.

Change-Id: I59c4f9360f13ec3913b9e2b0a9e81d1d517911b7
2019-04-16 23:17:18 +00:00
Andreas Jaeger 56d034ab10 Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.

This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.

Change-Id: I43828f47711118eba8d835222586db4faac93180
2017-12-02 16:51:51 +00:00
Maciej Kucia d9ac24d0d2 Stop ignoring H405 hacking rule in tox
This change is one in the series of changes to
align os-brick with Cinder rules.

- H405 'multi line docstring summary not
        separated with an empty line'

See following for more information:
 https://github.com/openstack-dev/hacking

Change-Id: Id67324c0ef22287d91b49ae11eda094bf73739a1
Signed-off-by: Maciej Kucia <maciej@kucia.net>
2017-05-24 00:44:57 +02:00
Eric Harney 2d3a4c58d4 Add curl to bindep
This is used by tools/tox_install.sh.

Change-Id: Ib9f9fc214c27c5ba647f8abcb4b558a229f1f1fa
2016-12-22 10:53:42 -05:00
Lee Yarwood 58956d7c86 Add Constraints support and missing bindep.txt dependencies
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove os-brick.

Finally, it also adds libxml2 and libxslt to bindep.txt for use when
building lxml that is now required by oslo.vmware.

Change-Id: I3fbe4acbdf0281c91801ff7d09de6e9043915939
2016-12-20 14:30:55 +11:00
haobing1 261654b059 Remove self.__dict__ for formatting strings
Following OpenStack Style Guidelines:
http://docs.openstack.org/developer/hacking/#dictionaries-lists
It is not clear as using explicit dictionaries
and help avoid some errors during refactoring.

Change-Id: Iac567648435cd83c3d3fafc1a3e69ea75f2b1624
2016-09-01 11:32:03 +08:00
Walter A. Boring IV 0dcb996eaf Add fast8 to quickly test pep8 changes
This patch adds the 'fast8' test that Cinder has to os-brick.
It's a simple pep8 check against what has changed since HEAD.
This allows you to test for pep8 violations in files that you have
changed without testing the entire repo.

Change-Id: I4e3840d763d08a80c84ba00e2d5e5710a905ecf3
2016-06-09 14:17:48 -07:00
Eric Harney 2ec0e03a2d Add pylint tox env
Run pylint with
 $ tox -e pylint

(Copied from Cinder with small modifications.)

Change-Id: Ieedcab8abdae759b4eedd9389db11f1bad62a5ca
2016-04-04 18:02:19 -04:00