Commit 33fd6267

Thang Dang <31526669+tkppro@users.noreply.github.com>
2023-02-07 02:40:29
Replace self with cls in classmethods for consistency (#211)
1 parent b23ecaf
Changed files (2)
openai
openai/api_resources/customer.py
@@ -3,7 +3,7 @@ from openai.openai_object import OpenAIObject
 
 class Customer(OpenAIObject):
     @classmethod
-    def get_url(self, customer, endpoint):
+    def get_url(cls, customer, endpoint):
         return f"/customer/{customer}/{endpoint}"
 
     @classmethod
openai/api_resources/moderation.py
@@ -7,7 +7,7 @@ class Moderation(OpenAIObject):
     VALID_MODEL_NAMES: List[str] = ["text-moderation-stable", "text-moderation-latest"]
 
     @classmethod
-    def get_url(self):
+    def get_url(cls):
         return "/moderations"
 
     @classmethod