Skip to content

Commit 6d20e2b

Browse files
authored
Add flake8-broken-line to pre-commit (TheAlgorithms#7338)
* ci: Add ``flake8-broken-line`` plugin to ``pre-commit`` * refactor: Fix errors from ``flake8-broken-line``
1 parent b5b1eb2 commit 6d20e2b

File tree

3 files changed

+45
-40
lines changed

3 files changed

+45
-40
lines changed

.pre-commit-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ repos:
3939
additional_dependencies:
4040
- flake8-bugbear
4141
- flake8-builtins
42+
- flake8-broken-line
4243
- flake8-comprehensions
4344
- pep8-naming
4445

project_euler/problem_008/sol1.py

+22-20
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,28 @@
3333

3434
import sys
3535

36-
N = """73167176531330624919225119674426574742355349194934\
37-
96983520312774506326239578318016984801869478851843\
38-
85861560789112949495459501737958331952853208805511\
39-
12540698747158523863050715693290963295227443043557\
40-
66896648950445244523161731856403098711121722383113\
41-
62229893423380308135336276614282806444486645238749\
42-
30358907296290491560440772390713810515859307960866\
43-
70172427121883998797908792274921901699720888093776\
44-
65727333001053367881220235421809751254540594752243\
45-
52584907711670556013604839586446706324415722155397\
46-
53697817977846174064955149290862569321978468622482\
47-
83972241375657056057490261407972968652414535100474\
48-
82166370484403199890008895243450658541227588666881\
49-
16427171479924442928230863465674813919123162824586\
50-
17866458359124566529476545682848912883142607690042\
51-
24219022671055626321111109370544217506941658960408\
52-
07198403850962455444362981230987879927244284909188\
53-
84580156166097919133875499200524063689912560717606\
54-
05886116467109405077541002256983155200055935729725\
55-
71636269561882670428252483600823257530420752963450"""
36+
N = (
37+
"73167176531330624919225119674426574742355349194934"
38+
"96983520312774506326239578318016984801869478851843"
39+
"85861560789112949495459501737958331952853208805511"
40+
"12540698747158523863050715693290963295227443043557"
41+
"66896648950445244523161731856403098711121722383113"
42+
"62229893423380308135336276614282806444486645238749"
43+
"30358907296290491560440772390713810515859307960866"
44+
"70172427121883998797908792274921901699720888093776"
45+
"65727333001053367881220235421809751254540594752243"
46+
"52584907711670556013604839586446706324415722155397"
47+
"53697817977846174064955149290862569321978468622482"
48+
"83972241375657056057490261407972968652414535100474"
49+
"82166370484403199890008895243450658541227588666881"
50+
"16427171479924442928230863465674813919123162824586"
51+
"17866458359124566529476545682848912883142607690042"
52+
"24219022671055626321111109370544217506941658960408"
53+
"07198403850962455444362981230987879927244284909188"
54+
"84580156166097919133875499200524063689912560717606"
55+
"05886116467109405077541002256983155200055935729725"
56+
"71636269561882670428252483600823257530420752963450"
57+
)
5658

5759

5860
def solution(n: str = N) -> int:

project_euler/problem_008/sol3.py

+22-20
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,28 @@
3232
"""
3333
import sys
3434

35-
N = """73167176531330624919225119674426574742355349194934\
36-
96983520312774506326239578318016984801869478851843\
37-
85861560789112949495459501737958331952853208805511\
38-
12540698747158523863050715693290963295227443043557\
39-
66896648950445244523161731856403098711121722383113\
40-
62229893423380308135336276614282806444486645238749\
41-
30358907296290491560440772390713810515859307960866\
42-
70172427121883998797908792274921901699720888093776\
43-
65727333001053367881220235421809751254540594752243\
44-
52584907711670556013604839586446706324415722155397\
45-
53697817977846174064955149290862569321978468622482\
46-
83972241375657056057490261407972968652414535100474\
47-
82166370484403199890008895243450658541227588666881\
48-
16427171479924442928230863465674813919123162824586\
49-
17866458359124566529476545682848912883142607690042\
50-
24219022671055626321111109370544217506941658960408\
51-
07198403850962455444362981230987879927244284909188\
52-
84580156166097919133875499200524063689912560717606\
53-
05886116467109405077541002256983155200055935729725\
54-
71636269561882670428252483600823257530420752963450"""
35+
N = (
36+
"73167176531330624919225119674426574742355349194934"
37+
"96983520312774506326239578318016984801869478851843"
38+
"85861560789112949495459501737958331952853208805511"
39+
"12540698747158523863050715693290963295227443043557"
40+
"66896648950445244523161731856403098711121722383113"
41+
"62229893423380308135336276614282806444486645238749"
42+
"30358907296290491560440772390713810515859307960866"
43+
"70172427121883998797908792274921901699720888093776"
44+
"65727333001053367881220235421809751254540594752243"
45+
"52584907711670556013604839586446706324415722155397"
46+
"53697817977846174064955149290862569321978468622482"
47+
"83972241375657056057490261407972968652414535100474"
48+
"82166370484403199890008895243450658541227588666881"
49+
"16427171479924442928230863465674813919123162824586"
50+
"17866458359124566529476545682848912883142607690042"
51+
"24219022671055626321111109370544217506941658960408"
52+
"07198403850962455444362981230987879927244284909188"
53+
"84580156166097919133875499200524063689912560717606"
54+
"05886116467109405077541002256983155200055935729725"
55+
"71636269561882670428252483600823257530420752963450"
56+
)
5557

5658

5759
def str_eval(s: str) -> int:

0 commit comments

Comments
 (0)