aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/n/name/name_preset_snake_case.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/n/name/name_preset_snake_case.py')
-rw-r--r--tests/functional/n/name/name_preset_snake_case.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/functional/n/name/name_preset_snake_case.py b/tests/functional/n/name/name_preset_snake_case.py
new file mode 100644
index 000000000..75350497e
--- /dev/null
+++ b/tests/functional/n/name/name_preset_snake_case.py
@@ -0,0 +1,35 @@
+# pylint: disable=missing-docstring,too-few-public-methods
+from enum import Enum
+from typing import ClassVar
+
+__version__ = "1.0"
+SOME_CONSTANT = 42 # [invalid-name]
+
+
+def say_hello(some_argument):
+ return [some_argument * some_value for some_value in range(10)]
+
+
+class MyClass: # [invalid-name]
+ def __init__(self, arg_x):
+ self._my_secret_x = arg_x
+
+ @property
+ def my_public_x(self):
+ return self._my_secret_x * 2
+
+ def __eq__(self, other):
+ return isinstance(other, MyClass) and self.my_public_x == other.my_public_x
+
+
+def sayHello(): # [invalid-name]
+ pass
+
+
+class FooEnum(Enum): # [invalid-name]
+ const_with_snake_case = 42
+ another_const = 43
+
+
+class Bar: # [invalid-name]
+ const_with_snake_case: ClassVar[int] = 42