Skip to content

Commit

Permalink
replaced autopep8 with black as the python formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
rongxin-liu committed Oct 27, 2023
1 parent 4391242 commit fd62fa6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
long_description_content_type="text/markdown",
install_requires=[
"argparse",
"autopep8>=1.4.3",
"black>=23.10.0",
"icdiff",
"jsbeautifier",
"pycodestyle==2.10.0",
Expand All @@ -40,6 +40,6 @@
]
},
url="https://github.com/cs50/style50",
version="2.8.2",
version="2.9.0",
include_package_data=True,
)
6 changes: 3 additions & 3 deletions style50/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
from tokenize import generate_tokens, STRING, INDENT, COMMENT, TokenError

import autopep8
import black
import jsbeautifier

from . import StyleCheck, Error
Expand Down Expand Up @@ -66,9 +66,9 @@ def count_lines(self, code):
"""
return len(code.splitlines())

# TODO: Determine which options (if any) should be passed to autopep8
# TODO: Determine which options (if any) should be passed to black
def style(self, code):
return autopep8.fix_code(code, options={"max_line_length": 132, "ignore_local_config": True})
return black.format_str(code, mode=black.FileMode())


class Js(C):
Expand Down

0 comments on commit fd62fa6

Please sign in to comment.