This final patch removes our dependency on coala which hasn't had
a release in quite some time.
Change-Id: Idf43965822f7ece83143fb7fa8c3ddda1175355a
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
+++ /dev/null
-[Python]
-bears = PEP8Bear
-files = **/*.py
-ignore = .*/**
-max_line_length = 120
--- /dev/null
+[flake8]
+show-source = True
+max-line-length = 120
+
+# # - Select E121, E123, E126, E226, E241, E242 and E704 which are turned OFF
+# # by default but represent guidelines accepted by us.
+# # - Do not select E133 because it is incompatible with E123 which was
+# # selected instead.
+# - It turns out that now all checks except E133 are enabled so the select
+# can be simplified to be just "E,W". However a new version could change
+# that (select E133 instead of E123) but that should be caught by the
+# verify job.
+select = E,W
+ignore = E722,W503 # as of aprox 10/25 some update/change has caused existing code to fail on E722
+exclude =
+ .git,
+ .tox,
+ docs/conf.py
+- repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v2.4.0 # Use the ref you want to point at
+ hooks:
+ - id: flake8
+ language_version: python2
+ additional_dependencies: ['flake8~=3.5.0']
+
+- repo: https://github.com/pre-commit/mirrors-autopep8
+ rev: v1.4.4
+ hooks:
+ - id: autopep8
+
- repo: git://github.com/guykisel/pre-commit-robotframework-tidy
rev: 'master'
hooks:
- repo: git://github.com/guykisel/pre-commit-robotframework-tidy
rev: 'master'
hooks:
s1_slots = ((self.total_prefix_amount -
self.remaining_prefixes_threshold - 1) /
self.prefix_count_to_add_default + 1)
s1_slots = ((self.total_prefix_amount -
self.remaining_prefixes_threshold - 1) /
self.prefix_count_to_add_default + 1)
- s2_slots = ((self.remaining_prefixes_threshold - 1) /
- (self.prefix_count_to_add_default -
- self.prefix_count_to_del_default) + 1)
+ s2_slots = (
+ (self.remaining_prefixes_threshold - 1)
+ / (self.prefix_count_to_add_default - self.prefix_count_to_del_default)
+ + 1
+ )
# S1_First_Index = 0
# S1_Last_Index = s1_slots * self.prefix_count_to_add_default - 1
s2_first_index = s1_slots * self.prefix_count_to_add_default
# S1_First_Index = 0
# S1_Last_Index = s1_slots * self.prefix_count_to_add_default - 1
s2_first_index = s1_slots * self.prefix_count_to_add_default
if not self.phase2_start_time:
self.phase2_start_time = time.time()
# tailor the number of prefixes if needed
if not self.phase2_start_time:
self.phase2_start_time = time.time()
# tailor the number of prefixes if needed
- prefix_count_to_add = (prefix_count_to_del +
- min(prefix_count_to_add - prefix_count_to_del,
- self.remaining_prefixes))
+ prefix_count_to_add = (
+ prefix_count_to_del
+ + min(prefix_count_to_add - prefix_count_to_del, self.remaining_prefixes)
+ )
# prefix slots selection for insertion and withdrawal
slot_index_to_add = self.iteration
slot_index_to_del = slot_index_to_add - self.slot_gap_default
# prefix slots selection for insertion and withdrawal
slot_index_to_add = self.iteration
slot_index_to_del = slot_index_to_add - self.slot_gap_default
-envlist = coala,pep8,pre-commit
+envlist = docs,pre-commit
# TODO: Include docs when it starts performing strict checks.
skipsdist = true
# TODO: Include docs when it starts performing strict checks.
skipsdist = true
-[testenv:coala]
-basepython = python3
-deps =
- coala==0.11.0
- coala-bears==0.11.0
- pygments~=2.3.1
- requests==2.15.1
-commands =
- python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger
- coala --non-interactive
-
[testenv:docs]
basepython = python3
deps = -rdocs/requirements.txt
[testenv:docs]
basepython = python3
deps = -rdocs/requirements.txt
commands =
pre-commit install
pre-commit run --all-files
commands =
pre-commit install
pre-commit run --all-files
-
-[testenv:pep8]
-basepython = python2
-deps =
- flake8~=3.5.0
-commands = flake8
-
-[flake8]
-show-source = True
-max-line-length = 120
-
-# # - Select E121, E123, E126, E226, E241, E242 and E704 which are turned OFF
-# # by default but represent guidelines accepted by us.
-# # - Do not select E133 because it is incompatible with E123 which was
-# # selected instead.
-# - It turns out that now all checks except E133 are enabled so the select
-# can be simplified to be just "E,W". However a new version could change
-# that (select E133 instead of E123) but that should be caught by the
-# verify job.
-select = E,W
-ignore = E722 # as of aprox 10/25 some update/change has caused existing code to fail on E722
-exclude =
- .git,
- .tox,
- docs/conf.py