Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with Ruff Formatter #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions demo_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@

# from django.db.models.expressions import RawSQL

AWS_SECRET_KEY = "d6s$f9g!j8mg7hw?n&c2"
AWS_SECRET_KEY = "d6s$f9g!j8mg7hw?n&c2"


class BaseNumberGenerator:
"""Declare a method -- `get_number`."""

def __init__(self ):
self.limits = (1, 10)
def __init__(self):
self.limits = (1, 10)

def get_number(self , min_max):
raise NotImplementedError
def get_number(self, min_max):
raise NotImplementedError

def smethod( ):
def smethod():
"""static method-to-be"""

smethod = staticmethod(smethod)
Expand Down
14 changes: 7 additions & 7 deletions foo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

nums = list(range(10))

if a != 1:
raise AssertionError
print(b, nums)
if a != 1:
raise AssertionError
print(b, nums)


def baz(a= None):
def baz(a=None):
if a is None:
a = []
return 0
Expand All @@ -19,9 +19,9 @@ def aaa(a=None):
return 1


def foo(b= None):
if b is None:
b = [ ]
def foo(b=None):
if b is None:
b = []

z = 12
return 1
Expand Down