---
source: crates/ruff_linter/src/rules/flake8_self/mod.rs
---
SLF001 Private member accessed: `_private`
  --> SLF001.py:34:12
   |
33 |     def get_bar():
34 |         if self.bar._private:  # SLF001
   |            ^^^^^^^^^^^^^^^^^
35 |             return None
36 |         if self.bar()._private:  # SLF001
   |

SLF001 Private member accessed: `_private`
  --> SLF001.py:36:12
   |
34 |         if self.bar._private:  # SLF001
35 |             return None
36 |         if self.bar()._private:  # SLF001
   |            ^^^^^^^^^^^^^^^^^^^
37 |             return None
38 |         if Bar._private_thing:  # SLF001
   |

SLF001 Private member accessed: `_private_thing`
  --> SLF001.py:38:12
   |
36 |         if self.bar()._private:  # SLF001
37 |             return None
38 |         if Bar._private_thing:  # SLF001
   |            ^^^^^^^^^^^^^^^^^^
39 |             return None
40 |         if Foo._private_thing:
   |

SLF001 Private member accessed: `_private_thing`
  --> SLF001.py:43:12
   |
41 |             return None
42 |         Foo = Bar()
43 |         if Foo._private_thing:  # SLF001
   |            ^^^^^^^^^^^^^^^^^^
44 |             return None
45 |         return self.bar
   |

SLF001 Private member accessed: `_private_thing`
  --> SLF001.py:62:7
   |
60 | foo = Foo()
61 |
62 | print(foo._private_thing)  # SLF001
   |       ^^^^^^^^^^^^^^^^^^
63 | print(foo.__really_private_thing)  # SLF001
64 | print(foo._private_func())  # SLF001
   |

SLF001 Private member accessed: `__really_private_thing`
  --> SLF001.py:63:7
   |
62 | print(foo._private_thing)  # SLF001
63 | print(foo.__really_private_thing)  # SLF001
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^
64 | print(foo._private_func())  # SLF001
65 | print(foo.__really_private_func(1))  # SLF001
   |

SLF001 Private member accessed: `_private_func`
  --> SLF001.py:64:7
   |
62 | print(foo._private_thing)  # SLF001
63 | print(foo.__really_private_thing)  # SLF001
64 | print(foo._private_func())  # SLF001
   |       ^^^^^^^^^^^^^^^^^
65 | print(foo.__really_private_func(1))  # SLF001
66 | print(foo.bar._private)  # SLF001
   |

SLF001 Private member accessed: `__really_private_func`
  --> SLF001.py:65:7
   |
63 | print(foo.__really_private_thing)  # SLF001
64 | print(foo._private_func())  # SLF001
65 | print(foo.__really_private_func(1))  # SLF001
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^
66 | print(foo.bar._private)  # SLF001
67 | print(foo()._private_thing)  # SLF001
   |

SLF001 Private member accessed: `_private`
  --> SLF001.py:66:7
   |
64 | print(foo._private_func())  # SLF001
65 | print(foo.__really_private_func(1))  # SLF001
66 | print(foo.bar._private)  # SLF001
   |       ^^^^^^^^^^^^^^^^
67 | print(foo()._private_thing)  # SLF001
68 | print(foo()._private_thing__)  # SLF001
   |

SLF001 Private member accessed: `_private_thing`
  --> SLF001.py:67:7
   |
65 | print(foo.__really_private_func(1))  # SLF001
66 | print(foo.bar._private)  # SLF001
67 | print(foo()._private_thing)  # SLF001
   |       ^^^^^^^^^^^^^^^^^^^^
68 | print(foo()._private_thing__)  # SLF001
   |

SLF001 Private member accessed: `_private_thing__`
  --> SLF001.py:68:7
   |
66 | print(foo.bar._private)  # SLF001
67 | print(foo()._private_thing)  # SLF001
68 | print(foo()._private_thing__)  # SLF001
   |       ^^^^^^^^^^^^^^^^^^^^^^
69 |
70 | print(foo.public_thing)
   |
