Skip to content

Commit 266e61f

Browse files
author
Release Manager
committed
gh-35454: fix pycodestyle E502 in coding and crypto folders <!-- Please provide a concise, informative and self-explanatory title. --> <!-- Don't put issue numbers in the title. Put it in the Description below. --> <!-- For example, instead of "Fixes #12345", use "Add a new method to multiply two integers" --> ### 📚 Description Fix pycodestyle warnings in `crypto` and `coding` folders. Done entirely with autopep8. <!-- Describe your changes here in detail. --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #35454 Reported by: Frédéric Chapoton Reviewer(s): Frédéric Chapoton, Matthias Köppe
2 parents fbe286d + 5166396 commit 266e61f

File tree

4 files changed

+248
-247
lines changed

4 files changed

+248
-247
lines changed

src/sage/coding/abstract_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _explain_constructor(cl):
127127
var = "It accepts unspecified arguments as well.\n"
128128
else:
129129
var = ""
130-
return("{}\n{}\n{}See the documentation of {}.{} for more details."\
130+
return("{}\n{}\n{}See the documentation of {}.{} for more details."
131131
.format(reqs, opts, var, cl.__module__, cl.__name__))
132132

133133

src/sage/coding/information_set_decoder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def time_search_loop(p):
583583
def compute_estimate(p):
584584
iters = 1.* binomial(n, k)/ \
585585
sum( binomial(n-tau, k-i)*binomial(tau,i) for i in range(p+1) )
586-
estimate = iters*(T + \
586+
estimate = iters*(T +
587587
sum(P[pi] * (q-1)**pi * binomial(k, pi) for pi in range(p+1) ))
588588
return estimate
589589

@@ -846,7 +846,7 @@ def __init__(self, code, number_errors, algorithm=None, **kwargs):
846846
self._algorithm = algorithm_names[algorithm](code, number_errors, **kwargs)
847847
else:
848848
raise ValueError("Unknown ISD algorithm '{}'."
849-
" The known algorithms are {}."\
849+
" The known algorithms are {}."
850850
.format(algorithm, sorted(algorithm_names)))
851851

852852
_known_algorithms = {

0 commit comments

Comments
 (0)