---
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
---
E25.py:2:12: E251 [*] Unexpected spaces around keyword / parameter equals
  |
1 | #: E251 E251
2 | def foo(bar = False):
  |            ^ E251
3 |     '''Test function with an error in declaration'''
4 |     pass
  |
  = help: Remove whitespace

ℹ Safe fix
1 1 | #: E251 E251
2   |-def foo(bar = False):
  2 |+def foo(bar= False):
3 3 |     '''Test function with an error in declaration'''
4 4 |     pass
5 5 | #: E251

E25.py:2:14: E251 [*] Unexpected spaces around keyword / parameter equals
  |
1 | #: E251 E251
2 | def foo(bar = False):
  |              ^ E251
3 |     '''Test function with an error in declaration'''
4 |     pass
  |
  = help: Remove whitespace

ℹ Safe fix
1 1 | #: E251 E251
2   |-def foo(bar = False):
  2 |+def foo(bar =False):
3 3 |     '''Test function with an error in declaration'''
4 4 |     pass
5 5 | #: E251

E25.py:6:9: E251 [*] Unexpected spaces around keyword / parameter equals
  |
4 |     pass
5 | #: E251
6 | foo(bar= True)
  |         ^ E251
7 | #: E251
8 | foo(bar =True)
  |
  = help: Remove whitespace

ℹ Safe fix
3 3 |     '''Test function with an error in declaration'''
4 4 |     pass
5 5 | #: E251
6   |-foo(bar= True)
  6 |+foo(bar=True)
7 7 | #: E251
8 8 | foo(bar =True)
9 9 | #: E251 E251

E25.py:8:8: E251 [*] Unexpected spaces around keyword / parameter equals
   |
 6 | foo(bar= True)
 7 | #: E251
 8 | foo(bar =True)
   |        ^ E251
 9 | #: E251 E251
10 | foo(bar = True)
   |
   = help: Remove whitespace

ℹ Safe fix
5 5 | #: E251
6 6 | foo(bar= True)
7 7 | #: E251
8   |-foo(bar =True)
  8 |+foo(bar=True)
9 9 | #: E251 E251
10 10 | foo(bar = True)
11 11 | #: E251

E25.py:10:8: E251 [*] Unexpected spaces around keyword / parameter equals
   |
 8 | foo(bar =True)
 9 | #: E251 E251
10 | foo(bar = True)
   |        ^ E251
11 | #: E251
12 | y = bar(root= "sdasd")
   |
   = help: Remove whitespace

ℹ Safe fix
7  7  | #: E251
8  8  | foo(bar =True)
9  9  | #: E251 E251
10    |-foo(bar = True)
   10 |+foo(bar= True)
11 11 | #: E251
12 12 | y = bar(root= "sdasd")
13 13 | #: E251:2:29

E25.py:10:10: E251 [*] Unexpected spaces around keyword / parameter equals
   |
 8 | foo(bar =True)
 9 | #: E251 E251
10 | foo(bar = True)
   |          ^ E251
11 | #: E251
12 | y = bar(root= "sdasd")
   |
   = help: Remove whitespace

ℹ Safe fix
7  7  | #: E251
8  8  | foo(bar =True)
9  9  | #: E251 E251
10    |-foo(bar = True)
   10 |+foo(bar =True)
11 11 | #: E251
12 12 | y = bar(root= "sdasd")
13 13 | #: E251:2:29

E25.py:12:14: E251 [*] Unexpected spaces around keyword / parameter equals
   |
10 | foo(bar = True)
11 | #: E251
12 | y = bar(root= "sdasd")
   |              ^ E251
13 | #: E251:2:29
14 | parser.add_argument('--long-option',
   |
   = help: Remove whitespace

ℹ Safe fix
9  9  | #: E251 E251
10 10 | foo(bar = True)
11 11 | #: E251
12    |-y = bar(root= "sdasd")
   12 |+y = bar(root="sdasd")
13 13 | #: E251:2:29
14 14 | parser.add_argument('--long-option',
15 15 |                     default=

E25.py:15:29: E251 [*] Unexpected spaces around keyword / parameter equals
   |
13 |   #: E251:2:29
14 |   parser.add_argument('--long-option',
15 |                       default=
   |  _____________________________^
16 | |                     "/rather/long/filesystem/path/here/blah/blah/blah")
   | |____________________^ E251
17 |   #: E251:1:45
18 |   parser.add_argument('--long-option', default
   |
   = help: Remove whitespace

ℹ Safe fix
12 12 | y = bar(root= "sdasd")
13 13 | #: E251:2:29
14 14 | parser.add_argument('--long-option',
15    |-                    default=
16    |-                    "/rather/long/filesystem/path/here/blah/blah/blah")
   15 |+                    default="/rather/long/filesystem/path/here/blah/blah/blah")
17 16 | #: E251:1:45
18 17 | parser.add_argument('--long-option', default
19 18 |                     ="/rather/long/filesystem/path/here/blah/blah/blah")

E25.py:18:45: E251 [*] Unexpected spaces around keyword / parameter equals
   |
16 |                       "/rather/long/filesystem/path/here/blah/blah/blah")
17 |   #: E251:1:45
18 |   parser.add_argument('--long-option', default
   |  _____________________________________________^
19 | |                     ="/rather/long/filesystem/path/here/blah/blah/blah")
   | |____________________^ E251
20 |   #: E251:3:8 E251:3:10
21 |   foo(True,
   |
   = help: Remove whitespace

ℹ Safe fix
15 15 |                     default=
16 16 |                     "/rather/long/filesystem/path/here/blah/blah/blah")
17 17 | #: E251:1:45
18    |-parser.add_argument('--long-option', default
19    |-                    ="/rather/long/filesystem/path/here/blah/blah/blah")
   18 |+parser.add_argument('--long-option', default="/rather/long/filesystem/path/here/blah/blah/blah")
20 19 | #: E251:3:8 E251:3:10
21 20 | foo(True,
22 21 |     baz=(1, 2),

E25.py:23:8: E251 [*] Unexpected spaces around keyword / parameter equals
   |
21 | foo(True,
22 |     baz=(1, 2),
23 |     biz = 'foo'
   |        ^ E251
24 |     )
25 | #: Okay
   |
   = help: Remove whitespace

ℹ Safe fix
20 20 | #: E251:3:8 E251:3:10
21 21 | foo(True,
22 22 |     baz=(1, 2),
23    |-    biz = 'foo'
   23 |+    biz= 'foo'
24 24 |     )
25 25 | #: Okay
26 26 | foo(bar=(1 == 1))

E25.py:23:10: E251 [*] Unexpected spaces around keyword / parameter equals
   |
21 | foo(True,
22 |     baz=(1, 2),
23 |     biz = 'foo'
   |          ^ E251
24 |     )
25 | #: Okay
   |
   = help: Remove whitespace

ℹ Safe fix
20 20 | #: E251:3:8 E251:3:10
21 21 | foo(True,
22 22 |     baz=(1, 2),
23    |-    biz = 'foo'
   23 |+    biz ='foo'
24 24 |     )
25 25 | #: Okay
26 26 | foo(bar=(1 == 1))


