Commit Graph

69 Commits

Author SHA1 Message Date
Takashi Kajinami 797f40aa43 pre-commit: Integrate bandit
We also remove these unnecessary linter dependencies from
test-requirements.txt.

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: Id17f4865b2da9f4a5c1cd5ea360cd007315d1c0e
2024-02-02 21:46:30 +09:00
Takashi Kajinami 36bb13ec03 pre-commit: Bump versions
hacking now has a native hook.

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: Ifc1875cc30d6724ae414cd9cd5c3d66e033c272c
2024-02-02 21:44:56 +09:00
Takashi Kajinami dedcc75835 Bump hacking
hacking 3.0.x is too old.

Change-Id: Ic768c0687f090f9ccc91d4eae6474b2a5993e06c
2024-01-26 01:23:46 +09:00
Hervé Beraud b4aec262e3 Bump bandit
Change-Id: I2432f5d6c9febfa3a579551f116692618982ecf3
2023-05-17 16:24:29 +02:00
Hervé Beraud b8f713bc79 Adding pre-commit
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.

Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.

pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
  shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
  calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)

For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks

Change-Id: I6ae02d4e52fd812360414e7b8c1c9c4f17230812
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-03 14:25:24 +02:00
Moisés Guimarães de Medeiros 2f78803839 Bump bandit version
This patch bumps bandit allowed version to >=1.6.0,<1.7.0 in order to
avoid the errors detailed here https://github.com/PyCQA/bandit/pull/393

Change-Id: I358b62b45096cfbcafe0e665d92e6b05fb36b153
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-24 17:32:02 +02:00
Sean McGinnis b058d507f9
Update lower-constraints versions
This updates lower constraints to versions that will work with py38 so
that when we move to running on focal nodes, which has py38 as its
default py3 runtime, the lower-constraints job will continue to pass.

It also cleans out some secondary requirements that are no longer needed
due to our direct dependencies being updated.

Linters are removed that are kept in the global requirements blacklist
as those are not version tracked and are not relevant for our
lower-constraints unit test runs.

Change-Id: I60af0a8c5241190e5c889ff8f9aba3a4b3acc04c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-10 13:12:21 -05:00
zhangboye 5fd22ea200 Fix hacking min version to 3.0.1
Change-Id: I1ea1553bf48fe07406b7009dcf35812dd8c98b7b
2020-05-22 11:12:35 +08:00
Andreas Jaeger 0a0c99a42a Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Blacklist: W504 line break after binary operator

Change-Id: I8bca364fdc4c09cbd34127de10fa31da47078b4f
2020-03-30 11:56:23 +00:00
Stephen Finucane cfc27ef497 Drop python 2.7 support and testing
Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I94e709093e01825069b44b6c485e49a81f8f14c1
Sem-Ver: api-break
2020-01-30 11:37:22 +00:00
Ben Nemec fac974b1a0 Cap Bandit below 1.6.0 and update Sphinx requirement
Bandit 1.6.0 accidentally changed how the exclusion list option is
handled and breaks our use of it. Cap to the previous version until
Bandit has fixed the problem.

Sphinx 2.0 no longer works on python 2.7, so we need to start capping
it there as well.

Change-Id: Ib340f5822b124e78cd96ee12f9f033d5f313e238
Reference: https://github.com/PyCQA/bandit/pull/489
2019-05-13 17:41:41 +00:00
ZhongShengping 7274bc23f1 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:

https://governance.openstack.org/tc/reference/project-testing-interface.html

For more detials information, please refer to:

http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I4b1b023ff2c40f5b31429584fc1a77c0315ed2d9
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
2019-04-02 14:28:24 +01:00
ZhijunWei 3ea7c472cf Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: Iec0c74ab679d6046b12f1d16ecd5cb6dfa74b3ed
2019-01-21 19:32:38 -05:00
Vu Cong Tuan a9d728b71e Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I753f32ecf3275cf49d8c93bf648a6a26bc6da8e7
2018-07-04 08:18:31 +07:00
Doug Hellmann 1bd8ac4269 fix lower constraints and uncap eventlet
Fix the lower constraints settings to match the expected values.

We will manage the eventlet version using constraints now. See the
thread starting at
http://lists.openstack.org/pipermail/openstack-dev/2018-April/129096.html
for more details.

Change-Id: I9b2cdb68fd87e07d9ae0226bc2c1d77d6981ef52
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-12 10:45:52 -04:00
OpenStack Proposal Bot a02c71d37c Updated from global requirements
Change-Id: Ic887812a786989c384eee6dd36d87808a09cfbbe
2018-03-15 07:47:14 +00:00
OpenStack Proposal Bot 5b42d27635 Updated from global requirements
Change-Id: Icab5e0102061c8c7a54922b5f54d16a136bf51cd
2018-03-13 07:20:56 +00:00
OpenStack Proposal Bot eabec1291f Updated from global requirements
Change-Id: Ibca3bf47f11e47b4a6ff2aa13fa692ee24bef6cf
2018-03-10 13:41:51 +00:00
OpenStack Proposal Bot cc07667acc Updated from global requirements
Change-Id: Ic007a0b9d3514705596fca6476f1bb3ee4c9a3d8
2018-01-24 01:24:49 +00:00
OpenStack Proposal Bot 3d12e85716 Updated from global requirements
Change-Id: Iae4d497c21c9ba3928cf471a69dfc92a00c09065
2018-01-18 03:22:56 +00:00
OpenStack Proposal Bot 5d7a699be4 Updated from global requirements
Change-Id: Id6b9186a7b056edf48864ca222f34ede8c804cc9
2018-01-16 04:26:25 +00:00
ChangBo Guo(gcb) 86fb3dcc27 add bandit to pep8 job
Add the bandit security scanner to the pep8 job.
Note: we skip some cases which we can't fix now.

Change-Id: Iad8b31d1c214376cbdca39fa28afa7f46af6ccca
2017-12-12 10:49:20 +08:00
OpenStack Proposal Bot 1d3b8cb147 Updated from global requirements
Change-Id: I30fa61401e126946c8966c158d5e60fb5a695b6d
2017-11-15 11:57:56 +00:00
OpenStack Proposal Bot 62a5900e73 Updated from global requirements
Change-Id: Ifd89ca9d1bfe475a24daa92bc51fac3612a89269
2017-09-13 13:00:31 +00:00
OpenStack Proposal Bot aeaee20c8d Updated from global requirements
Change-Id: Iaaf7e87afedc093488e1f6660fac11c9f30bc23d
2017-08-18 11:39:49 +00:00
OpenStack Proposal Bot e7cd9fffb1 Updated from global requirements
Change-Id: I9e32b8c1f7644d814e108f0fc08db6e92f1a7670
2017-07-27 19:19:22 +00:00
OpenStack Proposal Bot a4a204ecb0 Updated from global requirements
Change-Id: I59fb58c5cacaf2168d1f9ef01c1a172807270fc0
2017-07-11 23:56:10 +00:00
Doug Hellmann a04f5f10e1 switch from oslosphinx to openstackdocstheme
Change-Id: Ieadf9b992b269d54dd9c79523d5879b6ad71ba7c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-11 13:49:58 -04:00
OpenStack Proposal Bot 3b6feda876 Updated from global requirements
Change-Id: I7db5f2e87abe16fa39d41749935bb4477a43da58
2017-07-11 02:39:14 +00:00
OpenStack Proposal Bot 998c12a34a Updated from global requirements
Change-Id: Ib8a380982a5eb32fc18150987d97c3f067cdc858
2017-03-03 00:02:48 +00:00
ricolin 5c58a04732 [Fix gate]Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: I6067710f787cdf213942ace53890d22ee691bd02
2017-03-02 18:26:21 +08:00
OpenStack Proposal Bot ce937b6a45 Updated from global requirements
Change-Id: I3dead32d0b34a484e0857b3cddd4bf3174066c28
2017-02-10 05:57:28 +00:00
OpenStack Proposal Bot 29c62bfedc Updated from global requirements
Change-Id: I5f0339656211a7aebc2941f5aa865e6afb6b9d5b
2016-11-02 15:39:01 +00:00
OpenStack Proposal Bot 5063e92634 Updated from global requirements
Change-Id: Ife80bde19a9b6fc6ea57f961bf4b75b0ca7d634e
2016-09-28 16:59:27 +00:00
OpenStack Proposal Bot 0ad82466e5 Updated from global requirements
Change-Id: I5e5ead5f3adf9f3555233fac4f17fa1a6f9d0046
2016-09-27 10:06:14 +00:00
OpenStack Proposal Bot f13a21ce94 Updated from global requirements
Change-Id: I75f0c00c84523ac027b9f68e3980d7de2815ee02
2016-06-30 18:48:12 +00:00
OpenStack Proposal Bot bbcb1adeea Updated from global requirements
Change-Id: Ia49ba770943fee9f3e74cf860a2f77a7a3c14ae6
2016-06-03 18:17:49 +00:00
Kirill Bespalov 9a36c18b12 Add reno for releasenotes management
An initial patch to add reno and create a base directory for
release notes

Change-Id: Ie3f6653a27a49d8b2fced3f399b1d4c8f0c95b7c
2016-05-20 17:56:23 +03:00
OpenStack Proposal Bot 6da5df0f4a Updated from global requirements
Change-Id: Ib2b3d0985a0c39e6fcb894dedb956c420a8f7fc6
2016-04-08 00:31:50 +00:00
OpenStack Proposal Bot 6c0f7ffd1e Updated from global requirements
Change-Id: I34f0b21afc4eba3a2503e3021ac121180d588948
2016-02-19 18:55:26 +00:00
OpenStack Proposal Bot fa04ee7df3 Updated from global requirements
Change-Id: Ibeffb23a0ef4f94d2f8f18f2fdebb491f88b3943
2016-02-10 21:57:56 +00:00
OpenStack Proposal Bot e168906ae4 Updated from global requirements
Change-Id: I3396829a7b7d3c31e6cae816aefca222d1048cbc
2016-01-24 20:52:51 +00:00
OpenStack Proposal Bot ca9801d4e4 Updated from global requirements
Change-Id: I0302364cb544b7e94ddb3f4f314ff0975a5b8ff2
2016-01-16 03:31:03 +00:00
OpenStack Proposal Bot 8dcf666ba9 Updated from global requirements
Change-Id: I531dd958b014b614b567b53826748073a9fb37e6
2015-11-19 16:00:14 +00:00
OpenStack Proposal Bot 9febe3030b Updated from global requirements
Change-Id: If90f38b24af03f43e91628b0352524ae68a0b86b
2015-08-04 00:48:08 +00:00
OpenStack Proposal Bot bd9a786797 Updated from global requirements
Change-Id: I257f5f78f99ede0a8727aab0549f470e08dc19c5
2015-07-29 03:49:49 +00:00
OpenStack Proposal Bot d23ce719f4 Updated from global requirements
Change-Id: Ibbaa894ed43aadca48bffead45aade251bb0f5e8
2015-07-15 01:36:25 +00:00
OpenStack Proposal Bot bc0235eb97 Updated from global requirements
Change-Id: I3a02320dd5ebaef8b324e5851053cdf50d373031
2015-06-30 20:02:06 +00:00
OpenStack Proposal Bot df3a3004f5 Updated from global requirements
Change-Id: Ic56900bb1edb1010ed91902e6ca1906b864bdee3
2015-06-22 19:59:36 +00:00
OpenStack Proposal Bot 2db9a21426 Updated from global requirements
Change-Id: I1c2882ec6c9b99aa3c4d5d371f8649522968a913
2015-06-22 08:26:55 +00:00