---
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
---
E262 [*] Inline comment should start with `# `
 --> E26.py:4:12
  |
2 | pass # an inline comment
3 | #: E262:1:12
4 | x = x + 1  #Increment x
  |            ^^^^^^^^^^^^
5 | #: E262:1:12
6 | x = x + 1  #  Increment x
  |
help: Format space
  |
3 | #: E262:1:12
  - x = x + 1  #Increment x
4 + x = x + 1  # Increment x
5 | #: E262:1:12
  |

E262 [*] Inline comment should start with `# `
 --> E26.py:6:12
  |
4 | x = x + 1  #Increment x
5 | #: E262:1:12
6 | x = x + 1  #  Increment x
  |            ^^^^^^^^^^^^^^
7 | #: E262:1:12
8 | x = y + 1  #:  Increment x
  |
help: Format space
  |
5 | #: E262:1:12
  - x = x + 1  #  Increment x
6 + x = x + 1  # Increment x
7 | #: E262:1:12
  |

E262 [*] Inline comment should start with `# `
  --> E26.py:8:12
   |
 6 | x = x + 1  #  Increment x
 7 | #: E262:1:12
 8 | x = y + 1  #:  Increment x
   |            ^^^^^^^^^^^^^^^
 9 | #: E265:1:1
10 | #Block comment
   |
help: Format space
  |
7 | #: E262:1:12
  - x = y + 1  #:  Increment x
8 + x = y + 1  #: Increment x
9 | #: E265:1:1
  |

E262 [*] Inline comment should start with `# `
  --> E26.py:63:9
   |
61 | # -*- coding: utf8 -*-
62 | #  (One space one NBSP) Ok for block comment
63 | a = 42  #  (One space one NBSP)
   |         ^^^^^^^^^^^^^^^^^^^^^^^
64 | #: E262:2:9
65 | #  (Two spaces) Ok for block comment
   |
help: Format space
   |
62 | #  (One space one NBSP) Ok for block comment
   - a = 42  #  (One space one NBSP)
63 + a = 42  # (One space one NBSP)
64 | #: E262:2:9
   |

E262 [*] Inline comment should start with `# `
  --> E26.py:66:9
   |
64 | #: E262:2:9
65 | #  (Two spaces) Ok for block comment
66 | a = 42  #  (Two spaces)
   |         ^^^^^^^^^^^^^^^
67 |
68 | #: E265:5:1
   |
help: Format space
   |
65 | #  (Two spaces) Ok for block comment
   - a = 42  #  (Two spaces)
66 + a = 42  # (Two spaces)
67 |
   |

E262 [*] Inline comment should start with `# `
  --> E26.py:84:8
   |
82 | ##  Foo
83 |
84 | a = 1  ## Foo
   |        ^^^^^^
85 |
86 | a = 1  #:Foo
   |
help: Format space
   |
83 |
   - a = 1  ## Foo
84 + a = 1  # Foo
85 |
   |

E262 [*] Inline comment should start with `# `
  --> E26.py:86:8
   |
84 | a = 1  ## Foo
85 |
86 | a = 1  #:Foo
   |        ^^^^^
   |
help: Format space
   |
85 |
   - a = 1  #:Foo
86 + a = 1  #: Foo
   |
